Menu

#6 Allow $dumpvars to dump a register array entry

closed
nobody
5
2007-11-08
2007-01-20
No

While I can understand not wanting $dumpvars to dump register arrays and memories by default, there is no way to get dumpvars to dump anything related to the following declaration:

reg [15:0] rf[0:7];

It would be useful if, at least,
$dumpvars(0, rf[0]);

did something useful.

Discussion

  • Cary R.

    Cary R. - 2007-10-01

    Logged In: YES
    user_id=1651735
    Originator: NO

    The standard states that $dumpvars() only takes module and variable identifiers. To properly add this enhancement we will likely need the functionality from pr1780480 whenever it is available.

     
  • Cary R.

    Cary R. - 2007-10-01

    Logged In: YES
    user_id=1651735
    Originator: NO

    I forgot to mention earlier that a work around is to use a continuous assignment like was stated in pr1780480.

     
  • Cary R.

    Cary R. - 2007-11-08

    Logged In: YES
    user_id=1651735
    Originator: NO

    The attached patch adds this functionality. The array words must be specified in a $dumpvars() statement (they are not dumped by default). The name used for the word is <array name>_<index>, so name collisions are possible. Icarus and GTKWave seem to handle this OK, but given this is outside the capabilities of the file format problems may occur. An example file is also included.
    File Added: pr1639996.zip

     
  • Cary R.

    Cary R. - 2007-11-08
    • labels: --> Source Language Extensions
    • milestone: --> devel_(Next_Release)
    • status: open --> closed
     
  • Cary R.

    Cary R. - 2007-11-08

    Patch and example file

     
  • Cary R.

    Cary R. - 2007-11-21

    Logged In: YES
    user_id=1651735
    Originator: NO

    I reworked the original patch a bit (the name is an escaped identifier <array name>[<index>]) and fixed one problem (arrays are not zero based, but their internal index is).

    You will also want to apply the "Prefix escaped identifiers ..." patch to avoid some problems in the VCD output with respect to escaped identifiers.
    File Added: 0001-Add-the-ability-to-dump-array-words.patch

     
  • Cary R.

    Cary R. - 2007-11-21

    Patch file

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.