How do I use a parameter in the procedure?

Status
Not open for further replies.

kelvin_sg

Advanced Member level 4
Joined
Aug 17, 2004
Messages
102
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Singapore
Activity points
852
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..

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)
		);
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…