EmbDev.net

Forum: FPGA, VHDL & Verilog Use of function and packages in testbench


von Raghavendra B. (raghavendra_b98)


Rate this post
useful
not useful
Hi,
I written VHDL function as package,how to use that function in testbench 
code.
function to_max(a, b : integer) return integer is
  variable output :integer;
  begin
if (a > b)then
 output := a;
  return output ;
  else
output := b;
  return output;
  end if;
Thanks in advance

Regards
Raghvendra

von Duke Scarring (Guest)


Rate this post
useful
not useful
Declare it:
1
library my_library;
2
use my_library.my_package.to_max;

Duke

von Raghavendra B. (raghavendra_b98)


Rate this post
useful
not useful
Thanks for reply..i done that declaration part..my problem is how to 
give input to a and b .

von berndl (Guest)


Rate this post
useful
not useful
<glasshouse on>
... and you expect a usefull info or solution with the input that you 
gave...?
<glasshouse off>

von Raghavendra B. (raghavendra_b98)


Rate this post
useful
not useful
Thanks for your reply.I need soluation for inputs along with useful 
information.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.