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

Generation of "mem_2.init" is non-deterministic #1108

Closed
tcal-x opened this issue Nov 19, 2021 · 2 comments
Closed

Generation of "mem_2.init" is non-deterministic #1108

tcal-x opened this issue Nov 19, 2021 · 2 comments
Labels

Comments

@tcal-x
Copy link
Collaborator

tcal-x commented Nov 19, 2021

Observed with the Arty A7-35T board. It seems that mem_2 is the storage for SoC CSRs.

Each time I run litex_boards/targets/digilent_arty.py, a few bytes towards the end of mem_2.init change:

$ ./digilent_arty.py >& /dev/null
$ sum build/digilent_arty/gateware/mem_2.init
20800     1
$ ./digilent_arty.py >& /dev/null
$ sum build/digilent_arty/gateware/mem_2.init
05960     1
$ ./digilent_arty.py >& /dev/null
$ sum build/digilent_arty/gateware/mem_2.init
56127     1

The problem is that this small change in turn causes different behavior downstream in Yosys when using SymbiFlow.

@enjoy-digital
Copy link
Owner

This is probably related to the identifier version (with the time of the build), you can disable it by setting ident_version to False: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc_core.py#L102

@tcal-x
Copy link
Collaborator Author

tcal-x commented Nov 19, 2021

In this case, I needed to add the flag --no-ident-version:

$ ./digilent_arty.py --no-ident-version >& /dev/null
$ sum build/digilent_arty/gateware/mem_2.init 
54933     1
$ ./digilent_arty.py --no-ident-version >& /dev/null
$ sum build/digilent_arty/gateware/mem_2.init 
54933     1

Thanks!

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

No branches or pull requests

2 participants