mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Wrap initial blocks with a NO_INIT so that tests for archs without register initialization feature don't fail.
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			285 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			285 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 );
 | |
| `ifndef NO_INIT
 | |
|     initial begin
 | |
|         q = 0;
 | |
|     end
 | |
| `endif
 | |
| 	  always @( posedge clk )
 | |
|         if ( en )
 | |
|               q <= d;
 | |
| endmodule
 |