Closed medexs closed 6 months ago
Occurrences to check:
Sometimes one is better than the second, it usually depends on the context, mainly because of the priorities, also depending on whether we really need the bitwise value...
I just replaced two occurrences in cpu.sv:
// Here we check the logical value, we do not care about specific bits, because another value will be assigned (this is just a conditional block).
assign next_pc = branch || mret ? branch_mret_target : pc4;
// Here we explicitly need to state that we OR the value of the two and assign to int_exec, just like with a real OR gate. The result will be the same, because it is a one-bit value, but this seems more explicit to me.
assign int_exc = interrupt | exception;
What do you think? @medexs
Use either logical or (
||
) or bitwise or (|
).