# BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

# MIPS代写｜CSE 341: Project Introduction

## Part A: MIPS (General Information)

• Use any text editor to write the MIPS code and QTSPIM/SPIM to run or debug
• Template code is provided to you, make sure you edit that and write your solution in it
• You can assume that input will be well formed

No negative numbers

Only 2 digit numbers

• Possible input range – 0,99 (inclusive)
• Single digit numbers will be prefixed with 0, eg: 04,00,01

## Minimum & Maximum

• Input format: <digit><digit>[space]<digit><digit>…[space]<digit><digit>
• Get each digit from the memory (hint: load byte might be useful)
• Convert the character digit to integer (hint: ascii values)
• Once you get both digits, make the number (hint: place values of digits)
• After getting the number, find the minimum & maximum
• Make sure you store your final answers in registers \$a0 and \$a1
• Submissions will be autograded with the following expected output:

<minimum_number>[space]<maximum_number>

## Sorting

• Input format: <digit><digit>[space]<digit><digit>…[space]<digit><digit>
• Get each digit from the memory (hint: load byte might be useful)
• Convert the character digit to integer (hint: ascii values)
• Once you get both digits, make the number (hint: place values of digits)
• Store the numbers on stack (preferably) Implement the bubble sort algorithm (preferably)
• Make sure you store your final sorted array is stored in register \$a0
• Submissions will be autograded with the following expected output:

<sorted_number1>[space]<sorted_number2>…[space]<sorted_number10>

## Part B: Verilog (General Information)

• Use EDA Playground to write/test your verilog code
• Draw out the circuit first before writing the verilog code

• Then what should be the expression for Carry_Out?

• In ripple carry adder, we are able to do calculations on any specific bit, only if we have finished calculations on all other previous bits.
• This makes the adder run slowly. To improve this, we can calculate the carries simultaneously, before calculating the sums on those bits

## Multiplier

• Example: • For the second multiplicand, if the number on this bit is 0, then we add the previous result by 0. if the number on this bit is 1, then we left shift the first multiplicand, and add it by the previous result.

## Testbench

• The codes on the left provide an example of the testbench for the adder
• We can write our adder on the right half
• We can also slightly modify the testbench (on line 17 and line 37), to change it to the testbench for the multiplier 