chipsalliance/f4pga-examples

Typedef Enum Width Default to one bit

westonMS opened this issue · 6 comments

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

Same issue from earlier with a different fix.

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

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

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.

FYI - @kgugala

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.