Split up edge-triggered
Our goal here is to reduce always blocks that write to several different registers. We only try to support always blocks with:
For instance, a suitable block might be:
always @(posedge clk or posedge reset) begin q1 <= d1; if (reset) q2 <= 0; else q2 <= d2; end
We could split this block up into two always blocks:
always @(posedge clk or posedge reset) q1 <= d1; always @(posedge clk or posedge reset) if (reset) q2 <= 0; else q2 <= d2;
This is just a generally nice simplification that lets us only consider a single register at a time.
BOZO we currently allow always blocks to be split up even if the assignments have different delays. This seems okay. But it would be good to explore this more and try to understand whether it's truly reasonable.