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

SV RTL support for local for loops #118

Open
lighteningfingers opened this issue Nov 13, 2020 · 0 comments
Open

SV RTL support for local for loops #118

lighteningfingers opened this issue Nov 13, 2020 · 0 comments

Comments

@lighteningfingers
Copy link

lighteningfingers commented Nov 13, 2020

I am trying the following RTL (a simple memory equivalence with clockgating):

always_ff @(posedge clk_g or posedge rst)
if (rst) begin
for (int i=0;i<16;i++) mem[i] <= 'd0;
out <= 'd0;
end
else if (clk_en) begin
if (wr) mem[addr] <= din;
else if (rd) out <= mem[addr];
end

I get the following error:
SBY 8:48:18 [memory_equiv_async] nomem: memory_equiv_async.sv:77: ERROR: syntax error, unexpected TOK_INT, expecting TOK_ID or ATTR_BEGIN or '{'

Are SV local var "for loops" supported like in the context above, for shorthand async reset of arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant