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

Business ethics - Artisan republicanism - Ss 600 1 6rs - Health and safety vision statement examples - Describe the importance of effective communication in the correctional setting - Human anatomy exam 1 study guide - 2 emperical research and development theory - During 2010 raines umbrella corp had sales of - Heat pump lab report - Uni of sheffield registration - Discussion response - Question - Translational Research And Population Health Management - The crucible vs the dressmaker - Nepal health professional council - Python - Methods of risk analysis in capital budgeting - Altech uec remote control model b3 - Leading the Process of Organizational Change - 21823 friendship view drive springdale ar - Discussion response to 2 students - Prevention of intoxication on licensed premises guidelines - Jay belson looks like actor - Java Lab 6 - Netflix in 2012 can it recover from its strategy missteps - Ec0 110 aSSIGNMENT - Writing assignment - I need help writing a paper - How to write a mental status exam - Microstrip line width calculator - Week 6 Discussion - Creating production possibilities schedules and curves edgenuity answers - Celta assignment focus on the learner example - 95 management interview questions and answers pdf - Cascading of circuit breakers - Visual communication in the media rasmussen - Dob in a tax cheat - Beachcomber hotels mauritius rates - General mills stock split history - Anotec dark grey colorbond - Calculating the cost of credit card purchases worksheet answers - Which of the following would cause stagflation - Health the basics donatelle rebecca j 2019 13th edition - Multiple quantifiers predicate logic - Sqa national 5 physics assignment candidate guide - Henley and grange rsl - Penn foster writing skills part 3 answers - 1189 mm to cm - Jejunostomy feeding procedure ppt - Managing a diverse workforce writing 5 - Infant observation paper - Greatest integer function of 2x - A clean well lighted place questions and answers - Components of physical fitness involved in basketball passing - Unit 2 IP Technological Influences - Case study on od interventions - Inverse lever law phase diagrams - Cinnamon and warfarin interaction - The literature associated with any CBT oriented treatment - Jeld wen chestnut bronze - Gideon v wainwright case brief summary - Gdp 11e online software student registration card printed access code - Sales and marketing operations manual - Paediatric vital signs nsw health - Ashrae heat balance method - Philosophy - How to motivate employees during layoffs - Ba oh 2 h3po4 - Formal and informal groups ppt - Graduate certificate in employment relations - Billy kratzert net worth - Examples of business rules and requirements - What's the square root of 54 - Parisians were startled by berlioz's fantastic symphony because of its - International business management - Grouping ell students based on proficiency - Sydney water pool filling permit - Live wire hot rod shop follows the revenue recognition principle - Outer worlds divert power choice reddit - Disuccsion - Bearing wholesalers wetherill park - The widow of ephesus full text - Wiki wireshark sample captures - What are 4 similarities between mitosis and meiosis - Casement black diaries extracts - Microbiology essay questions and answers pdf - Anth journal - 5 star writing checklist - Ethanol to ethanal equation - Database input node in iib - Business - As nzs 3500.3-2018 pdf - Art deco flower arrangements - Observational medical outcomes partnership - The retailer considers visa and mastercard sales as - Sly dealings skill in deceiving - WEEK 5 Discussion 1 Clinical Concepts - Bank muscat azaiba branch contact number - Weed and seed declaration - Amoeba sisters video recap alleles and genes key