YosysHQ / icestorm

Project IceStorm - Lattice iCE40 FPGAs Bitstream Documentation (Reverse Engineered)
ISC License
1k stars 225 forks source link

Exit with error when no RAM contents were replaced. #305

Closed tomverbeure closed 1 year ago

tomverbeure commented 1 year ago

When icebram is called to replace RAM contents but no RAM contents are replaced, it currently simply exits. This indicates a build failure. (Why else would anyone call icebram?)

This becomes more important due to this issue, where icebram fails after switching to a new memory_libmap. Existing projects that used to build just fine are currently creating broken bitstreams, and unless the -v flag is used, no warnings are generated. (Not that anyone actually looks at warnings...)

Ultimately, icebram should be fixed so that it works with the new memory_libmap, but until that's done, it should at least exit with any error instead, which is what this PR does.

emeb commented 1 year ago

This is a good idea and would have saved many hours of bug hunting for a number of users.

gatecat commented 1 year ago

Thanks for the patch, sorry that this has caused problems! I'll see if I can find some time to sort this properly.