oneshot_rx.txt

来自「these files are written in verilog but i」· 文本 代码 · 共 30 行

TXT
30
字号
`timescale 1ns/1ps
module oneshot_rx(osin_rx,clk1,osout_rx,load_rx);
input osin_rx;
input clk1;
output osout_rx,load_rx;
reg osout_rx,load_rx; 
reg count=1'b1;
always @(posedge osin_rx or posedge osout_rx)
begin
  if(osin_rx)
   begin
   if(count)
     begin
        if(osout_rx)
           load_rx<= 0;
        else
           load_rx <= 1;
      count<=1'b0; 
     end
  end
if(osout_rx)
	 load_rx<= 0;
end

always @(posedge clk1)
begin
osout_rx <= load_rx;
end
endmodule

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?