Below is a detailed schematic diagram in Mermaid code that shows all the components, connections, and control signals for your 128‑bit ALU system. Please review the diagram and let me know if any adjustments are needed before you apply the changes.
Diagram
Diagram Explanation
Power Supply:
All blocks are connected to 3.8V_VCC (PS1) and Ground (PS2).
SIPO Stage:
Two 128‑bit SIPO registers (REG1 and REG2) load serial inputs (Serial_In_in1, Serial_In_in2) using the Clock_clk signal.
Enable signals (g0, g1, g2) are provided by the EN node.
ALU Input Preparation:
The parallel outputs from REG1 and REG2 are generated via nodes R1_PAR and R2_PAR.
A flawed multiplexer (Flawed_MUX) selects between these outputs based on the logic signal from sub_or_ls_or_rs (which is the logical OR of sub, ls, and rs). When that signal is high the MUX incorrectly selects REG1 over REG2.
ALU Stage:
The ALU receives ALU Input_in1 directly from REG1 and ALU Input_in2 from the MUX.
Control signals (sub, ls, rs) provided via CTRL determine the operation (subtraction, left shift, or right shift).
The entire operation is synchronous with Clock_clk.
Output Stage:
The 128‑bit ALU result is fed into a PISO shift register for serializing the output (PISO) and into a comparator (Comparator_is_0_LED) to set an LED high if the result is all zeros.
Feedback:
The feedback mechanism captures the ALU output result via Feedback Logic that updates REG2: if sub is high then REG2 is reset to zero; if ls is high then REG2 is left-shifted by one.
All signals are routed to reflect the synchronous operation and power distribution across the circuit.
Please review the detailed schematic diagram. Click "apply changes" when you're ready to commit these changes.