• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. SV Implementation of dynamic array of memory?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 64
  • Views 13897
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SV Implementation of dynamic array of memory?

archive
archive over 17 years ago

Hi Friends,
     I want to implement a buffer where I can insert & delete an element flexibly. What I mean to say is something similar to keyed list in specman, I want to implement in SV CB methodology using URM.
   I tried using dynamic memory but I failed creating "new address"(suppose address as my key) for every element I want to add at every other instant of time.

rand int buffer[];
int j = 0;

task ins_element(input [31:0] data);
buffer[j] = new;
buffer[j] = data;
j++;
endtask

Note:  I don't want STACK or FIFO type of implementation here where the array length of memory is static

Here the error is "The function new cannot be used to creat an object to assign to this variable"
Can anyone help me in this regards so as to suggest me how to proceed?

Thanks in advance,
Jalli


Originally posted in cdnusers.org by jaally
  • Cancel
Parents
  • archive
    archive over 17 years ago

    Hi Divyesh,

    Thanks a lot. It did work but I wanna know which book you referred for this so that I can follow the same for SV usage.

    Thanks again,
    Regards,
    Jalli


    Originally posted in cdnusers.org by jaally
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 17 years ago

    Hi Divyesh,

    Thanks a lot. It did work but I wanna know which book you referred for this so that I can follow the same for SV usage.

    Thanks again,
    Regards,
    Jalli


    Originally posted in cdnusers.org by jaally
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information