anonymous.
Junior Member level 3
- Joined
- Apr 16, 2012
- Messages
- 27
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,485
I have a component with generic.
and I have those signals defined :
Sometimes I need to use the component with the generic Width = 1 as follows :
which when compiling in modelsim results in this error for LRU_BankWrite and LRU_BankRead signals (or places in the port map):
I have encountered this error before and solved it by using a different component with std_logics and no generics instead of std_logic_vectors.
unfortunately this is not possible here, Is there any other way around it ?
Code:
component DCache_SinglePortRam is
generic (Width : integer := 32;
Length : integer:= 256);
port(Clk: in std_logic;
WordLine : in std_logic_vector(Length-1 downto 0);
DataIn : in std_logic_vector (Width-1 downto 0);
DataOut : out std_logic_vector (Width-1 downto 0);
RW : in std_logic);
end component;
Code:
signal LRU_BankRead : std_logic_vector(NumOfPorts-1 downto 0);
signal LRU_BankWrite : std_logic_vector(NumOfPorts-1 downto 0);
Sometimes I need to use the component with the generic Width = 1 as follows :
Code:
LRUBank : DCache_SinglePortedRam
generic map(1,LengthOfBank)
port map(Clk,WordLines(i),LRU_BankWrite(i),LRU_BankRead(i),LRU_RW(i));
which when compiling in modelsim results in this error for LRU_BankWrite and LRU_BankRead signals (or places in the port map):
Code:
Cannot resolve indexed name as type ieee.std_logic_1164.std_logic_vector
I have encountered this error before and solved it by using a different component with std_logics and no generics instead of std_logic_vectors.
unfortunately this is not possible here, Is there any other way around it ?