IT代考 VE370 Introduction to Computer Organization Project 2 Assembly Programming

VE370 Introduction to Computer Organization Project 2 Assembly Programming
This project is designed for you to have a programming experience with RISC-V assembly instruction set.
Develop a RISC-V assembly program that operates on a data segment consisting of an array of 32- bit non-negative integers. In the text (program) segment of memory, write a procedure called main that implements the main() function as well as procedures for other subroutines described below. Assemble, simulate, and carefully comment the file. Screen print your simulation results and explain the results by annotating the screen prints. You should compose an array whose size is determined by you in the main function and is not less than 30 elements.
In this project, you are allowed to use RV32I BASE INTEGER INSTRUCTIONS. Any Extension Instruction Sets or pseudo-instructions are not allowed.

Copyright By PowCoder代写 加微信 powcoder

/********************************************************************** * countArray(int A[], int numElements, int cntType); * * Counts specific elements in the integer array A[] whose size is * * numElements and returns the following: * * When cntType = 1, count the elements greater than or equal to 60; * * When cntType = -1, count the elements less than 60; * **********************************************************************/
int countArray(int A[], int numElements, int cntType) { int cnt = 0;
…… //complete the code here
//must call functions Pass() and Fail()
return cnt; }
int Pass(int x) {
if (x>=60) return 1;
else return 0;
int Fail(int x) {
if (x<60) return 1; else return 0; /************************************************************* * FindHigh(...) returns the highest value in an array * *************************************************************/ int FindHigh(______, ______){ ...... //complete the function here int size = ...; //determine the size of the array here int PassCnt, FailCnt, Highest; int testArray[size] = {55, 83, ... //compose your own array here //will be replaced by test data Deliverables This is an individual project. The full score for this project is 200 points. All deliverables are due by 22:00 pm, May 27, 2022. 1) Demonstrate your program and simulation results to the TA. Go through the program step by step and show corresponding changes in the registers and memory. 2) Upload the source file(s) onto Canvas. Late demonstration will result in deduction of 20% each day beyond the deadline. Late source files are not accepted. Grading Policy Completion and Demonstration: 80% Source code: 20% should hold the number of passing scores in testArray[] countArray(______, ______, _______); should hold the number of failing scores in testArray[] countArray(______, ______, _______); should hold the highest score in testArray[] FindHigh(______, ______); 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com