B
blaise.mulliez
Hello all.
I'm having trouble with my implementation (it's actually VHDL-AMS, but I think my issue does not come from th "-AMS" part).
Here is what I am trying to do :
- I have a testbench file, in which I instanciate a top module.
- In this top module, I instanciate a couple of smaller modules, including one containing many different architectures.
I want to chose the implemented architecture thanks to an argument specified in the testbench file.
What I tried :
- in the testbench file, declaring a string matching one of the architecture and sending it to the top module as a generic.
- in the top module, I created a generic string and used it to instanciate my smaller module.
With some extremely simplified code :
-- test bench --
[...]
ARCHTECTURE beh OF tb_top is
[...]
system : ENTITY top(beh)
GENERIC MAP("arch_name") -- arch_name is a real architecture name of module
[...]
-- top --
ENTITY top IS
GENERIC(example : string)
[...]
ARCHITECTURE beh OF top IS
[...]
module_1 : ENTITY module(example)
[...]
I can compile my different files just fine, but when I try to simulate, thesoftware cannot build my system, and tells me that the architecture example of module does not exist. And it is correct : it is the architecture arch_name I want to use. But it seems the argument cannot go all the way through the hierarchy.
Do you know :
1- if it is doable ?
2- what the syntax is ?
Thank you in advance.
Basil1402
I'm having trouble with my implementation (it's actually VHDL-AMS, but I think my issue does not come from th "-AMS" part).
Here is what I am trying to do :
- I have a testbench file, in which I instanciate a top module.
- In this top module, I instanciate a couple of smaller modules, including one containing many different architectures.
I want to chose the implemented architecture thanks to an argument specified in the testbench file.
What I tried :
- in the testbench file, declaring a string matching one of the architecture and sending it to the top module as a generic.
- in the top module, I created a generic string and used it to instanciate my smaller module.
With some extremely simplified code :
-- test bench --
[...]
ARCHTECTURE beh OF tb_top is
[...]
system : ENTITY top(beh)
GENERIC MAP("arch_name") -- arch_name is a real architecture name of module
[...]
-- top --
ENTITY top IS
GENERIC(example : string)
[...]
ARCHITECTURE beh OF top IS
[...]
module_1 : ENTITY module(example)
[...]
I can compile my different files just fine, but when I try to simulate, thesoftware cannot build my system, and tells me that the architecture example of module does not exist. And it is correct : it is the architecture arch_name I want to use. But it seems the argument cannot go all the way through the hierarchy.
Do you know :
1- if it is doable ?
2- what the syntax is ?
Thank you in advance.
Basil1402