EmbDev.net

Forum: FPGA, VHDL & Verilog procedure and function in VHDL


Author: Dimas (Guest)
Posted on:

Rate this post
0 useful
not useful
procedure CNT (variable X : in bit_vector (0 to 2);
               variable N, Z : out bit_vector (0 to 1));
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?
procedure receive (signal data : in bit; signal clock : in bit;
                   buffer : out array);
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?
procedure increment (a : inout word32; by : in word32 := X"0000_0001");
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?
function limit (value, min, max : integer) return integer;
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?

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Dimas wrote:
> How can an objects M_V, K_V, L_V be declared?
> what kind of type should they be?
Make some suggestions, then we discuss them. But don't think someone 
will simply do your homework...

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig