Jump to content

Is it possible to use `defines in IPXACT


PrashanthP

Recommended Posts

Hello. 

I have a use case where in i wanted to define the range of memory to be macro dependent.

so that i dont have to evaluate the XML file again and again.

For example ,

<ipxact:addressBlock>

    <ipxact:baseAddress>1000</ipxact:baseAddress>

    <ipxact:Range>`MACRO*'h10</ipxact:Range>

....

....

</ipxact:addressBlock>

So with this macros i need not rerun the XML for changing the field Range.

is it possible to use `defines in IPXACT. Or any alternative solutions.

Link to comment
Share on other sites

@PrashanthP are you describing your design hierarchically in IP-XACT, or just generating leaf-level RTL?

I'm not sure what you mean by needing to re-generate your SV code, unless your tooling doesn't support generating parameterized RTL. It'll depend on the vendor, but if you declare a moduleParameter in your component/componentInstantiation, that can be used by RTL generators to create parameterized RTL modules from the IP-XACT. Something like this:

 

<component>
  <model>
    <instantiations>
      <componentInstantiation>
        <moduleParameters>
          <moduleParameter>
            <name>RANGE_PARAM</name>
            <value>RANGE_PARAM</value>
          </moduleParameter>
        </moduleParameters>
      </componentInstantiation>
    </instantiations>
  </model>
  <!-- ... -->
  <parameters>
    <parameter parameterId="RANGE_PARAM" resolve="user">
      <name>RANGE_PARAM</name>
      <value>20</value>
    </parameter>
  </parameters>
</component>

At least, that's one way I've seen it done. I really have no idea what number of RTL generators actually create parameterized RTL.

Link to comment
Share on other sites

Hi Jason.

We are using xml file to generate register model from testbench standpoint.

my usecase is to define the depth of the memory parameterizable. When the paramter values are contolled from Testbench and not from the parameter field called "value".

If it is controlled from "value" field, every time i change the paramter value, i have to rerun the xml file for generating system verilog files(.sv files) which i don't need.

When we run xml file which has memory configuration, it will create below class definition 

class my_mem extends uvm_mem;

`uvm_object_utils(my_mem)

function new (input string name ="mem_class");

super.new(name,<field Range>,<field width>,<access _policy>,coverage); // super.new(name,'h40,8,"RW",coverage);

//i wanted is -> super.new(name,paramter_name*'h10,8,"RW",coverage); where paramter_name is controlled from TB

ednfunction

endclass

I just wanted to control the field "Width" from testbench. If i can then i need not run xml file again to generate memory with other depth. I will simply control it from TB.

If there is a possiblity please let me know.

Thanks and Regards,

Prashanth

Link to comment
Share on other sites

Got it, yes, your UVM RAL generator also needs to support parameterization. From what you are showing, the generator you are using doesn't support generating "parameterized" models. Again, I don't know how many, if any, of the big vendor companies support that, but it's certainly doable if you own the generator. You can use parameterized classes, though that is not required. You can also add instance attributes to the uvm_* classes which hold parameter values. The implementation is beyond the scope of this forum, but I have seen RAL models generated from IP-XACT which have "configurable" classes to align with the parametrizable register module RTL.

TL;DR
IP-XACT can capture the parameterization information, but your UVM RAL generator needs to support creation of configurable classes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...