tahirsengine
Member level 3
Hi,
I know this topic is being discussed earlier, but I think my issue is little different.
Here is my test code:
Actually in the main circuit, I am receiving input from outside my module as 32-bits. So I want to use chunk of it to address some internally declared(and initialized) array.
What may be work around?
Please note that I am still in learning phase of VHDL so please be gentle :-D
Cheers
tahir
- - - Updated - - -
the_output(0) was the problem. Removed (0). And it worked, as previously I was trying to assign a whole 8 bit value to a single bit.
Thanks guys.
I know this topic is being discussed earlier, but I think my issue is little different.
Here is my test code:
Code:
-----------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
entity micro_test_file is
Port (clk_in: in std_logic;
the_input: in std_logic_vector(0 to 3);
the_output: out std_logic_vector(0 to 7)
);
end micro_test_file;
architecture Behavioral of micro_test_file is
type dummy_array is array (0 to 2) of std_logic_vector (0 to 7);
signal ins_dummy: dummy_array := (8x"A",8x"B",8x"C" );
begin
process(clk_in)
begin
the_output(0) <= ins_dummy(to_integer(unsigned(the_input(0 to 1)))); -- here it is complaining "indexed name is not std_ulogic"
the_output(1) <= ins_dummy(the_input(0 to 1));
the_output(2) <= ins_dummy(the_input(0 to 1));
the_output(3) <= ins_dummy(the_input(0 to 1));
end process;
end Behavioral;
-----------------------------------------------------------------------------------------
Actually in the main circuit, I am receiving input from outside my module as 32-bits. So I want to use chunk of it to address some internally declared(and initialized) array.
What may be work around?
Please note that I am still in learning phase of VHDL so please be gentle :-D
Cheers
tahir
- - - Updated - - -
the_output(0) was the problem. Removed (0). And it worked, as previously I was trying to assign a whole 8 bit value to a single bit.
Thanks guys.