Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Invalid program counter value mips

20/10/2021 Client: muhammad11 Deadline: 2 Day

Writing The Code And Report

Instruction:

Download CS47ProjectI.zip and unzip it.
Assemble proj-auto-test.asm and execute. Make sure to turn on 'Assembles all files in directory' and 'Initialize program counter to global main if defined' option in MARS tool. It should generate the following output:
Total passed 0 / 40
*** OVERALL RESULT FAILED ***

Complete the following two procedures in CS47_proj_alu_normal.asm and CS47_proj_alu_logical.asm. You may include your required macros (those you write) in the cs47_proj_macro.asm. Do not update proj-auto-test.asm or cs47_proj_procs.asm or cs47_common_macro.asm.
au_normal (in CS47_proj_alu_normal.asm): It takes three arguments as $a0 (First operand), $a1 (Second operand), $a2 (Operation code '+', '-', '*', '/' - ASCII code). It returns result in $v0 and $v1 (for multiplication $v1 it will contain HI, for division $v1 will contain remainder). This procedure uses normal math operations of MIPS to compute the result (add, sub, mul and div).
au_logical (in CS47_proj_alu_logical.asm): It takes three arguments as $a0 (First operand), $a1 (Second operand), $a2 (Operation code '+', '-', '*', '/' - ASCII code). It returns result in $v0 and $v1 (for multiplication $v1 it will contain HI, for division $v1 will contain remainder). The evaluation of mathematical operations should use MIPS logic operations only (result should not be generated directly using MIPS mathematical operations). The implementation needs to follow the digital algorithm implemented in hardware to implement the mathematical operations.
Assemble proj-auto-test.asm and execute. It should generate the following output.
Total passed 40 / 40
*** OVERALL RESULT PASSED ***

NB: Please check each operation result manually from output. Your implementation of normal and logical ALU will be compared against a reference normal and logical ALU result. Therefore it is possible that you may see 40/40 of pass, but in our test it will not be so.
Write a project report including the following sections. It is recommended to write report in IEEE format
[Template and Instructions on How to Create Your Paper (Links to an external site.)Links to an external site. ]. A report written in IEEE format will earn 10% extra credit on top of overall project credit. The final report uploaded
Include clear diagrams for requirement and design
Include code snippet to explain implementation
Include screen shots of testing results
Introduction containing objective.
Requirement
Design and Implementation
Testing
Conclusion
Make sure to
Upload two files in Canvas (No evaluation will be done if both of them are not uploaded)
cs47_proj_report.pdf : Project report
cs47_proj_source.zip: This zip file needs to contain updated CS47_proj_alu_normal.asm, CS47_proj_alu_logical.asmand cs47_proj_macro.asm. No need to upload other files.

CS47ProjectI/cs47_common_macro.asm
# ***** DO NOT MODIFY THIS FILE **** # #<------------------ MACRO DEFINITIONS ----------------------># # Macro : print_str # Usage: print_str(

) .macro print_str($arg) li $v0, 4 # System call code for print_str la $a0, $arg # Address of the string to print syscall # Print the string .end_macro # Macro : print_int # Usage: print_int() .macro print_int($arg) li $v0, 1 # System call code for print_int li $a0, $arg # Integer to print syscall # Print the integer .end_macro # Macro : exit # Usage: exit .macro exit li $v0, 10 syscall .end_macro # Macro: read_int # Usage: read_int() .macro read_int($arg) li $v0,5 # Read intger syscall move $arg, $v0 # move the data to target reg .end_macro # Macro: print_reg_int # Usage: print_reg_int() .macro print_reg_int ($arg) li $v0, 1 # print_int call move $a0, $arg # move the source reg value to $a0 syscall .end_macro # Macro: lwi # Usage: lwi (, , ) .macro lwi ($reg, $ui, $li) lui $reg, $ui ori $reg, $reg, $li .end_macro # Macro: push # Usage: push () .macro push($reg) sw $reg, 0x0($sp) # M[$sp] = R[reg] addi $sp, $sp, -4 # R[sp] = R[sp] - 4 .end_macro # Macro: push # Usage: push () .macro pop($reg) addi $sp, $sp, +4 # R[sp] = R[sp] + 4 lw $reg, 0x0($sp) # M[$sp] = R[reg] .end_macro .macro push_var_value($varName) lw $t0, $varName push($t0) .end_macro .macro push_var_address($varName) la $t0, $varName push($t0) .end_macro .macro call_printf($format) la $a0, $format jal printf .end_macro

