mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			331 B
		
	
	
	
		
			Systemverilog
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			331 B
		
	
	
	
		
			Systemverilog
		
	
	
	
	
	
| module top (
 | |
| 	input clk,
 | |
| 	input [2:0] a,
 | |
| 	input [2:0] b
 | |
| );
 | |
| 	default clocking @(posedge clk); endclocking
 | |
| 
 | |
| 	assert property (
 | |
| 		$changed(a)
 | |
| 	);
 | |
| 
 | |
|     assert property (
 | |
|         $changed(b) == ($changed(b[0]) || $changed(b[1]) || $changed(b[2]))
 | |
|     );
 | |
| 
 | |
| `ifndef FAIL
 | |
| 	assume property (
 | |
| 		a !== 'x ##1 $changed(a)
 | |
| 	);
 | |
| `endif
 | |
| 
 | |
| endmodule
 |