Skip to content

sohyunwriter/Computer-Architecture-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer-Architecture-Project

Computer Architecture Team Project

What I did : change C code into Assembly code, mainly in charge of phase 3

  • resolve all of phase 2 problems so assembly code can simulate on SPIM simulator
  • use float rather than double, registers evenly, etc. to make better code
  • also make the code run on different problem (e.g. availble when the place of cities are changed)

Phase 1. TSP C programming

  • bit masking to check where we have been visiting
  • memorize the distance from the visited place to next place : must store ALL information
  • Tail Recursion

Phase 2. MIPS Aseembly programming

  • Arithmetic overflow, bad address exception
  • runtime error was shown

Phase 3. Resolve Phase 2 problem and simulate on SPIM simulator

  • add the distacne calculation code to operate on the new coordinate : available when the place of cities are changed

  • remove dynamic allocation; just declare array

  • use float data, rather than double : Can use simpler instruction, and less memory space

  • use more registers to avoid spending resources to move register : Registers are used as cache, so can reduce memory access and the number of instructions

  • Total instruction: 66350

spimSimul

spimIC

About

TSP 문제 C 및 MIPS 코딩 (팀)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published