Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top