mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			262 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			262 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
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
 |