M
Maki - (Remove 123 to mai
Guest
Hello all,
I'm trying to code a function that initialize some vars from a file.
Function should reside in separate package and my intention is to use it for
different size and width of return type without manual correction whenever
design changes.
Something like:
load_hex_from_file(file_name:string; depth,bits:natural) return
2d_array_type;
2d_array_type should be parametrizable and should inherit type from variable
that receives data.
Do You have an idea how to accomplish this without special (custom) type
conversion functions?
At the moment variable in a separate package that needs init is defined like
this:
type ram_memory is array (0 to (2**(depth+1))-1) of std_logic_vector(bits-1
downto 0);
Any ideas?
Best regards,
M.
--
M. Veselic
Sigma Lab.
I'm trying to code a function that initialize some vars from a file.
Function should reside in separate package and my intention is to use it for
different size and width of return type without manual correction whenever
design changes.
Something like:
load_hex_from_file(file_name:string; depth,bits:natural) return
2d_array_type;
2d_array_type should be parametrizable and should inherit type from variable
that receives data.
Do You have an idea how to accomplish this without special (custom) type
conversion functions?
At the moment variable in a separate package that needs init is defined like
this:
type ram_memory is array (0 to (2**(depth+1))-1) of std_logic_vector(bits-1
downto 0);
Any ideas?
Best regards,
M.
--
M. Veselic
Sigma Lab.