So the final Verilog implementation of a D-FF looks as follows: In Verilog code:Īlways (posedge (clk ), posedge (rst ) ) begin if (rst = 1 ) So we can describe the circuit as follows: always at rising edge of clk or rising of rst, if rst is asserted, Q is driven to logic '0', else Q is driven by D. In other words, output Q is sensitive to clock signal clk and reset signal rst. On the contrary to combinational circuits, the output of flip-flop changes when a rising edge or falling edge of clock occurs or the reset is asserted. To describe the behavior of the flip-flop, we are going to use an “ always” block. 1 shows, D flip-flops have three inputs: data input (D), clock input ( clk), and asynchronous reset input ( rst, active high), and one output: data output (Q). In this step, we are going to implement a D-FF with asynchronous reset.Īs the block diagram in Fig.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |