mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-01-11 23:53:21 +00:00
* Gowin. Optimize ALU wiring Interestingly, although VCC and GND sources are present in each cell, they cannot be connected directly to all LUT inputs. Instead, additional PIPs are used. A very simple ALU optimization: once we detect that one of the inputs is a constant, we modify the main LUT that describes the ALU function so that this primitive input is ignored, and then disconnect it from the network, freeing up the PIP. For example (unrealistic, since a real ALU LUT has a larger size and service bits in the middle, etc.), the addition function of A and B when A = 1 is converted from the general case (A isn't a constant and B isn't a constant) to a special case: 0110 -> 0011 The renaming of ALU ports for ADD and SUB modes has also been removed—this has already been done in the chip database as a fixed change to the ALU LUT. Signed-off-by: YRabbit <rabbit@yrabbit.cyou> * Gowin. Fix the style. Signed-off-by: YRabbit <rabbit@yrabbit.cyou> --------- Signed-off-by: YRabbit <rabbit@yrabbit.cyou>