vaughnbetz / COFFE

38 stars 24 forks source link

COFFE should check for unsupported LUT sizes in the input files. #26

Open vaughnbetz opened 4 years ago

vaughnbetz commented 4 years ago

Asking for a fracturable 4-LUT currently crashes COFFE. We should give a good error message in this case. COFFE knows how to build 4 LUTs, 5 LUTs and 6 LUTs.  But if you specify that you want fracturable LUTs, it builds a LUT one size smaller and then wires those together. So a fracturable 4-LUT needs to build two 3-LUTs, but the code won't build a 3-LUT and crashes. 

See https://github.com/vaughnbetz/COFFE/blob/7dca438212689a3496463185f1b556df0350d944/coffe/fpga.py#L1061 It would be good to put error messages in to check for this.