Improved setundef random number generator
authorClifford Wolf <clifford@clifford.at>
Sat, 18 Jan 2014 01:56:36 +0000 (02:56 +0100)
committerClifford Wolf <clifford@clifford.at>
Sat, 18 Jan 2014 01:56:36 +0000 (02:56 +0100)
passes/cmds/setundef.cc

index 394834a36191265728ade5376184b3dccbcfe0e4..9d59834c214f73b34eb7a4a2f7f35e847068578d 100644 (file)
@@ -40,7 +40,7 @@ static RTLIL::State next_bit()
        next_bit_state ^= next_bit_state << 5;
        log_assert(next_bit_state != 0);
 
-       return ((next_bit_state >> (next_bit_state & 15)) & 1) ? RTLIL::State::S0 : RTLIL::State::S1;
+       return ((next_bit_state >> (next_bit_state & 15)) & 16) ? RTLIL::State::S0 : RTLIL::State::S1;
 }
 
 struct SetundefWorker