CS47ProjectI/CS47_proj_alu_logical.asm
.include "./cs47_proj_macro.asm" .text .globl au_logical # TBD: Complete your project procedures # Needed skeleton is given ##################################################################### # Implement au_logical # Argument: # $a0: First number # $a1: Second number # $a2: operation code ('+':add, '-':sub, '*':mul, '/':div) # Return: # $v0: ($a0+$a1) | ($a0-$a1) | ($a0*$a1):LO | ($a0 / $a1) # $v1: ($a0 * $a1):HI | ($a0 % $a1) # Notes: ##################################################################### au_logical: # TBD: Complete it jr $ra

CS47ProjectI/CS47_proj_alu_normal.asm
.include "./cs47_proj_macro.asm" .text .globl au_normal # TBD: Complete your project procedures # Needed skeleton is given ##################################################################### # Implement au_normal # Argument: # $a0: First number # $a1: Second number # $a2: operation code ('+':add, '-':sub, '*':mul, '/':div) # Return: # $v0: ($a0+$a1) | ($a0-$a1) | ($a0*$a1):LO | ($a0 / $a1) # $v1: ($a0 * $a1):HI | ($a0 % $a1) # Notes: ##################################################################### au_normal: # TBD: Complete it jr $ra

CS47ProjectI/cs47_proj_macro.asm
# Add you macro definition here - do not touch cs47_common_macro.asm" #<------------------ MACRO DEFINITIONS ---------------------->#

CS47ProjectI/cs47_proj_procs.asm
# ***** DO NOT MODIFY THIS FILE **** # .include "./cs47_common_macro.asm" .text .globl printf #----------------------------------------------- # C style signature 'printf(,, # , ... , )' # # This routine supports %s and %d only # # Argument: $a0, address to the format string # All other addresses / values goes into stack #----------------------------------------------- printf: #store RTE - 5 *4 = 20 bytes addi $sp, $sp, -24 sw $fp, 24($sp) sw $ra, 20($sp) sw $a0, 16($sp) sw $s0, 12($sp) sw $s1, 8($sp) addi $fp, $sp, 24 # body move $s0, $a0 #save the argument add $s1, $zero, $zero # store argument index printf_loop: lbu $a0, 0($s0) beqz $a0, printf_ret beq $a0, '%', printf_format # print the character li $v0, 11 syscall j printf_last printf_format: addi $s1, $s1, 1 # increase argument index mul $t0, $s1, 4 add $t0, $t0, $fp # all print type assumes # the latest argument pointer at $t0 addi $s0, $s0, 1 lbu $a0, 0($s0) beq $a0, 'd', printf_int beq $a0, 's', printf_str beq $a0, 'c', printf_char printf_int: lw $a0, 0($t0) # printf_int li $v0, 1 syscall j printf_last printf_str: lw $a0, 0($t0) # printf_str li $v0, 4 syscall j printf_last printf_char: lbu $a0, 0($t0) li $v0, 11 syscall j printf_last printf_last: addi $s0, $s0, 1 # move to next character j printf_loop printf_ret: #restore RTE lw $fp, 24($sp) lw $ra, 20($sp) lw $a0, 16($sp) lw $s0, 12($sp) lw $s1, 8($sp) addi $sp, $sp, 24 jr $ra

CS47ProjectI/proj-auto-test.asm
# ***** DO NOT MODIFY THIS FILE **** # .include "./cs47_common_macro.asm" .include "./cs47_proj_macro.asm" # data section .data .align 2 matchMsg: .asciiz "matched" unmatchMsg: .asciiz "not matched" charCR: .asciiz "\n" testD: .word 0xffffffff var0: .word 0x00000000 var1: .word 0x00000000 var2: .word 0x00000000 var3: .word 0x00000000 testV1Arr: .word 4 16 -13 -2 -6 -18 5 -19 4 -26 testV2Arr: .word 2 -3 5 -8 -6 18 -8 3 3 -64 noTest: .word 10 passTest: .word 0 totalTest: .word 0 opList: .byte '/' '*' '-' '+' testFlag: .word 0x0 as_msg: .asciiz "(%d %c %d) \t normal => %d \t logical => %d \t [%s]\n" mul_msg: .asciiz "(%d %c %d) \t normal => HI:%d LO:%d \t\ logical => HI:%d LO:%d \t [%s]\n" div_msg: .asciiz "(%d %c %d) \t normal => R:%d Q:%d \t\ logical => R:%d Q:%d \t [%s]\n" finalMSG: .asciiz "*** OVERALL RESULT %s ***\n" statPASS: .asciiz "PASS" statFAIL: .asciiz "FAILED" testStatus: .asciiz "\n\nTotal passed %d / %d\n" .text .globl main ##################################################################### # Main Program ##################################################################### main: add $s0, $zero, $zero # $s0 = 0 ; used as index lw $s1, noTest test_loop: mul $t0, $s0, 4 # $s3 = testV1Arr[$s0] la $t1, testV1Arr add $t1, $t1, $t0 lw $s3, 0($t1) # $s4 = testV2Arr[$s0] la $t1, testV2Arr add $t1, $t1, $t0 lw $s4, 0($t1) addi $s5, $zero, 4 op_loop: addi $t0, $s5, -1 la $t1, opList add $t1, $t1,$t0 lb $s6, 0($t1) # increase number of tests lw $t0, totalTest addi $t0, $t0, 1 sw $t0, totalTest # normal operation or $a0, $s3, $zero or $a1, $s4, $zero or $a2, $s6, $zero ori $v0, $zero, 0x0 ori $v1, $zero, 0x1 jal au_normal sw $v0, var0 sw $v1, var1 # logical operation or $a0, $s3, $zero or $a1, $s4, $zero or $a2, $s6, $zero ori $v0, $zero, 0x2 ori $v1, $zero, 0x3 jal au_logical sw $v0, var2 sw $v1, var3 # Set if mul or div # print the result lw $t0, var0 lw $t1, var2 bne $t0, $t1, main_mismatch beq $s6, '*', main_extra_match beq $s6, '/', main_extra_match j main_L6 main_extra_match: lw $t0, var1 lw $t1, var3 bne $t0, $t1, main_mismatch main_L6: push_var_address(matchMsg) lw $t0, passTest addi $t0, $t0, 1 sw $t0, passTest j main_L5 main_mismatch: push_var_address(unmatchMsg) ori $t0, $zero, 0x1 sw $t0, testFlag main_L5: push_var_value(var2) beq $s6, '*', main_ins_1 beq $s6, '/', main_ins_1 j main_L1 main_ins_1: push_var_value(var3) # main_ins_1 main_L1: push_var_value(var0) # main_L1 beq $s6, '*', main_ins_2 beq $s6, '/', main_ins_2 j main_L2 main_ins_2: push_var_value(var1) # main_ins_2 main_L2: push($s4) # main_L2 push($s6) push($s3) beq $s6, '*', main_print_mul beq $s6, '/', main_print_div call_printf(as_msg) j main_L3 main_print_mul: call_printf(mul_msg) # main_print_mul j main_L3 main_print_div: call_printf(div_msg) # main_print_div j main_L3 main_L3: pop($t0) # main_L3 pop($t0) pop($t0) pop($t0) pop($t0) pop($t0) beq $s6, '*', main_pop_2 beq $s6, '/', main_pop_2 j main_L4 main_pop_2: pop($t0) pop($t0) main_L4: addi $s5, $s5, -1 # main_L4 bnez $s5 op_loop addi $s0, $s0, 1 bne $s0, $s1, test_loop # Test statistics lw $t0, totalTest push($t0) lw $t0, passTest push($t0) call_printf(testStatus) pop($t0) pop($t0) # Final msg lw $t0, testFlag beqz $t0, main_pass push_var_address(statFAIL) j main_L7 main_pass: push_var_address(statPASS) main_L7: call_printf(finalMSG) pop($t0) exit

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Assignment Guru
Quality Homework Helper
Professional Coursework Help
Fatimah Syeda
Solutions Store
Top Writing Guru
Writer Writer Name Offer Chat
Assignment Guru

ONLINE

Assignment Guru

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$45 Chat With Writer
Quality Homework Helper

ONLINE

Quality Homework Helper

As per my knowledge I can assist you in writing a perfect Planning, Marketing Research, Business Pitches, Business Proposals, Business Feasibility Reports and Content within your given deadline and budget.

$35 Chat With Writer
Professional Coursework Help

ONLINE

Professional Coursework Help

I have worked on wide variety of research papers including; Analytical research paper, Argumentative research paper, Interpretative research, experimental research etc.

$17 Chat With Writer
Fatimah Syeda

ONLINE

Fatimah Syeda

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$42 Chat With Writer
Solutions Store

ONLINE

Solutions Store

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$38 Chat With Writer
Top Writing Guru

ONLINE

Top Writing Guru

I can assist you in plagiarism free writing as I have already done several related projects of writing. I have a master qualification with 5 years’ experience in; Essay Writing, Case Study Writing, Report Writing.

$26 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Education and School Law Order - How to memorize ions - Exchange 2010 activesync device list - Walmart china supply chain transformation - Ігри - Wall street journal ipad app problems - Nessus scanning best practices - Phil greening natalie imbruglia - Inténtalo textbook escribe el equivalente de las palabras en inglés - Estimated level of developmental stage for this age grade - Building certifier course qld - Emerging Issues in Mental Health care - Kenwood th f6a vs yaesu vx 6r - What are aqua dragons - HA535 Unit 10 Discussion - Benchmark assignment spiritual needs assessment and reflection - Ryde and rowe inc. had the following account balances as of january 1. - Document control master list template - 2 address instruction example - 02.04 module two quiz geometry answers - Handbook of Research Methods for Tourism and Hospitality Management - If i were a boy just for a day - Data Objects PPT - In economic downturns, forecasters may witness rising sales in which of the following industries? - Who founded gerber baby food - Partial functional dependency example - Marketing engineering for excel - Pressure Ulcer Case Study - Nutricalc plus program - I- to i2 half equation - Star in a box - What is optimum water content - Koi moodle - Centrelink business online logon - Simon kendall cardiothoracic surgeon - How to Choose App Developers in New York? - Give me liberty an american history 5th edition pdf - Teaching experience paper 1,500 words by 10/04/2020 at 4:00 pm,Apa style , please add references and citations - How gram staining works - Virtual spectroscopy lab - Prodiscover basic download - Please make sure before taking Research paper(5-7)to complete all the mentioned requirement with APA format, proper reference and no plagiarism - Ethical dilemmas in education scenarios - Http www rachaelrayshow com club rr giveaways - Weekly grammar worksheet apostrophes julie faulkner answers page 8 - Joe vigil training philosophy - Nonverbal communication survey questionnaire - Describe what each letter stands for in the cvp graph - Eveline by james joyce questions and answers - Westongrove partnership repeat prescription - Active directory design proposal - DISCUSSION AND RESPONSE DUE IN 16 HOURS - Describe The Role of the Board of Directors in the Strategy-Magking - I need (3 pages) on Paradise Found (Islamic Culture Documentary) - Essay - Kelli boyd kenneth bianchi - Many customers get their first impression of your company from - Standard costing exam questions - Certificate ii or higher in community pharmacy - Non sequitur examples in commercials - Process cost summary - Nitration of methyl benzoate equation - Diethyl dimethylbutyl cyclohexane - Wes moore speech - Leadership - A wrinkle in time genre - Accounting & finance - How to manipulate surds - One trial learning examples - Dog star training witham - Economic from the ground up answers - Apple's ecosystem - Bile acid test normal range dog - Is college worth the cost essay - Sugars - Week 9 assignment data mining - Spanish american war crossword puzzle answers - Basal and ceiling rules for woodcock johnson - Achieving Excellence with MSN in Care Coordination Assignment Writing Services - 3560 kj to calories - Wawa supply chain management - 15m hdmi cable jaycar - Portfolio Assignment: The Role of the Nurse Informaticist in Systems Development and Implementation - Reading discussion - Hlt 362 exercise 29 - Connect accounting answers chapter 9 - Iron mountain union city flexe - Answering two questions - Models for writers short essays for composition 13th edition pdf - Sulfate gravimetric analysis post lab questions - John f antioco net worth - Berlin airlift lesson plan - A study with questionable sponsorship or motives - Stat-x aerosol fire suppression pdf - Oxford scale muscle testing - How might it have inspired bradbury to write fahrenheit 451 - Hsc french continuers 2010 - Deliverable 1 - Attracting the Eyes of Viewers - Silent storm atomic testing in australia - Phet forces and motion