Skip to content

add partially sequential multiplier#30

Draft
FrancescoConti wants to merge 2 commits into
masterfrom
fc/partial-mult
Draft

add partially sequential multiplier#30
FrancescoConti wants to merge 2 commits into
masterfrom
fc/partial-mult

Conversation

@FrancescoConti

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_mult RTL module implementing a chunked/iterative multiplication scheme (parameterized by MULT_BITS).
  • Add a dedicated testbench tb_hwpe_ctrl_partial_mult.sv and simulation scripts under sim/partial_mult/.
  • Fix sim/uloop/build.sh include paths to correctly reference ../../rtl and ../../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 thread tb/tb_hwpe_ctrl_partial_mult.sv Outdated
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 thread rtl/hwpe_ctrl_partial_mult.sv Outdated
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.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants