Welcome Notice

Register Log in

VHDL Static Signals...

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
 
K

KJ

Guest
On Monday, September 21, 2020 at 11:07:37 AM UTC-4, gnuarm.del...@gmail.com wrote:

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.

It\'s not \'Buttons\' that the complaint is about, but \'Buttons(index)\' which is the input parameter to the falling_edge function. \'Buttons(index)\' is not static, hence the complaint. I don\'t know what problem this VHDL rule is addressing with the rule, but thought I\'d clarify the actual complaint in case someone else might know the reason for the rule.
Kevin Jennings
 
R

Rick C

Guest
On Tuesday, September 22, 2020 at 4:53:31 PM UTC-4, KJ wrote:
On Monday, September 21, 2020 at 11:07:37 AM UTC-4, gnuarm.del...@gmail.com wrote:

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.

It\'s not \'Buttons\' that the complaint is about, but \'Buttons(index)\' which is the input parameter to the falling_edge function. \'Buttons(index)\' is not static, hence the complaint. I don\'t know what problem this VHDL rule is addressing with the rule, but thought I\'d clarify the actual complaint in case someone else might know the reason for the rule.

Kevin Jennings
Thanks. I eventually figured that out. It is the selection of the bit in the procedure that it is complaining about. I changed the code to pass in only the one bit of interest and in the process changed the nature of the test organization a bit too. These are button presses and I wish to test the debounce circuit.

Often I have a harder time constructing a test module than I did designing the code.

I haven\'t found much use for procedures in the past, but that is likely a chicken and egg thing. I didn\'t use them because I wasn\'t familiar with them and I wasn\'t familiar with them because I didn\'t use them. In this case it is allowing a simpler structure of the test code, so well worth a bit of effort to get it working. The assert error messages alone can be rather messy when repeated in a body of code.

--

Rick C.

++ Get 1,000 miles of free Supercharging
++ Tesla referral code - https://ts.la/richard11209
 
Toggle Sidebar

Welcome to EDABoard.com

Sponsor

Top