Question: Can you draw the hardware out for me . Problem 1 : Show the hardware that will be synthesized for the posted solution to Homework

Can you draw the hardware out for me.
Problem 1: Show the hardware that will be synthesized for the posted solution to Homework 5.
The solution (with fewer comments than the posted version) is shown below.
```
module dot_seq_2 #( int w =5, wi =4)
( output logic [w-1:0] dp, output logic [wi-1:0] first_id, last_id,
input uwire [w-1:0] a[2], b[2], input uwire [wi-1:0] in_id,
input uwire reset, first, last, input uwire clk );
logic [w-1:0] pl_a[1:1][2], pl_b[1:1][2]; // Arriving vector elements.
logic [w-1:0] pl_prod[2:2][2]; // Vector products.
logic [w-1:0] pl_sum[3:3]; // Dot prod of 2-element segment.
logic [wi-1:0] pl_id[1:3]; // ID.
logic [1:0] pl_fl[1:3]; // The first and last signals.
logic [wi-1:0] acc_id;
logic [w-1:0] acc_sum;
always_ff @( posedge clk ) begin
/// Stage 0
pl_a[1]= a; // This copies both elements of a.
pl_b[1]= b;
pl_id[1]= in_id;
pl_fl[1]= reset ?2'b0 : {last,first};
/// Stage 1
for ( int i=0; i2; i++) pl_prod[2][i]= pl_a[1][i]* pl_b[1][i];
pl_id[2]= pl_id[1];
pl_fl[2]= reset ?2'd0 : pl_fl[1];
/// Stage 2
pl_sum[3]= pl_prod[2][0]+ pl_prod[2][1];
pl_id[3]= pl_id[2];
pl_fl[3]= reset ?2'h0 : pl_fl[2];
/// Stage 3
begin
automatic logic s3_first = pl_fl[3][0]; // For readability.
automatic logic s3_last = pl_fl[3][1]; // For readability.
automatic logic [w-1:0] s3_sum = s3_first ? pl_sum[3] : pl_sum[3]+ acc_sum;
acc_sum = s3_sum;
if ( reset ) begin
first_id =0;
last_id =0;
end else begin
if ( s3_first ) acc_id = pl_id[3];
if ( s3_last ) begin
first_id = s3_first ? pl_id[3] : acc_id;
last_id = pl_id[3];
dp = s3_sum;
end
end
end
end
endmodule
```
Can you draw the hardware out for me . Problem 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!