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

Typedef Enum Width Default to one bit #311

Closed
westonMS opened this issue May 31, 2022 · 6 comments
Closed

Typedef Enum Width Default to one bit #311

westonMS opened this issue May 31, 2022 · 6 comments

Comments

@westonMS
Copy link

Using the Surelog parser, when initializing an enum, if a width is not set it defaults to one bit.
The bitstream is generated but is faulty.

Works:

    typedef enum {S_INIT, S_LOOP1,
                    S_LOOP2_readSi, S_LOOP2_readSj, S_LOOP2_write,
                    S_LOOP3_init, S_LOOP3_readSi, S
[decrypt_rc4.zip](https://github.com/chipsalliance/f4pga-examples/files/8808581/decrypt_rc4.zip)
_LOOP3_readSj, S_LOOP3_writeSi, S_LOOP3_writeSj, S_LOOP3_readK,
                    S_update_text_out,
                    S_DONE} StateType;
    StateType [4:0] cs;

Original does not work:
decrypt_rc4.zip

    typedef enum {S_INIT, S_LOOP1,
                    S_LOOP2_readSi, S_LOOP2_readSj, S_LOOP2_write,
                    S_LOOP3_init, S_LOOP3_readSi, S_LOOP3_readSj, S_LOOP3_writeSi, S_LOOP3_writeSj, S_LOOP3_readK,
                    S_update_text_out,
                    S_DONE} StateType;
    StateType cs;

This was run with the SURELOG_CMD='-parse -DSYNTHESIS' make

Error did not occur running with make

@westonMS
Copy link
Author

Same issue from earlier with a different fix.

@rkapuscik
Copy link
Contributor

Thanks for reporting, I reproduced this and we'll look into it.

@rkapuscik
Copy link
Contributor

This should be already fixed, please update the plugin to the newest version as described here to verify.

@westonMS
Copy link
Author

We have re-tested this with the latest plugin and the design works now. However, we want fixes to be available to all users when they use the main install. I re-installed the tool-chain with the latest install instructions and this is not fixed without manually updating the plugin.

@mithro
Copy link
Contributor

mithro commented Jul 16, 2022

FYI - @kgugala

@tmichalak
Copy link
Collaborator

Hi @westonMS we are working on a conda_lock_update mechanism that is already used in arch-defs to update the versions of the packages in the conda environment. Basically we update the conda_lock.yml file using a dedicated GH workflow that opens PRs with the new versions. The conda_lock.yml is used as the conda environment YAML in the Makefile. We will let you know once we finish up and merge this PR.

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

5 participants