im&u
Newbie level 4
- Joined
- Jan 21, 2011
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,349
Hi all,
I'm trying to write a test bench for a fpga as follows:
...
signal a : std_logic;--connected to input a of fpga
signal b : std_logic;--connected to input b of fpga
...
begin
...
main_tb_process: process
begin
--initialization
a <= '0';
b <= '0';
...
--command1
a <= '1';
...
end process
My question is:
is there any way that I can simplify the step of initialization by writing a procedure that when called resets all fpga inputs ? like this :
procedure init_fpga
begin
a <= '0';
b <= '0';
end procedure;
begin
...
main_tb_process: process
begin
--initialization
init_fpga;
...
--command1
a <= '1';
...
end process
The problem is that I want to keep control of signals a and b in the main process for command1 etc.
PS. I'm doing this because it may be useful when fpga has A LOT of inputs.
Thank you.
I'm trying to write a test bench for a fpga as follows:
...
signal a : std_logic;--connected to input a of fpga
signal b : std_logic;--connected to input b of fpga
...
begin
...
main_tb_process: process
begin
--initialization
a <= '0';
b <= '0';
...
--command1
a <= '1';
...
end process
My question is:
is there any way that I can simplify the step of initialization by writing a procedure that when called resets all fpga inputs ? like this :
procedure init_fpga
begin
a <= '0';
b <= '0';
end procedure;
begin
...
main_tb_process: process
begin
--initialization
init_fpga;
...
--command1
a <= '1';
...
end process
The problem is that I want to keep control of signals a and b in the main process for command1 etc.
PS. I'm doing this because it may be useful when fpga has A LOT of inputs.
Thank you.