YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.5k stars 895 forks source link

cellmatch: Size the `lut` attribute #4625

Closed povik closed 1 month ago

povik commented 1 month ago

What are the reasons/motivation for this change?

Under an undocumented -lut_attrs option the cellmatch command can annotate output ports with a lut attribute describing the port's function. Previously these attributes were 32-bit, which meant the value for 6-input cells was cropped, and one needed knowledge of the number of inputs to interpret the value. Make the change to size the lut attribute to two to the power of number of inputs.