1/34
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Partial Product
A shifted copy of the multiplicand that contributes to the final multiplication result when the corresponding multiplier bit is 1.
Binary Multiplication
Can be architecturally viewed as the conditional generation of shifted copies of one operand followed by the addition of those partial products.
Multiplier Bit
Acts as an enable for one shifted copy of the multiplicand in binary multiplication.
B[i] = 0
The condition in which partial product i becomes an all-zero value and therefore contributes nothing to the final product.
B[i] = 1
The condition in which partial product i becomes ExtendedA shifted left by i positions.
A << i
The partial-product contribution associated with multiplier bit B[i].
2 × WIDTH
The required working/product width when multiplying two WIDTH-bit unsigned magnitudes.
Because multiplying two WIDTH-bit magnitudes can require as many as 2 × WIDTH result bits.
Why is A widened before partial-product shifting?
wire [(2 * WIDTH) - 1:0] ExtendedA;
Declares a 2×WIDTH-bit version of operand A so that left shifts can occur without losing bits that belong in the multiplication result.
assign ExtendedA = {{WIDTH{1'b0}}, A};
Zero-extends the WIDTH-bit operand A to 2×WIDTH bits.
{{WIDTH{1'b0}}, A}
Verilog concatenation that places WIDTH zeros above A, producing the 2×WIDTH-bit ExtendedA value.
Zero Extension
The operation used by PartialProductGenerator to widen A while preserving its unsigned magnitude.
WIDTH
Number of partial products generated by PartialProductGenerator.
Because there is one possible partial-product contribution for every bit of multiplier B.
Why does PartialProductGenerator generate WIDTH partial products?
wire [(2 * WIDTH * WIDTH) - 1:0] PartialProducts;
Declares one flattened vector large enough to store WIDTH separate partial products, each of which is 2×WIDTH bits wide.
2 × WIDTH × WIDTH
Total number of bits required by the flattened PartialProducts bus.
Because the bus contains WIDTH partial products and every individual partial product occupies 2 × WIDTH bits.
Why is PartialProducts declared with a total width of 2 × WIDTH × WIDTH bits?
genvar i;
Declares the elaboration-time loop variable used to generate repeated partial-product hardware.
generate for
A loop that creates one repeated piece of partial-product hardware for every multiplier bit.
for (i = 0; i < WIDTH; i = i + 1)
The generate loop that creates partial-product logic for B[0] through B[WIDTH - 1].
PARTIAL_PRODUCT_BLOCK
The name assigned to each generated partial-product block.
(i * 2 * WIDTH)
The starting bit position of partial product i inside the flattened PartialProducts vector.
+:
Indexed part-select operator that selects a fixed-width slice beginning at a calculated starting index and extending toward higher bit indices.
[(i * 2 * WIDTH) +: (2 * WIDTH)]
Selects the 2×WIDTH-bit slice of PartialProducts reserved for partial product i.
PartialProducts[(i * 2 * WIDTH) +: (2 * WIDTH)]
The individual 2×WIDTH-bit partial-product slot corresponding to multiplier bit B[i].
(B[i]) ? (ExtendedA << i) : {(2 * WIDTH){1'b0}}
The conditional expression that generates either the shifted multiplicand or an all-zero partial product.
ExtendedA << i
Moves the multiplicand contribution to the binary weight represented by multiplier bit B[i].
{(2 * WIDTH){1'b0}}
Produces an all-zero value exactly as wide as one partial product.
Because original multiplier bit B[i] represents the binary weight 2^i.
Why is ExtendedA shifted left by exactly i positions when B[i] is 1?
Because B[i] determines whether the multiplicand contribution associated with binary weight 2^i participates in the product.
Why is B[i] used as the condition of the ternary operator?
PartialProductGenerator
Module responsible for converting A and the individual bits of B into WIDTH separate shifted-or-zero partial products.
PartialProductGenerator does not add the partial products together.
Is it true that PartialProductGenerator itself calculates the complete multiplication result?
CombinationalMultiplier
The module that receives the flattened PartialProducts vector and adds its WIDTH slices together.
Spatial representation of multiplication
The architectural idea illustrated by PartialProductGenerator because all WIDTH partial-product relationships exist simultaneously as combinational hardware.
Binary multiplication is repeated conditional addition.
The central architectural mental model behind partial-product generation.