Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

multiplication of unsigned and sfixed numbers

Altera_Forum
Honored Contributor II
954 Views

I am trying to multiply an unsigned number with sfixed number (0.703125). following are the code and errors: 

 

 

library IEEE; 

use IEEE.STD_LOGIC_1164.ALL; 

library ieee_proposed; 

use ieee_proposed.fixed_pkg.all; 

USE ieee.numeric_std.all; 

 

 

entity tryproduct is 

end tryproduct; 

 

 

architecture Behavioral of tryproduct is (Line 11) 

signal a : sfixed(0 downto -6); 

signal k : sfixed(8 downto -6); 

SIGNAL temp1: UNSIGNED (8 downto 0) := "101001001" ; 

 

 

begin 

 

 

a <= to_sfixed (0.703125,a); 

k <= to_sfixed(temp1) * a; (Line 19) 

end Behavioral; 

 

 

 

 

 

 

Errors: 

ERROR:HDLCompiler:432 - "G:/vhdlcodes/producttry/tryproduct.vhd" Line 19: Formal <arg> has no actual or default value. 

ERROR:HDLCompiler:841 - "G:/vhdlcodes/producttry/tryproduct.vhd" Line 19: Expecting type integer for <temp1>. 

ERROR:HDLCompiler:9 - "G:/vhdlcodes/producttry/tryproduct.vhd" Line 19: Found 0 definitions for operator "*". 

ERROR:HDLCompiler:854 - "G:/vhdlcodes/producttry/tryproduct.vhd" Line 11: Unit <behavioral> ignored due to previous errors. 

 

 

 

 

thanks in advance
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
262 Views

Please dont cross post - there are many solutions on your post here: http://www.edaboard.com/thread353788.html

0 Kudos
Reply