mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	verilog: fix buf/not primitives with multiple outputs
From IEEE1364-2005, section 7.3 buf and not gates: > These two logic gates shall have one input and one or more outputs. > The last terminal in the terminal list shall connect to the input of the > logic gate, and the other terminals shall connect to the outputs of > the logic gate. yosys does not follow this and instead interprets the first argument as the output, the second as the input and ignores the rest.
This commit is contained in:
		
							parent
							
								
									dd6d34f461
								
							
						
					
					
						commit
						092e923330
					
				
					 2 changed files with 30 additions and 4 deletions
				
			
		
							
								
								
									
										15
									
								
								tests/simple/verilog_primitives.v
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								tests/simple/verilog_primitives.v
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| module verilog_primitives ( | ||||
| 	input wire in1, in2, in3, | ||||
| 	output wire out_buf0, out_buf1, out_buf2, out_buf3, out_buf4, | ||||
| 	output wire out_not0, out_not1, out_not2, | ||||
| 	output wire out_xnor | ||||
| ); | ||||
| 
 | ||||
| buf u_buf0 (out_buf0, in1); | ||||
| buf u_buf1 (out_buf1, out_buf2, out_buf3, out_buf4, in2); | ||||
| 
 | ||||
| not u_not0 (out_not0, out_not1, out_not2, in1); | ||||
| 
 | ||||
| xnor u_xnor0 (out_xnor, in1, in2, in3); | ||||
| 
 | ||||
| endmodule | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue