T
Trit
function in question (most visible case):
library IEEE;
use IEEE.std_logic_1164.all;
use Ieee.numeric_std.all;
entity dec_addr5 is
port( mem_in_use : in std_logic;
addr_in : in std_logic_vector (4 downto 0);
addr_out : out std_logic_vector (4 downto 0));
end entity dec_addr5;
architecture decriment of dec_addr5 is
signal tempout : std_logic_vector( 4 downto 0 );
begin
decr : process( mem_in_use, addr_in )
begin
--force to 0 if mem in use for the memory OR on inputs
if( mem_in_use = '1') then
tempout <= "00000";
--wordcount of 32 is 00000, but memory is 0-31 - handle
reverse wraparound
elsif( addr_in = "00000" ) then
tempout <= "11111";
else
tempout <= std_logic_vector(unsigned(addr_in) - 1);
end if;
end process decr;
addr_out <= tempout;
end architecture decriment;
Now my simulations show that tempout is taking the values it is
supposed to (I pulse mem_in_use on startup to initialise it), the
counter that is an input to it is initialised too (sitting at
"00000"), however, addr_out is not assigning and modelsim maintains it
is "UUUUU". The assignment is clearly outside the process and so not
subject to it's visibility constraints
I'm not particularly experienced at VHDL but I don't see much wrong
with that code (and it has in fact worked several times elsewhere in
similar forms). I have also checked the file is properly saved,
compiled and then restarted the simulator to be sure. Any help would
be appreciated
library IEEE;
use IEEE.std_logic_1164.all;
use Ieee.numeric_std.all;
entity dec_addr5 is
port( mem_in_use : in std_logic;
addr_in : in std_logic_vector (4 downto 0);
addr_out : out std_logic_vector (4 downto 0));
end entity dec_addr5;
architecture decriment of dec_addr5 is
signal tempout : std_logic_vector( 4 downto 0 );
begin
decr : process( mem_in_use, addr_in )
begin
--force to 0 if mem in use for the memory OR on inputs
if( mem_in_use = '1') then
tempout <= "00000";
--wordcount of 32 is 00000, but memory is 0-31 - handle
reverse wraparound
elsif( addr_in = "00000" ) then
tempout <= "11111";
else
tempout <= std_logic_vector(unsigned(addr_in) - 1);
end if;
end process decr;
addr_out <= tempout;
end architecture decriment;
Now my simulations show that tempout is taking the values it is
supposed to (I pulse mem_in_use on startup to initialise it), the
counter that is an input to it is initialised too (sitting at
"00000"), however, addr_out is not assigning and modelsim maintains it
is "UUUUU". The assignment is clearly outside the process and so not
subject to it's visibility constraints
I'm not particularly experienced at VHDL but I don't see much wrong
with that code (and it has in fact worked several times elsewhere in
similar forms). I have also checked the file is properly saved,
compiled and then restarted the simulator to be sure. Any help would
be appreciated