mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	select: add test for not selecting inside black/white boxes
This commit is contained in:
		
							parent
							
								
									47c8ee7fe4
								
							
						
					
					
						commit
						2ddfb61e65
					
				
					 1 changed files with 21 additions and 0 deletions
				
			
		
							
								
								
									
										21
									
								
								tests/select/blackboxes.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								tests/select/blackboxes.ys
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
read_verilog -specify <<EOT
 | 
			
		||||
module top(input a, b, output o);
 | 
			
		||||
assign o = a & b;
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
(* blackbox *)
 | 
			
		||||
module bb(input a, b, output o);
 | 
			
		||||
assign o = a | b;
 | 
			
		||||
specify
 | 
			
		||||
	(a => o) = 1;
 | 
			
		||||
endspecify
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
(* whitebox *)
 | 
			
		||||
module wb(input a, b, output o);
 | 
			
		||||
assign o = a ^ b;
 | 
			
		||||
endmodule
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
select -assert-count 1 c:*
 | 
			
		||||
select -assert-none t:* t:$and %d
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue