Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for enumerated type ".name" method? #848

Closed
veripoolbot opened this issue Nov 24, 2014 · 7 comments
Closed

Support for enumerated type ".name" method? #848

veripoolbot opened this issue Nov 24, 2014 · 7 comments
Assignees
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jonathon Donaldson
Original Redmine Issue: 848 from https://www.veripool.org
Original Date: 2014-11-24
Original Assignee: Wilson Snyder (@wsnyder)


Any chance of getting support for the SV enumerated type ".name" method? I use it a ton when printing out debug info, most especially for printing out CPU trace logs that have enumerated opcodes. Here's a simple example shown in 1800-2012 section 6.19.5.7:

typedef enum{ red, green, blue, yellow } Colors;
Colors c = c.first;

forever begin
  $display( "%s : %d\n", c.name, c );
  if( c == c.last ) break;
  c = c.next;
end

I don't care at all about support for .first/.last/.next, they just used it in their example. But having support for .name would be sweet.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-25T14:18:02Z


You only want the hardest one! That's because string support is pretty weak at present. Let me look into if there's enough string support or it can be made close enough, as I assume you only want to pass the .name to a display as you showed?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathon Donaldson
Original Date: 2014-11-25T17:52:43Z


Haha, sorry. :) Yes, I only want be able to pass .name as a string to one of the system task print functions like $display/$write.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-11-29T01:35:33Z


Fixed in git towards 3.867. There's a lot of new code behind this, so expect a few bugs when you try it out.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathon Donaldson
Original Date: 2014-11-29T01:38:49Z


Too cool!! I've got lots of designs that can stress this feature really well so I will be able to provide feedback to you in short order. Thanks so much!! I'm gonna test it out right now...

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-12-20T21:52:15Z


In 3.868.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-12-20T21:53:44Z


In 3.868.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-12-20T21:54:43Z


In 3.868.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants