P
pvwa
Hi,
i have the following (maybe strange) problem:
My design is very modular and will be configured by a setup file
(pkg)! This setup file defines wether specific modules are generated
or not.
For a special reason only the generated modules should now become an
individual (increasing) number as an address, e.g. in a generic! This
is only for configuration!!
I am thinking of a kind of a function with a "Global Variable" there,
which is intialized (to 0) at the beginning and increased by one every
time a module is instanciated (the function called)!! This is easy in
a procedural language but i can not find any construction in VHDL,
which could do this.
function NextAddress() return integer is
global variable addr : integer := 0;
begin
addr := addr+1;
return addr;
end;
I know this function does not work, but do you know a solution?
I already thought of shared variables, pointers (are these supported
in synthesis?) and File I/O. But nothing works?
Thanks ahead for any clue
Peter
i have the following (maybe strange) problem:
My design is very modular and will be configured by a setup file
(pkg)! This setup file defines wether specific modules are generated
or not.
For a special reason only the generated modules should now become an
individual (increasing) number as an address, e.g. in a generic! This
is only for configuration!!
I am thinking of a kind of a function with a "Global Variable" there,
which is intialized (to 0) at the beginning and increased by one every
time a module is instanciated (the function called)!! This is easy in
a procedural language but i can not find any construction in VHDL,
which could do this.
function NextAddress() return integer is
global variable addr : integer := 0;
begin
addr := addr+1;
return addr;
end;
I know this function does not work, but do you know a solution?
I already thought of shared variables, pointers (are these supported
in synthesis?) and File I/O. But nothing works?
Thanks ahead for any clue
Peter