assigment of signals

Joined
Oct 2, 2007
Messages
8
Reaction score
0
Hi friends

I want to do the next:


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_SIGNED.ALL;

entity multiplicador is

Port ( a : in STD_LOGIC_VECTOR (15 downto 0);
b : in STD_LOGIC_VECTOR (15 downto 0);
clk : in STD_LOGIC;
sal : out STD_LOGIC_VECTOR (15 downto 0));

end multiplicador;

architecture Behavioral of multiplicador is
signal tmp : std_logic_vector (31 downto 0);

begin

process (clk, a, b)

begin
if clk= '1' and clk'event then
tmp <= a*b;
end if;

end process;

sal<= tmp(23 downto 8 ) ; -- here is the problem

end Behavioral;




How you see I want to assign only a portion of de vector 'tmp' to the vector 'sal' I tried to do this using Xilinx ISE 8.1i but it doesn't sinthesize it, so I want to know another way to sinthesize the simple code above. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top