YosysHQ / icestorm

Project IceStorm - Lattice iCE40 FPGAs Bitstream Documentation (Reverse Engineered)
ISC License
963 stars 224 forks source link

Fix float exception when value is less than 100 #296

Closed RafaelLeeImg closed 2 years ago

RafaelLeeImg commented 2 years ago

There will be exception when read_size less than 100, read_size / 100 = 0, this generates a div 0 error.

addr / (read_size / 100)