The Designer's Guide Community
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 22nd, 2024, 3:51pm
Pages: 1
Send Topic Print
Architecture name through hierarchy (Read 175 times)
New Member

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 --
    GENERIC(example : string)
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.

Back to top
View Profile   IP Logged
Community Member

Posts: 36

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

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
Back to top
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 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 Consider submitting a paper or model.