Home > Community > Forums > Logic Design > naming style for generate statement in RTL

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

 naming style for generate statement in RTL 

Last post Thu, Dec 10 2009 9:03 AM by angelster. 5 replies.
Started by diablo 25 Nov 2009 09:46 AM. Topic has 5 replies and 4157 views
Page 1 of 1 (6 items)
Sort Posts:
  • Wed, Nov 25 2009 9:46 AM

    • diablo
    • Top 100 Contributor
    • Joined on Thu, Aug 14 2008
    • fargo, ND
    • Posts 77
    • Points 1,255
    naming style for generate statement in RTL Reply

     I have a generate statement in my verilog RTL.

     generate
            for(g=0; g<num_reg; g=g+1) begin

                wb_reg #(._address(reg_addr[g*_width+:_width]), ._default(reg_default[g*_width+:_width]),
                        ._bit_mask(reg_bit_mask[g*_width+:_width]), ._autoclr(reg_autoclr[g*_width+:_width])) wb_regs (
                    .CLK_I(CLK_I),
                    .RST_N_I(RST_N_I),
                    .TEST_EN_I(TEST_EN_I),
                    .ADR_I(SADR_I),
                    .DAT_I(SDAT_I),
                    .DAT_O(dat_o[g]),
                    .ACK_O(ack_o[g]),
                    .CYC_I(SCYC_I),
                    .STB_I(SSTB_I),
                    .WE_I(SWE_I),
                    .REG_SEL_O(reg_sel_o[g]),
                    .REG_DATA_O(reg_data_o[g]),
                    .REG_DATA_I(ro_data[g*_width+:_width]),
                    .REG_UPDATE_I(reg_update_i[g]));
            end
        endgenerate

    After synthesizing with RC 8.1, the netlist generated for this block has following naming style.

     wb_reg__address8h03__default8h08__bit_mask8h8f__autoclr8hff\genblk1[0].wb_regs

    Same naming sytle is in SDF file generated for this design using write_sdf  -design foo -version "OVI 3.0" -delimiter "/" > ${_OUTPUTS_PATH}/${DESIGN}_netlist.sdf . 

    The problem is "." before wb_regs is causing syntax issue when running simulation using SDF file. The error is

     ncsdfc: *E,SDFIRE: "../../../synthesis/foo/outputs/foo_netlist.sdf", line 50115: Syntax error ".".
    ncelab: *W,SDFCNC: Cannot compile SDF file, ../../../synthesis/foo/outputs/foo_netlist.sdf - skipping annotation.

    I have tried 

     set_attribute hdl_array_naming_style "%s_%d"
    set_attribute hdl_array_generator "%s_%d"
    set_attribute hdl_reg_naming_style "%s_reg%s"

    in synthesis scripts but none of these fix the problems.

    Is there a certain attribute related to module generate naming style that may fix the problem. Pls suggest.

    Thanks for your time. 

     

    Filed under:
    • Post Points: 35
  • Wed, Nov 25 2009 10:04 AM

    • grasshopper
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Chelmsford, MA
    • Posts 241
    • Points 3,200
    Re: naming style for generate statement in RTL Reply

     Hi Diablo,

     in RC91 you can use the following

       attribute name: hdl_generate_index_style
              category: elab (controls elaboration)
           object type: root
           access type: read-write
             data type: string
         default value: %s[%d]
                  help: Format of 'for generate' block labels.

        attribute name: hdl_generate_separator
              category: elab (controls elaboration)
           object type: root
           access type: read-write
             data type: string
         default value: .
                  help: String used to separate generate block labels.
       

    I am not sure if RC81 also had these

    gh-

    • Post Points: 20
  • Wed, Nov 25 2009 10:39 AM

    • diablo
    • Top 100 Contributor
    • Joined on Thu, Aug 14 2008
    • fargo, ND
    • Posts 77
    • Points 1,255
    Re: naming style for generate statement in RTL Reply

    Thanks gh. I appreciate your help. It worked  after using those two attributes.  

    • Post Points: 5
  • Fri, Nov 27 2009 1:10 PM

    • mclarke
    • Top 500 Contributor
    • Joined on Wed, Jan 7 2009
    • Keswick, Ontario
    • Posts 16
    • Points 215
    Re: naming style for generate statement in RTL Reply

     Hi diablo,

       Three other attributesare used to control the naming style for generate statements in RC

    # Specifies whether 'if' generate labels should be used to prefix instances, default true, allowed [ true | false ]

    set_attr hdl_use_if_generate_prefix           false    /

    # Specifies whether 'for' generate labels should be used to create instance names, default true, allowed [ true | false ]

    set_attr hdl_use_for_generate_prefix          false    /

    # String used to separate generate block labels, default "."

    set_attr hdl_generate_separator                  ""    /
     

    • Post Points: 20
  • Sat, Nov 28 2009 2:33 PM

    • diablo
    • Top 100 Contributor
    • Joined on Thu, Aug 14 2008
    • fargo, ND
    • Posts 77
    • Points 1,255
    Re: naming style for generate statement in RTL Reply

     Thanks mclarke, this is even more helpful.

    • Post Points: 20
  • Thu, Dec 10 2009 9:03 AM

    • angelster
    • Not Ranked
    • Joined on Thu, Dec 10 2009
    • <?xml version="1.0" encoding="utf-16"?><string>Kansas City, KS</string>
    • Posts 1
    • Points 5
    Re: naming style for generate statement in RTL Reply

     Badly needed this2 attributes, glad to find it here..thanks 

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by diablo at 25 Nov 2009 09:46 AM. Topic has 5 replies.