mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Quartus assumes unsigned multiplication by default, breaking signed multiplies, so add an input signedness parameter to the MISTRAL_MUL* cells to propagate to Quartus' <family>_mac cells.
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			178 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			178 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
module top
 | 
						|
#(parameter X_WIDTH=6, Y_WIDTH=6, A_WIDTH=12)
 | 
						|
(
 | 
						|
    input [X_WIDTH-1:0] x,
 | 
						|
    input [Y_WIDTH-1:0] y,
 | 
						|
 | 
						|
    output [A_WIDTH-1:0] A,
 | 
						|
);
 | 
						|
    assign A =  x * y;
 | 
						|
endmodule
 |