mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			421 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			421 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
| module gold (input clock, ctrl, din, output reg dout);
 | |
| 	always @(posedge clock) begin
 | |
| 		if (1'b1) begin
 | |
| 			if (1'b0) begin end else begin
 | |
| 				dout <= 0;
 | |
| 			end
 | |
| 			if (ctrl)
 | |
| 				dout <= din;
 | |
| 		end
 | |
| 	end
 | |
| endmodule
 | |
| 
 | |
| module gate (input clock, ctrl, din, output reg dout);
 | |
| 	always @(posedge clock) begin
 | |
| 		if (1'b1) begin
 | |
| 			if (1'b0) begin end else begin
 | |
| 				dout <= 0;
 | |
| 			end
 | |
| 		end
 | |
| 		if (ctrl)
 | |
| 			dout <= din;
 | |
| 	end
 | |
| endmodule
 |