mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Add testcase
This commit is contained in:
		
							parent
							
								
									72ce06909e
								
							
						
					
					
						commit
						6258e6a7e2
					
				
					 1 changed files with 43 additions and 0 deletions
				
			
		
							
								
								
									
										43
									
								
								tests/techmap/autopurge.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								tests/techmap/autopurge.ys
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
# https://github.com/YosysHQ/yosys/issues/1391
 | 
			
		||||
read_verilog <<EOT
 | 
			
		||||
module sub(input i, output o, (* techmap_autopurge *) input [1:0] j);
 | 
			
		||||
foobar f(i, o, j);
 | 
			
		||||
endmodule
 | 
			
		||||
EOT
 | 
			
		||||
design -stash techmap
 | 
			
		||||
 | 
			
		||||
read_verilog <<EOT
 | 
			
		||||
(* blackbox *)
 | 
			
		||||
module sub(input i, output o, input j);
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
(* blackbox *)
 | 
			
		||||
module foobar(input i, output o, input j);
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
module top(input i, output o);
 | 
			
		||||
sub s0(i, o);
 | 
			
		||||
endmodule
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
techmap -map %techmap
 | 
			
		||||
hierarchy
 | 
			
		||||
check -assert
 | 
			
		||||
 | 
			
		||||
read_verilog -overwrite <<EOT
 | 
			
		||||
(* blackbox *)
 | 
			
		||||
module sub(input i, output o, input j);
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
(* blackbox *)
 | 
			
		||||
module foobar(input i, output o, input j);
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
module top(input i, output o);
 | 
			
		||||
wire j;
 | 
			
		||||
sub s0(i, o, j);
 | 
			
		||||
endmodule
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
techmap -map %techmap
 | 
			
		||||
hierarchy
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue