Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using your suite of RISC - V instructions, create a pseudorandom number generator using arithmetic and bitwise logical instructions. a . Write a RISC -

Using your suite of RISC-V instructions, create a pseudorandom number generator using
arithmetic and bitwise logical instructions.
a. Write a RISC-V program that will use a loop to generate 15 random numbers and store
them in an array beginning at memory location 0 in data memory. please use these instructions only Arithmetic: ADD, ADDI, SUB
Logical: AND, ANDI, OR, ORI, XOR, XORI
Shift: SLLI
Memory: LW, SW
Jump: JAL
Branch: BEQ, BNE, BLT, BGE
i. Hand in your code for this program as well as a list of the 15 numbers you
generated.
b. Given the first random number, write a RISC-V program to determine how many
numbers must be generated in order to revisit the first number.
i. Hand in your code for this program
ii. Hand in the first random number and the number of steps it takes to revisit that
first number.
c. Create and hand in a report that explains your algorithm for your random number
generator and includes the components mentioned in parts a and b

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

Students also viewed these Databases questions