kelvin_sg
Advanced Member level 4
The idea is, a general data reader which reads 8 pieces of data from the file,
each of data-width bw.. However the bw should be parameter. The procedure
is called so often and I felt declaring many constants is tedious..
each of data-width bw.. However the bw should be parameter. The procedure
is called so often and I felt declaring many constants is tedious..
Code:
procedure read_8 (
file in_file : text;
bw : integer;
signal data0_out : out std_logic_vector(bw-1 downto 0);
signal data1_out : out std_logic_vector(bw-1 downto 0);
signal data2_out : out std_logic_vector(bw-1 downto 0);
signal data3_out : out std_logic_vector(bw-1 downto 0);
signal data4_out : out std_logic_vector(bw-1 downto 0);
signal data5_out : out std_logic_vector(bw-1 downto 0);
signal data6_out : out std_logic_vector(bw-1 downto 0);
signal data7_out : out std_logic_vector(bw-1 downto 0)
);