D flip-flop with asynchronous active low reset
D flip-flop with synchronous active low reset
// async active low reset d_ff
module d_ff(
input wire clock
, input wire reset
, input wire d
, output reg q
);
always @(posedge clock or negedge reset) begin
if(~reset)
q <= 1'b0;
else
q <= d;
end
endmodule
|
D flip-flop with synchronous active low reset
// sync active low reset d_ff
module d_ff(
input wire clock
, input wire reset
, input wire d
, output reg q
);
always @(posedge clock) begin
if(~reset)
q <= 1'b0;
else
q <= d;
end
endmodule
|
'베릴로그' 카테고리의 다른 글
| Verilog VPI example (2) | 2011/03/21 |
|---|---|
| Verilog Coding Guidelines (2) | 2010/12/11 |
| 베릴로그 스니펫 Resettable D flip-flop (3) | 2010/11/14 |
| 베릴로그 스니펫 D flip-flop, Verilog D flip-flop (0) | 2010/11/13 |
| 베릴로그 스니펫 MUX, Verilog Snippet MUX (3) | 2010/05/06 |
| Verilog HDL 입문하기 (31) | 2009/12/29 |


async_reset_dff.tar.gz
댓글을 달아 주세요
wire? 시뮬레이터에 표시할 때 쓰는거임?
허굽허굽~
VHDL에서 std_logic랑 같은 거라능
물리적인 상태에서 연결하는 선을 표현하는 것이로군.
거미줄.. ㅋㅋ 이해했음. ㅋ