Guest
#4665083
Hi!
I've been trying to do a 16 bit multiplier block using vhdl:
------------------------------------------------------------------------
---
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity Multiplier is
port(
x,B: in std_logic_vector(15 downto 0);
R: out std_logic_vector(15 downto 0)
);
end Multiplier;
architecture Behavioral of Multiplier is
signal s32_R: std_logic_vector(31 downto 0);
begin
Multiplication: process(x,B)
begin
s32_R <= std_logic_vector(signed(x)*signed(B));
R <= s32_R(15 downto 0);
end process Multiplication;
end Behavioral;
------------------------------------------------------------------------
---
When the simulation is done the result is at the first 16 bits of the 32
bits value at s32_R signal but it does not move to the output port
labeled R, instead of the desire result, port R keep the unitialized
value 'UUUUUUUUUUUUUUUU'.
Is it wrong to use "R <= s32_R(15 downto 0);"? Is it a better or
correctly way to describe this operation? It's just moving the 16 less
significant bits of the s32_R signal into the entity output R.
Thanks for reading! :)