procedure and function in VHDL

Guest #5212284
1
procedure CNT (variable X : in bit_vector (0 to 2);
2
               variable N, Z : out bit_vector (0 to 1));
3
CNT (Z => M_V, X => K_V, N => L_V);
How can an objects M_V, K_V, L_V be declared?
what kind of type should they be?
1
procedure receive (signal data : in bit; signal clock : in bit;
2
                   buffer : out array);
3
receive (recovered_data, racovered_clock, packet_array);
How can an objects recovered_data, racovered_clock, packet_array be 
declared?
what kind of type should they be?
1
procedure increment (a : inout word32; by : in word32 := X"0000_0001");
2
increment (a => open, by => word);
How can an object word be declared?
what values will the parameters a and by receive at the specified access 
to the procedure?
1
function limit (value, min, max : integer) return integer;
2
new_speed := old_speed + scale_factor * limit (error, min_value, +10);
How can an objects error, min_value be declared?
what values will the parameters value, min, max with the specified use 
of the function?

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.