Menu

[Solved]Question 1 5 Points Write Assembly Code 32×32 Bit Multiplication Ee412 Processor Write Inp Q37028184

systemverilog
Question 1 (5 points) Write the assembly code for 32x32-bit multiplication on the EE412 processor. Write your inputs to memorQuestion 1 (5 points) Write the assembly code for 32×32-bit multiplication on the EE412 processor. Write your inputs to memory locations 0 and 1, and read them from 2 (lower 32-bits) and 3 (upper 32-bits) when done In your ASM code, implement a subroutine that performs 16×16-bit multiplication on half words. Then use this subroutine (by calling it as many times as required) together with many additions in order to implement 32×32-bit multiplication. Submit your code as a text file together with line numbers on each line and comments (to make your code easy to understand as much as possible), i.e. your code should look like: : Goto 0 (always the first line in each code) 1: LD R0 R1 ; R1 <-MIRO] -H[O] -Load 1st input fr0 0] 2: ADDI R3 RO R2- RO 1 1 3: LD R3 R2 ; R2 <-M[R3] = M[1] -Load 2nd input from M[1] N-1: ST R3 RXMIR31 I31RX Store high half of mult : Goto 0 In the code sample above, N is the total number of lines in your code, while RX corresponds to the register where your program writes the upper half of the final result. Question 2 (5 points) Convert your ASM code to machine code, write it to the program memory, and simulate it using SystemVerilog. Do not forget to add code to write to and read from shared data memory. Refer to supplement materials for EE412 processor. Submit only your testbench and program memory files (processor412 tb.sv and pmem.sv). You can simulate your code with random multiplication inputs. Please make sure to get your inputs from memory locations 0 and 1, and write results to locations 2 and 3 as explained in Question 1. I will be testing your code with those assumptions! Show transcribed image text Question 1 (5 points) Write the assembly code for 32×32-bit multiplication on the EE412 processor. Write your inputs to memory locations 0 and 1, and read them from 2 (lower 32-bits) and 3 (upper 32-bits) when done In your ASM code, implement a subroutine that performs 16×16-bit multiplication on half words. Then use this subroutine (by calling it as many times as required) together with many additions in order to implement 32×32-bit multiplication. Submit your code as a text file together with line numbers on each line and comments (to make your code easy to understand as much as possible), i.e. your code should look like: : Goto 0 (always the first line in each code) 1: LD R0 R1 ; R1

Expert Answer


Answer to Question 1 (5 points) Write the assembly code for 32×32-bit multiplication on the EE412 processor. Write your inputs to … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *