aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/common/dffs.v
blob: 0c607af5040b9184b8e3ea4800f76179c011ca98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module dff ( input d, clk, output reg q );
	  always @( posedge clk )
        q <= d;
endmodule

module dffe( input d, clk, en, output reg q );
`ifndef NO_INIT
    initial begin
        q = 0;
    end
`endif
	  always @( posedge clk )
        if ( en )
              q <= d;
endmodule