Home > Community > Forums > Functional Verification > Using Dynamically Allocated Memories (PLI)

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

 Using Dynamically Allocated Memories (PLI) 

Last post Fri, Jun 15 2012 1:47 PM by tpylant. 4 replies.
Started by MVERMA 16 May 2012 03:13 AM. Topic has 4 replies and 4099 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, May 16 2012 3:13 AM

    • MVERMA
    • Not Ranked
    • Joined on Thu, Mar 15 2012
    • Posts 8
    • Points 130
    Using Dynamically Allocated Memories (PLI) Reply

    Hi 

    I am using cadence's pli for dynamically allocated memories. 

    for system tasks:

    damem_inith - there is one argument which needs file name in the following format:

    "bin.dat". 

    I would like to replace it by dynamic file name i.e <seed>.dat. So for each random test it will look for filename as <seed> .dat

    Is it possible with this system tasks?

     

    Thanks!

    • Post Points: 5
  • Wed, Jun 6 2012 11:46 PM

    • MVERMA
    • Not Ranked
    • Joined on Thu, Mar 15 2012
    • Posts 8
    • Points 130
    Re: Using Dynamically Allocated Memories (PLI) Reply

     Anyone who can help me out?

    • Post Points: 20
  • Thu, Jun 7 2012 8:14 AM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    Re: Using Dynamically Allocated Memories (PLI) Reply

    Try $value$plusargs(user_string, variable).

    This system function searches the list of plusargs on the command line for a specified string. The string is specified as the first argument to the system function. If the string is found, the remainder of the string (that is, the part of the string after the portion that matches the user_string) is converted into the specified format, and the resulting value is stored in the specified variable. For example:

    reg [8*32:1] testname

    ...

    if ($value$plusargs("TESTNAME=%s", testname))

      begin

        $display("Running test %0s.", testname);

        startTest();

      end

    If you invoke the simulator with the following command line, the variable testname gets the value good_test.

    % ncsim +TESTNAME=good_test [other_options] snapshot_name

    See 'cdnshelp' or Section 17.10.2 of the IEEE 1364-2001 standard for details on $value$plusargs.

    • Post Points: 20
  • Thu, Jun 7 2012 11:26 PM

    • MVERMA
    • Not Ranked
    • Joined on Thu, Mar 15 2012
    • Posts 8
    • Points 130
    Re: Using Dynamically Allocated Memories (PLI) Reply

     Hi tpylant,

    I am looking for following PLI function:

    $damem_inith("eep_mem", "101.dat", 0, MEMSIZE-1);

    In the above function, 101.dat file fixed here but I need this to be dynamic means instead of 101, can we use the passing seed value here?

     

    Thanks!

    • Post Points: 20
  • Fri, Jun 15 2012 1:47 PM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    Re: Using Dynamically Allocated Memories (PLI) Reply

    That function is available at <install_dir>/tools/inca/examples/pli/damem.

     Tim

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by MVERMA at 16 May 2012 03:13 AM. Topic has 4 replies.