T
Thomas Reinemann
Guest
nospam schrieb:
end generate memo;
receive_symbol1 : in std_logic_vectorDear all,
Could any one telll me how to change 64 INSTANTIATION (MEMxx) below
into
a for loop?
Yick
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_ARITH.all;
entity viterbi is
generic (VITERBI_N, VITERBI_L, VITERBI_NUM_STATES:
integer);
port ( clk : in std_logic;
reset : in std_logic;
receive_symbol0 : in std_logic_vector;
memory_unit port map (mem_clk, mem_sel, reset, PM_IN(i), PM_OUT(i));inputting : in std_logic;
input_ready : out std_logic;
symbol : out std_logic
);
end viterbi;
architecture behaviour of viterbi is
constant PATH_METRICE_NUM_BITS : integer := 10;
constant VITERBI_Q : integer := receive_symbol0'length;
component butterfly_ACS is
generic (PATH_METRICE_NUM_BITS, Q, ENCODER_N:integer);
port (
clk : in std_logic;
PM0_IN : in signed((PATH_METRICE_NUM_BITS-1) downto 0);
PM1_IN : in signed((PATH_METRICE_NUM_BITS-1) downto 0);
SYM0 : in signed((Q-1) downto 0);
SYM1 : in signed((Q-1) downto 0);
CMD : in std_logic_vector(1 downto 0);
PM0_OUT: out signed((PATH_METRICE_NUM_BITS-1) downto 0);
TBR0 : out std_logic;
PM1_OUT: out signed((PATH_METRICE_NUM_BITS-1) downto 0);
TBR0 : out std_logic;
PM1_OUT: out signed((PATH_METRICE_NUM_BITS-1) downto 0);
TBR1 : out std_logic;
XXX_ZERO_TO_ZERO_XXX_INPUT_0: in std_logic_vector((ENCODER_N-1)
downto 0);
XXX_ZERO_TO_ONE_XXX_INPUT_1 : in std_logic_vector((ENCODER_N-1)
downto 0);
XXX_ONE_TO_ZERO_XXX_INPUT_0 : in std_logic_vector((ENCODER_N-1)
downto 0);
XXX_ONE_TO_ONE_XXX_INPUT_1 : in std_logic_vector((ENCODER_N-1)
downto 0)
);
end component;
component memory_unit is
generic (NUM_BITS: integer := PATH_METRICE_NUM_BITS);
port (
clk : in std_logic;
out_sel : in std_logic;
reset : in std_logic;
input : in std_logic_vector((NUM_BITS-1) downto 0);
output : out std_logic_vector((NUM_BITS-1) downto 0)
);
end component;
component stack is
generic (STACK_SIZE: integer);
port (
clk : in std_logic;
push_pop : in std_logic;
input : in std_logic;
output : out std_logic
);
end component;
type state_t is (
S_READY
);
type PM_TYPE is array (0 to (VITERBI_NUM_STATES-1))
of std_logic_vector((PATH_METRICE_NUM_BITS-1) downto 0);
signal PM_IN, PM_OUT: PM_TYPE;
signal cur_state: state_t;
signal mem_clk: std_logic;
signal mem_sel: std_logic;
begin
process(reset, CLK)
begin
if (RESET='1') then -- asynchronous reset
elsif (CLK'event and CLK='1') then
end if;
end process;
memo: for i in 0 to PM_IN'length - 1 generate
end generate memo;
end behaviour;