35. Pipelined MAC Engine

Loading simulator…

Repair the Product Bit Lanes

D_FF_0 to D_FF_7 store the 8-bit multiplier result.

Each registered product bit must connect to the MAC Full Adder with the same bit position.

In the predefined circuit, product bits 2 and 3 are crossed:

D_FF_2 → MAC_FA_3
D_FF_3 → MAC_FA_2

Repair them as:

D_FF_2 → MAC_FA_2
D_FF_3 → MAC_FA_3

The validation cases 4 × 1 and 8 × 1 independently exercise both affected product bits.

2. Repair the Registered C Bit Lanes

D_FF_8 to D_FF_15 store C[7:0].

The predefined circuit crosses two adjacent registered C bits:

D_FF_13 → MAC_FA_6
D_FF_14 → MAC_FA_5

Repair them as:

D_FF_13 → MAC_FA_5
D_FF_14 → MAC_FA_6

The validation cases C = 32 and C = 64 independently exercise both affected C bits.

3. Repair the Final Sum and Carry Routing

The eight MAC sum outputs form bits Result[7:0].

The carry output from MAC_FA_7 forms Result[8].

Therefore:

MAC[8:0] = {Cout, Sum[7:0]}

In the predefined circuit, Sum[7] and Cout are routed to the wrong Result-register bits.

Restore:

MAC_FA_7 Sum  → D_FF_23
MAC_FA_7 Cout → D_FF_24

The 225 and 256 validation results exercise the two most-significant result conditions.

4. Correct Pipeline Operation

After the three routing faults are repaired:

Product_Reg ← A × B
C_Reg       ← C
Result_Reg  ← Product_Reg + C_Reg

A new transaction may be applied before every rising edge.

While the first-stage registers capture the next transaction, the Result register captures the MAC value belonging to the previous transaction.

5. Reset

nRESET is already connected to the active-low asynchronous clear of all pipeline registers.

When:

nRESET = 0

the pipeline clears and:

Result = 000000000