add partially sequential multiplier#30
Draft
FrancescoConti wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “partially sequential” multiplier RTL block and a corresponding testbench, along with ModelSim helper scripts to build/clean/simulate the new and existing uloop testbenches.
Changes:
- Add
hwpe_ctrl_partial_multRTL module implementing a chunked/iterative multiplication scheme (parameterized byMULT_BITS). - Add a dedicated testbench
tb_hwpe_ctrl_partial_mult.svand simulation scripts undersim/partial_mult/. - Fix
sim/uloop/build.shinclude paths to correctly reference../../rtland../../tb.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
rtl/hwpe_ctrl_partial_mult.sv |
New partially sequential multiplier RTL implementation. |
tb/tb_hwpe_ctrl_partial_mult.sv |
New testbench validating the partial multiplier against a*b. |
sim/partial_mult/build.sh |
Build script for compiling/optimizing the partial multiplier TB. |
sim/partial_mult/sim.sh |
Simulation launcher for the partial multiplier TB. |
sim/partial_mult/clean.sh |
Cleanup script for partial multiplier simulation library. |
sim/uloop/build.sh |
Fix relative paths to RTL/TB sources from sim/uloop/. |
sim/uloop/sim.sh |
Simulation launcher for uloop TB. |
sim/uloop/clean.sh |
Cleanup script for uloop simulation library. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+78
to
+80
| // pad a_i to a multiple of MULT_BITS | ||
| assign a_pad = {{(AW_PAD-AW){a_i[AW-1]}}, a_i}; | ||
|
|
Comment on lines
+84
to
+86
| assign shifted = cnt==AW_PAD/MULT_BITS ? 0 : (prod_nopad << (cnt * MULT_BITS)); | ||
| assign shifted_signed = shifted * 48'sh1; | ||
| assign shifted_or_inverse = signed'(invert_i ? -shifted_signed : shifted_signed) * 48'sh1; |
Comment on lines
+62
to
+63
| for(int i=0; i<AW/MULT_BITS + (AW % MULT_BITS) ? 1 : 0; i++) | ||
| cycle(); |
| assert property (@(posedge clk_i) (valid & ~start & rst_ni) |-> (prod == a*b)) | ||
| else $fatal("Wrong multiplication data produced!!!"); | ||
|
|
||
| endmodule // tb_hwpe_ctrl_seq_mult |
Comment on lines
+15
to
+17
| * A partially sequential unsigned multiplier. Inputs must | ||
| * be kept stable for AW/MULT_BITS-1 cycles after the start strobe. | ||
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.