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

adding the process_engine.sv

parent 5bdda58b
No related branches found
No related tags found
1 merge request!2merge the process engine
module process_engine(
input logic signed [ 7:0] i_a [8:0],
input logic signed [ 7:0] i_b [8:0],
output logic signed [31:0] o_z
);
reg [15: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]));
///////////////////////////// add all results from 9 multipliers ///////////////////////////////////////
always @ *
o_z = product_result[0] + product_result[1] +product_result[2] +product_result[3] +product_result[4] + product_result[5] + product_result[6] + product_result[7] + product_result[8];
endmodule
\ No newline at end of file
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