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