The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2019, 8:41pm
Pages: 1
Send Topic Print
Architecture name through hierarchy (Read 2905 times)
Basil1402
New Member
*
Offline



Posts: 1

Architecture name through hierarchy
Mar 29th, 2013, 9:06am
 
Hello all.

I'm having trouble with my implementation.

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 (say arch_name) 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)
    [...]

The "vacom" command works fine, but when I try "vasim", it cannot build my system, and Questa tells me that the architectureexample of module does not exist. And it is correct : it is the architecture arch_name I want to use. But it seems it 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
Back to top
 
 
View Profile   IP Logged
jerome_ams
Community Member
***
Offline



Posts: 36

Re: Architecture name through hierarchy
Reply #1 - Aug 20th, 2013, 7:29am
 
Hi,

The usual way to deal with such a thing is to use configuration files. In such a file you declare the particular architecture you want to bind for your particular setup.
Hope it helps
Cheers
Jerome
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2019 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.