Home > Community > Forums > Functional Verification > Testbench with non-unique module names in sub-blocks

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Testbench with non-unique module names in sub-blocks 

Last post Wed, Apr 14 2010 1:13 PM by StephenH. 2 replies.
Started by mattyc 14 Apr 2010 06:10 AM. Topic has 2 replies and 3215 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, Apr 14 2010 6:10 AM

    • mattyc
    • Not Ranked
    • Joined on Fri, Apr 17 2009
    • Posts 2
    • Points 55
    Testbench with non-unique module names in sub-blocks Reply

    I have a testbench where I am trying to simulate two separate designs that share some module names within their designs.  For example, one is a bus controller and the other is bus master and each has a module named InterfaceIo.  When I try to simulate there is a conflict of multiple modules with the same name.  I have tried compiling and elaborating them separately and then referencing the libraries but I still get the error.  Is there a way to black-box a module or to get around the conflict I am experiencing?  Note that this is an overly simple example of the conflict in names so please don't respond with "just change the names!"  This doesn't seem like it should be so difficult but I am not figuring out how to get things going.  Any help will be greatly appreciated!

    Filed under: , ,
    • Post Points: 35
  • Wed, Apr 14 2010 10:52 AM

    • muffi
    • Top 500 Contributor
    • Joined on Tue, Aug 4 2009
    • Bangalore, Karnataka
    • Posts 22
    • Points 305
    Re: Testbench with non-unique module names in sub-blocks Reply
    If you are using irun, adding -allowredefinition allows irun to compile and take the second module encountered.
    • Post Points: 5
  • Wed, Apr 14 2010 1:13 PM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 278
    • Points 4,450
    Re: Testbench with non-unique module names in sub-blocks Reply

    Hi.

    I assume that you're talking about Verilog rather than VHDL here!

    It sounds like you are looking for the functionality provided by the "libmap" which is Verilog's equivalent to VHDL configurations.

    You provide a libmap file to the compiler (ncvlog/ncelab or irun) which tells it which *.v files go into which compiled libraries, and also which instances use which modules/libraries.

    I've not used it much myself, but it's well enough documented that you should be able to find your way.
    Fire up cdnshelp, and search for \-libmap (note: the back-slash is needed in front of the dash).

    Good luck!

    Steve.

    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by mattyc at 14 Apr 2010 06:10 AM. Topic has 2 replies.