R
Rick C
Guest
# Error: COMP96_0228: TestBench/Alarm_top_TB.vhd : (219, 26): The actual must be denoted by a static signal name, if the actual is associated with a signal parameter of any mode.
signal Buttons : unsigned(3 downto 0);
procedure Test_Button (
signal Buttons, Button_Action : in unsigned(3 downto 0);
index : in integer range 3 downto 0;
value : in std_logic) is
begin
-- wait until \'1\' = Buttons(index);
wait until falling_edge(Buttons(index));
assert false report \"Checking button \" & integer\'image(index);
assert (Button_Action(index) = value)
report \"Invalid button action detected at time \" &
time\'image(now) & \" button action = \" &
std_logic\'image(Button_Action(index));
end procedure Test_Button;
..
..
..
test_KP: process is
begin
Test_Button (Buttons, Button_Press, 0, \'0\');
....
I think I get what a static signal is, but I\'m not clear on what exactly is wrong. They refer to the \"actual\" which is the value passed into the function, no? What is not static about \"Buttons\"??? Is it the fact that the value is not known until the code is run??? This error goes away when I remove the signal designation from the declaration of parameters, but then it barfs on using it to invoke the falling_edge function because it\'s not a signal.
I\'m so confused! Why does VHDL care if I make this a signal? Rather than citing seemingly arbitrary VHDL rules, can anyone explain what problem this rule is addressing?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
signal Buttons : unsigned(3 downto 0);
procedure Test_Button (
signal Buttons, Button_Action : in unsigned(3 downto 0);
index : in integer range 3 downto 0;
value : in std_logic) is
begin
-- wait until \'1\' = Buttons(index);
wait until falling_edge(Buttons(index));
assert false report \"Checking button \" & integer\'image(index);
assert (Button_Action(index) = value)
report \"Invalid button action detected at time \" &
time\'image(now) & \" button action = \" &
std_logic\'image(Button_Action(index));
end procedure Test_Button;
..
..
..
test_KP: process is
begin
Test_Button (Buttons, Button_Press, 0, \'0\');
....
I think I get what a static signal is, but I\'m not clear on what exactly is wrong. They refer to the \"actual\" which is the value passed into the function, no? What is not static about \"Buttons\"??? Is it the fact that the value is not known until the code is run??? This error goes away when I remove the signal designation from the declaration of parameters, but then it barfs on using it to invoke the falling_edge function because it\'s not a signal.
I\'m so confused! Why does VHDL care if I make this a signal? Rather than citing seemingly arbitrary VHDL rules, can anyone explain what problem this rule is addressing?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209