Objective
The objective of this lab is to learn about function calling, RISC-V protocols for the use of registers.
iuww520iuww520iuww520iuww520iuww520iuww520iuww520iuww520
This lab takes as input a CSV (comma separated values) file (.csv extension) that is used for generating tabular data in spreadsheets. Specifically, for this assignment, you will NEED to assume this CSV file was generated under
Windows
(the reason will be explained shortly). Consider the
data.csv
file below as it appears when you open it in Excel as an example.
This file shows the stock returns from an investment portfolio over a year. The “A” column contains the stock name and the “B” column indicates the returns in USD (You can assume that there are no negative stock returns in any of
our CSV data files
).
You will run the file
lab4_testbench_rv32_rev#.asm
file in RARS which takes
data.csv
as its input CSV file. Doing so will yield the following analysis, based on the calculations made by the assembly files that you will be submitting):
1. Find the total file size in bytes (excluding any metadata generated by your OS) (length_of_file.asm)
2. List the dollar amount of all the input records. (input_from_record.asm)
3. Provide the name of the stock that gives the maximum income. (maxIncome.asm)
4. Provide the name of the stock that gives the minimum income. (minIncome.asm)
5. Calculate the total income generated from all stocks
When you run via RARS
lab4_testbench_rv32_rev#.asm with the .asm files shown above completed by you
, you will get the output console as shown below: