Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Computer architecture assembly code. RISC-V SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps of a program. To

image text in transcribedComputer architecture assembly code. RISC-V

SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps of a program. To practice writing assembly language programs that make use of control flow Assignment: First, create a flowchart that will perform the following behavior. Then implement the flowchart with OTTER MCU assembly language using only the instructions in the OTTER assembly manual. Make sure your code is formatted properly including comments. Use the RARS simulator to ensure the program performs as desired. a. Read a 32-bit unsigned value from SWITCHES (address 0x11000000). If the input is greater than or equal to 32,768, the value is divided by 4. You can ignore any remainder. If the value is less than 32,768, the value is multiplied by 2. The result should be written to the 7 SEGMENT (address 0x11000040). b. Read two 16-bit unsigned values consecutively from SWITCHES (address 0x11000000). Divide the first value by the 2nd and output the quotient (result) to 7 SEGMENT (address 0x11000040) and the remainder to LEDS (address 0x11000020). If you try to divide by zero, turn all of the seven segments and LEDS on (output 0xFFFFFFFF). SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps of a program. To practice writing assembly language programs that make use of control flow Assignment: First, create a flowchart that will perform the following behavior. Then implement the flowchart with OTTER MCU assembly language using only the instructions in the OTTER assembly manual. Make sure your code is formatted properly including comments. Use the RARS simulator to ensure the program performs as desired. a. Read a 32-bit unsigned value from SWITCHES (address 0x11000000). If the input is greater than or equal to 32,768, the value is divided by 4. You can ignore any remainder. If the value is less than 32,768, the value is multiplied by 2. The result should be written to the 7 SEGMENT (address 0x11000040). b. Read two 16-bit unsigned values consecutively from SWITCHES (address 0x11000000). Divide the first value by the 2nd and output the quotient (result) to 7 SEGMENT (address 0x11000040) and the remainder to LEDS (address 0x11000020). If you try to divide by zero, turn all of the seven segments and LEDS on (output 0xFFFFFFFF)

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

What is the post-PC-era?

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago