Question: module maindec ( Z _ flag, opcode, PCSrc , / / funct 3 , / / / bne ResultSrc, MemWrite, / / ALUSrc , ALUSrcA,
module maindec Zflag, opcode, PCSrcfunctbne ResultSrc, MemWrite, ALUSrc ALUSrcA, ALUSrcB, ImmSrc, RegWrite, Jump, ALUop, Branch, Btaken ; input input Zflag; input :funct; bne input : opcode; input Btaken; output output :PCSrc; output reg MemWrite, RegWrite, Jump; output reg :ALUSrcA; output reg ALUSrcB; output reg : ResultSrc; output reg : ImmSrc; output reg : ALUop; output reg Branch; assign PCSrc Btaken b Jump bb : b; assign PCSrc Jump bb : Btaken bb : b; always@ begin main decoder caseopcodeb : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpb; lw lbu b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpb; sw sb b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpbxxx; Rtype, sar b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpbxx; beq, bne b : RegWrite ImmSrc, ALUSrc, MemWrite, ResultSrc, Branch, ALUop, Jumpbxx; bnes b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpb; Itype ALU, slli srli b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpbxxx; jal b : RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpblui b :RegWrite ImmSrc, ALUSrcA, ALUSrcB, MemWrite, ResultSrc, Branch, ALUop, Jumpb auipc default : RegWrite ImmSrc, ALUSrc, MemWrite, ResultSrc, Branch, ALUop, Jumphx; endcase end endmodule
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
