YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.32k stars 244 forks source link

Fix RNG seed initialization when passed as a parameter #1383

Closed meiniKi closed 1 month ago

meiniKi commented 1 month ago

Fixes the rngstate assignment for DeterministicRNG when the seed is passed as a parameter. Assigning a seed of zero should be avoided as it leads to a constant zero output that can cause infinite loops, e.g., https://github.com/YosysHQ/nextpnr/blob/7c459805f63c07c44f22e46fbd08734da2578db8/common/place/placer_static.cc#L380-L381