Question: Write a RISC-V assembly program (and validate its correctness) as follows: i. Declare (and initiate, if needed) the following variables in the .section .data:
Write a RISC-V assembly program (and validate its correctness) as follows: i. Declare (and initiate, if needed) the following variables in the ".section .data": 1a word-sized integer namely "N" to denote the array size; 2 an array namely "LIST", which is of eight word-sized integers (initiated with 1, 2, 3, ..., 8); 3 a word-sized integer namely "SUM" for storing the result. ii. Traverse the array and obtain the sum of this array; iii. Store the sum of this array into the variable "SUM"; iv. Use Spike interactive debug mode to validate the memory contents of the variable "SUM" (and provide the screenshots of the execution); v. Remember to write the code comments (#) for your RISC-V assembly program.
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Below is a simple RISCV assembly program that fulfills the specified requirements This program initi... View full answer
Get step-by-step solutions from verified subject matter experts
