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)
- 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
- Arithmetic overflow, bad address exception
- runtime error was shown
-
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