Skip to content
Snippets Groups Projects
Commit 71cbc477 authored by Shrawan Parmar's avatar Shrawan Parmar
Browse files

modified process_engine.sv

parent a6da16ce
No related branches found
No related tags found
2 merge requests!7modified process_engine.sv,!5Draft: Nam
......@@ -9,7 +9,6 @@ module mult16bvia8bit (
///////////////////////////// Instantiate your multiplier here ///////////////////////////////////////
//exact_mult mult (
//our_mult mult (
approx_mult mult (
.i_a(inA[0]),
.i_b(inB[0]),
......@@ -21,9 +20,7 @@ module mult16bvia8bit (
generate
;
for (i = 1; i < 4; i = i + 1) begin : base
//exact_mult mult (
//our_mult mult (
approx_mult mult (
exact_mult mult (
.i_a(inA[i]),
.i_b(inB[i]),
.o_z(ouP[i])
......
module process_engine(
input logic signed [ 7:0] i_a [8:0],
input logic signed [ 7:0] i_b [8:0],
input logic signed [ 15:0] i_a [8:0],
input logic signed [ 15:0] i_b [8:0],
output logic signed [31:0] o_z
);
reg [15:0] product_result [8:0];
reg [31:0] product_result [8:0];
///////////////////////////// Instantiate 9 multipliers ///////////////////////////////////////
approx_mult mult0 ( .i_a(i_a[0]), .i_b(i_b[0]),.o_z(product_result[0]));
approx_mult mult1 ( .i_a(i_a[1]), .i_b(i_b[1]),.o_z(product_result[1]));
approx_mult mult2 ( .i_a(i_a[2]), .i_b(i_b[2]),.o_z(product_result[2]));
approx_mult mult3 ( .i_a(i_a[3]), .i_b(i_b[3]),.o_z(product_result[3]));
approx_mult mult4 ( .i_a(i_a[4]), .i_b(i_b[4]),.o_z(product_result[4]));
approx_mult mult5 ( .i_a(i_a[5]), .i_b(i_b[5]),.o_z(product_result[5]));
approx_mult mult6 ( .i_a(i_a[6]), .i_b(i_b[6]),.o_z(product_result[6]));
approx_mult mult7 ( .i_a(i_a[7]), .i_b(i_b[7]),.o_z(product_result[7]));
approx_mult mult8 ( .i_a(i_a[8]), .i_b(i_b[8]),.o_z(product_result[8]));
mult16bvia8bit mult0 ( .i_a(i_a[0]), .i_b(i_b[0]),.o_z(product_result[0]));
mult16bvia8bit mult1 ( .i_a(i_a[1]), .i_b(i_b[1]),.o_z(product_result[1]));
mult16bvia8bit mult2 ( .i_a(i_a[2]), .i_b(i_b[2]),.o_z(product_result[2]));
mult16bvia8bit mult3 ( .i_a(i_a[3]), .i_b(i_b[3]),.o_z(product_result[3]));
mult16bvia8bit mult4 ( .i_a(i_a[4]), .i_b(i_b[4]),.o_z(product_result[4]));
mult16bvia8bit mult5 ( .i_a(i_a[5]), .i_b(i_b[5]),.o_z(product_result[5]));
mult16bvia8bit mult6 ( .i_a(i_a[6]), .i_b(i_b[6]),.o_z(product_result[6]));
mult16bvia8bit mult7 ( .i_a(i_a[7]), .i_b(i_b[7]),.o_z(product_result[7]));
mult16bvia8bit mult8 ( .i_a(i_a[8]), .i_b(i_b[8]),.o_z(product_result[8]));
///////////////////////////// add all results from 9 multipliers ///////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment