F
fl
Guest
Hi,
I have a Matlab generated VHDL code project. It has such functions defined in
the testbench package. I am just curious about why these looks frequent used
functions need to write in such a project. It makes the test bench file very
long, not friendly reading to me.
Are there some similar functions out there accessible to me? Or, is there
some reasons left to the designer to do by themselves?
Thanks,
-- Functions
FUNCTION to_integer( x : IN std_logic) RETURN integer;
FUNCTION to_hex( x : IN std_logic) RETURN string;
FUNCTION to_hex( x : IN std_logic_vector) RETURN string;
FUNCTION to_hex( x : IN bit_vector ) RETURN string;
FUNCTION to_hex( x : IN signed ) RETURN string;
FUNCTION to_hex( x : IN unsigned ) RETURN string;
FUNCTION to_hex( x : IN real ) RETURN string;
FUNCTION SLICE( x : IN bit_vector; slice : In Integer) RETURN std_logic_vector;
I have a Matlab generated VHDL code project. It has such functions defined in
the testbench package. I am just curious about why these looks frequent used
functions need to write in such a project. It makes the test bench file very
long, not friendly reading to me.
Are there some similar functions out there accessible to me? Or, is there
some reasons left to the designer to do by themselves?
Thanks,
-- Functions
FUNCTION to_integer( x : IN std_logic) RETURN integer;
FUNCTION to_hex( x : IN std_logic) RETURN string;
FUNCTION to_hex( x : IN std_logic_vector) RETURN string;
FUNCTION to_hex( x : IN bit_vector ) RETURN string;
FUNCTION to_hex( x : IN signed ) RETURN string;
FUNCTION to_hex( x : IN unsigned ) RETURN string;
FUNCTION to_hex( x : IN real ) RETURN string;
FUNCTION SLICE( x : IN bit_vector; slice : In Integer) RETURN std_logic_vector;