Home > Community > Forums > Digital Implementation > How to get the database address of the subModule?

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: *

 How to get the database address of the subModule? 

Last post Sun, Feb 11 2007 11:23 PM by archive. 4 replies.
Started by archive 11 Feb 2007 11:23 PM. Topic has 4 replies and 1573 views
Page 1 of 1 (5 items)
Sort Posts:
  • Sun, Feb 11 2007 11:23 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    How to get the database address of the subModule? Reply

    In GUI design bowser, I can see the level ONE sub-module, I know dbgTopCell return the top level Module address. Now in my scripts, I need the database address of these cells, How can I get this ?


    Originally posted in cdnusers.org by aidans
    • Post Points: 0
  • Sun, Feb 11 2007 11:38 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to get the database address of the subModule? Reply

    I mean, How can we get the database address of these Level ONE sub-Module.


    Originally posted in cdnusers.org by aidans
    • Post Points: 0
  • Mon, Feb 12 2007 8:35 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to get the database address of the subModule? Reply

    It depends on whether you want to the pointer to the instantiation of the Level ONE sub-module -or- the master cell of the sub-module.

    If the Verilog netlist looks like this:

    module top(clk);
    input clk;
    wire net;
    a i_a(.clk(clk), .out(net));
    b i_b(.clk(clk), .in(net));
    endmodule

    module a(clk,out);
    input clk;
    output out;
    DFFX1 i0(.CK(clk), .Q(out));
    endmodule

    module b(clk, in);
    input clk;
    input in;
    DFFX1 i0(.CK(clk), .D(in));
    DFFX1 i1(.CK(clk), .D(in));
    endmodule

    Then you could access the instantiation of module a ("i_a") with this:

    encounter 2> set hinst [dbGetHInstByName i_a]
    0x15c06d84

    Or if you wanted to look at the master cell "a" you could access it like this:

    encounter 3> set cell [dbGetCellByName a]
    0x15964ec8

    Whether you work with the instantiation -or- the master cell depends on what data you're trying to access or manipulate. Feel free to follow-up with an additional post if further clarification would be useful.

    Hope this helps,
    Bob


    Originally posted in cdnusers.org by BobD
    • Post Points: 0
  • Mon, Feb 12 2007 9:00 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to get the database address of the subModule? Reply

    Thank you for your in-time response to my post.
    By dbGet*ByName do retrieve the DB address of the NAMED Objects. To use these kind of command, I must know the hierarchical topology of my verilog netlist, which means I must know the sub-modules’ name.

    Of cause I can open the Design Browser, and type the sub-modules’ name into my scripts. But this is not a good way to do things, since my scripts are also used by other Block-level designers. (we use hierachical design method to implement the back-end design flow), It’s better to get the sub-module names automatically.

    I come across this question while I writing scripts to get the sub-module related IO Pins.
    dbForEachCellFTerm [dbgTopCell] ftermPtr { } get all the PINs.
    If I use this scripts structure, I have lots of pain to decide which sub-module of particular PIN belongs to. So if I can get the Level ONE sub-module names, then I can report the IO Pins related to this sub-module in a neat way:
    dbForEachCellFTerm $subModuleCellPtr ftermPtr { }


    Originally posted in cdnusers.org by aidans
    • Post Points: 0
  • Wed, Feb 14 2007 4:53 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: How to get the database address of the subModule? Reply

    I got the answer


    dbForEachHInstHInst [dbCellHInst [dbgTopCell]] hinstPtr {
    if [dbIsHInstHInst $hinstPtr] {
    puts [dbHInstName $hinstPtr]
    }
    }


    Originally posted in cdnusers.org by aidans
    • Post Points: 0
Page 1 of 1 (5 items)
Sort Posts:
Started by archive at 11 Feb 2007 11:23 PM. Topic has 4 replies.