chipsalliance / Cores-VeeR-EL2

VeeR EL2 Core
https://chipsalliance.github.io/Cores-VeeR-EL2/html/
Apache License 2.0
243 stars 73 forks source link

Fix quickstart with verilator #80

Closed Risto97 closed 1 year ago

Risto97 commented 1 year ago

Just a small change to make sure that following the quick start does not end in error with Verilator.

mgielda commented 1 year ago

By the way, thanks @Risto97 for the contribution!

Risto97 commented 1 year ago

Well I tried with the -Wfuture flag, but honestly I couldn't get it to work. Couldn't also find any information how to use it ( I tried -Wfuture-IMPLICITSTATIC -Wno-IMPLICITSTATIC , also other variations). At 4.228 it just fails because of -Wno-IMPLICITSTATIC, and on 5.006 it works.

Anyway I changed functions in dasm.svi from function to function static as that is how verilator interprets it anyways. Now I am not sure if it is has the same behaviour on all the other simulators I only tested verilator 4.228 and 5.006 https://github.com/chipsalliance/Cores-VeeR-EL2/pull/80/commits/84f50e4dc0f12486c86f0974ce59f78a4c54007f#diff-fefbad5c2354fb9b50844374ff2a36b9dc7fbb65480ad6312521063a482117ffL26

mkurc-ant commented 1 year ago

Hmm, alright. It's even better to fix the problem at the source rather than suppressing warnings. Looks good to me then.