aboutsummaryrefslogtreecommitdiffstats
path: root/tests/xilinx/dffs.v
blob: 3418787c9fbf25125d0e79cf11065d279df064a6 (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 );
    initial begin
      q = 0;
    end
	always @( posedge clk )
		if ( en )
			q <= d;
endmodule