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

Fix some syntax errors #45

Open
wants to merge 3 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Switch "const" and "rand" modifier order

The current Yosys only accepts the order: rand const
The other way round results in:
	ERROR: syntax error, unexpected TOK_RAND

And "rand const" is also the way they show it in their README:
https://github.com/YosysHQ/yosys/blob/master/README.md#non-standard-or-systemverilog-features-for-formal-verification
  • Loading branch information
leonschoorl committed Jan 26, 2021
commit 96ddaa0e0167ad10b4953ed39b123eed26f52ea0
@@ -18,7 +18,7 @@
print("")
print("`ifdef YOSYS")
print("`define rvformal_rand_reg rand reg")
print("`define rvformal_const_rand_reg const rand reg")
print("`define rvformal_const_rand_reg rand const reg")
print("`else")
print("`ifdef SIMULATION")
print("`define rvformal_rand_reg reg")
@@ -2,7 +2,7 @@

`ifdef YOSYS
`define rvformal_rand_reg rand reg
`define rvformal_const_rand_reg const rand reg
`define rvformal_const_rand_reg rand const reg
`else
`ifdef SIMULATION
`define rvformal_rand_reg reg
@@ -141,7 +141,7 @@ For formal verification with Yosys (i.e. when `YOSYS` is defined), this will be
converted to the following code:

rand reg [7:0] anyseq;
const rand reg [7:0] anyconst;
rand const reg [7:0] anyconst;

For simulation (i.e. when `SIMULATION` is defined), this will be converted to:

ProTip! Use n and p to navigate between commits in a pull request.