Question: module matrixops ( input clk , input rst , input enter, input [ 1 : 0 ] X , input [ 1 : 0 ]
module matrixops
input clk
input rst
input enter,
input : X
input : Y
output reg Z
;
x matrix of singlebit cells
reg matrix::;
State Encoding:
: SWAITSTART
: SGETINPUTS
: SDONE
reg : state;
reg : inputcount; count up to sets
Intermediate register for onecycle delay for Z
reg Zbuffer;
always @posedge clk or posedge rst begin
if rst begin
On reset, initialize everything
Z ;
Zbuffer ;
state ; SWAITSTART
inputcount ;
Manually initialize each cell of the matrix to without a for loop
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
matrix;
end else begin
case state
: begin
SWAITSTART
if enter begin
state ; SGETINPUTS
inputcount ;
Zbuffer ;
end
end
: begin
SGETINPUTS
if enter begin
matrixYXb;
inputcount inputcount ;
if inputcount begin
After inputs, move to DONE
state ;
end
end
end
: begin
SDONE
if enter begin
Zbuffer matrixYX;
end
end
endcase
Assign Z from Zbuffer at the end of the cycle onecycle delay
Z Zbuffer;
end
end
endmodule
I need to draw an ASM chart for this verilog code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
