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

Cannot define real values in macros when using underscore #863

Closed
veripoolbot opened this issue Dec 19, 2014 · 3 comments
Closed

Cannot define real values in macros when using underscore #863

veripoolbot opened this issue Dec 19, 2014 · 3 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Dec 19, 2014


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


I discovered a very minor bug in verilator related to real values. You cannot define a real number using a macro if you also use underscores.

For example, the following macro works:

`define D_CLK_FREQ 100000000.0

But the following macro generates a parsing error when used somewhere in the design:

`define D_CLK_FREQ 100_000_000.0

The error message is:

%Error: t_real_macro.v:10: Syntax error parsing real: 100000000.0

I have attached an example in test_regress format.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 19, 2014


Original Redmine Comment
Author Name: Jonathon Donaldson
Original Date: 2014-12-19T05:17:59Z


Sorry, so this is not actually specific to macros. I was just using macros in my original design. It's actually just a problem with real-type numeric literals. I have fixed the test case. Sorry for the confusion.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 19, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-12-19T23:15:46Z


Fixed in git towards 3.867.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 20, 2014


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


In 3.868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.