mirror of
				https://github.com/YosysHQ/sby.git
				synced 2025-10-31 04:52:30 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			294 B
		
	
	
	
		
			Systemverilog
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			294 B
		
	
	
	
		
			Systemverilog
		
	
	
	
	
	
| module demo (
 | |
|   input clk,
 | |
|   output reg [5:0] counter
 | |
| );
 | |
|   initial counter = 0;
 | |
| 
 | |
|   always @(posedge clk) begin
 | |
|     if (counter == 15)
 | |
|       counter <= 0;
 | |
|     else
 | |
|       counter <= counter + 1;
 | |
|   end
 | |
| 
 | |
| `ifdef FORMAL
 | |
|   always @(posedge clk) begin
 | |
|     assert (counter < 32);
 | |
|   end
 | |
| `endif
 | |
| endmodule
 |