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

Symbiflow-classroom: Array Initializers Do Not Work #263

Open
nelsobe opened this issue Mar 8, 2022 · 4 comments
Open

Symbiflow-classroom: Array Initializers Do Not Work #263

nelsobe opened this issue Mar 8, 2022 · 4 comments

Comments

@nelsobe
Copy link
Contributor

nelsobe commented Mar 8, 2022

SYMBIFLOW-CLASSROOM-PROJECT

Using original Yosys frontend.

If SV code contains a legal array declaration and initialization like this:

      // Lookup table for % 3 calculation.
    logic[1:0] modmem[8] = '{0, 1, 2, 0, 1, 2, 0, 1};

a syntax error results. Arrays cannot be initialized this way with the tools (but it is legal SV and works with other tools).

@nelsobe
Copy link
Contributor Author

nelsobe commented Mar 9, 2022

@mithro @acomodi @tmichalak @mkurc-ant Would be interested in any feedback you can provide.

@rkapuscik
Copy link
Contributor

Could you provide more details on which tool are you using and with what options? I verified that UHDM plugin for yosys correctly parses this declaration - it is present in UHDM and in Yosys AST. I tested this using both Surelog to create UHDM file and read_verilog_with_uhdm in yosys with plugin.

On the other hand, using this in original yosys' verilog frontend does cause a syntax error:

yosys> read_verilog -sv tests/top.sv
1. Executing Verilog-2005 frontend: tests/top.sv
Parsing SystemVerilog input from `tests/top.sv' to AST representation.
tests/IncompleteTop/top.sv:6: ERROR: syntax error, unexpected OP_CAST

@nelsobe
Copy link
Contributor Author

nelsobe commented Mar 9, 2022

Using original Yosys frontend.

@jcrob2
Copy link

jcrob2 commented Jun 17, 2022

Using the following timestamp and hash, the issue still exists.
Timestamp: 20220606-234655
Hash: 1667c14

I've included a file that contains a list of the content/versions of the conda environment that we have.
conda_list.txt

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

No branches or pull requests

4 participants