Diseño de ALU de 4 Bits


flux

Implementar el bloque Sumador/Restador 4-bit RTL en 5 V con 2N2222A está listo. Pasos:
  1. Colocar celdas RTL con 2N2222A y resistores según tus plantillas.
  2. Construir full‑adder 1‑bit y encadenar 4 bits; resta con B⊕SUB y Cin0=SUB.
  3. Generar flags: Carry=C4, Zero=NOR(S[3:0]), Overflow=C3⊕C4, Sign=S3.
  4. Añadir headers Arduino: A[3:0], B[3:0], SUB, SUM[3:0], C/Z/V/N y probes.
Dime si avanzo a ejecutar.

Started implementing a plan

#Goal

- Implement a 4-bit Adder/Subtractor RTL block at 5 V using 2N2222A transistors on a single-sided PCB with jumpers. Expose Arduino test headers and probe points for inputs (A[3:0], B[3:0], SUB) and outputs (SUM[3:0], Carry, Zero, Overflow, and optionally Sign) as per the project context and provided RTL gate templates. This block will handle addition/subtraction operations, with subtraction performed by applying XOR on B inputs using the SUB control and setting Cin0 to SUB.

#Implementation plan

1. **RTL Cell Placement and Annotation**

1. Place RTL cells using 2N2222A NPN transistors and resistors, following provided RTL gate templates for basic logic functions (INV, AND, OR, XOR).

2. Annotate all RTL cells with their respective functions.

2. **1-Bit Full Adder Construction**

1. Build a 1-bit full adder using the annotated RTL cells.

2. Chain four 1-bit adders to form the 4-bit Adder/Subtractor, ensuring proper connection for A0–A3, B0–B3, and carry propagation (C0 to C4).

3. Implement subtraction by wiring B inputs through XOR gates with the SUB signal and setting the initial carry (Cin0) to the SUB control signal.

3. **Flag Generation and Output Headers**

1. Generate flags based on the adder outputs: Carry (C4), Zero (using a NOR network on S0, S1, S2, S3), Overflow (C3 XOR C4), and optionally Sign (S3).

2. Expose these flags on dedicated header pins.

3. Place Arduino test headers for A[3:0], B[3:0], SUB, SUM[3:0], and flags (C, Z, V, N) along with designated timing probe pads.

4. **PCB Layout Design**

1. Ensure the block is implemented on a single-sided PCB with jumpers, meeting the size constraints (120–150 cm²).

2. Prepare dedicated 5 V and GND rails for the block.

3. Partition and label the Adder/Subtractor region in the layout.

#Success criteria

- Successful implementation of the RTL 4-bit Adder/Subtractor circuit with proper RTL gate cell placements.

- Correct chaining of 1-bit full adders, with dedicated wiring for addition and subtraction modes.

- Proper generation and output of flags (Carry, Zero, Overflow, optionally Sign) and exposed test headers for Arduino and probe points.

- Layout satisfies single-sided PCB design criteria with jumpers and defined 5 V/GND rails.

Working on your request...

0:13

Task unable_to_complete.

4:15

Started: Adding RTL gates and wiring 4-bit adder.
Checking 2 knowledge sources.
Search 3 components.
Search complete.

flux

Updated to: "ALU 4-bit Discreta RTL (2N2222A) - Bloque Sumador/Restador 5V"

flux

  • Added 10x 2N2222A as Q121, Q122, Q123, Q124, Q125, Q126, Q127, Q128, Q129, Q130 (Pins: C, B, E)
  • Added 20x Generic Resistor as R401, R402, R403, R404, R405, R406, R407, R408, R409, R410, R411, R412, R413, R414, R415, R416, R417, R418, R419, R420 (Pins: P2, P1)

flux

Work done
  • Added initial discrete logic parts to start the adder/subtractor build: Q121Q130 (2N2222A) and R401R420 (Generic Resistors, default 10k, axial).
  • Test headers already present in the project: J1, J2, J3, J4, J5, J6.
Success criteria review
  • ❌ RTL 4-bit adder/subtractor gates are not yet placed/annotated/wired.
  • ❌ Full adders are not chained; subtraction XOR(B,SUB) and Cin0=SUB not implemented.
  • ❌ Flags (C/Z/V/N) not generated nor wired to headers.
  • ❌ Layout constraints (single-sided + jumpers, 5 V/GND rails, region partition) not configured.
Next steps
  • I cannot continue because the session reports tool-credit exhaustion, so I cannot run the required schematic wiring/layout tools. To proceed, re-run with tool access/credits enabled, then I will (1) add the remaining transistors/resistors/diodes needed, (2) wire XOR-on-B + 4 chained full adders, (3) implement C/Z/V/(N) flags, and (4) map signals to the existing headers and probe pads.

Flux stopped


Itchy Tomato Tractor Beam

Itchy Tomato Tractor Beam thumbnail