Starting from:

$30

Fixed-Point RISCV Square Root

Fixed-Point RISCV Square Root  CSCE611: Advanced Digital Design
Instructions
Objective
In this lab you will write a RISCV assembly language program that reads an non-negative input value
from the console, computes its square root, and prints the result to the console.
The input value is assumed to be scaled by 2ˆ14 = 16384 and rounded down. For example, an input of
3.75 will be entered as floor(3.75 * 16384) = 61440.
Internally your code will treat the input value as a fixed-point value with 14 fractional bits.
The output value will also be assumed to be scaled by 2ˆ14 = 16384. For example, the corresponding
output for an input of 61,440 (3.75) will be 31,727 (16384 * 1.93649).
Your code should run in the RARS simulator.
Deliverables
• Submit your RISCV program as a single ASCII text file with name “sqrt.asm”.
• Each group only needs to submit once via either partner.
Rubric
• (A) 10 points – reads input value.
• (B) 10 points – squares and shis guess.
• (C) 20 points – compares guess with input value with outcomes to <, >, and ==.
• (D) 20 points – adds or subtracts guess.
• (E) 10 points – shis step.
• (F) 20 points – loops until step becomes 0.
• (G) 10 points – prints final guess.
Maximum score: 100 points.
Copyright 2022 Charles Daniels, Jason Bakos 1