Sunday 16 December 2012

topic 4 subtopic 5 : Fundamentals of emulation and Qtspim

FUNDAMENTAL OF EMULATION

  
Definition of fundamental is means serving as a foundation or basis or basic of a structure. The term "emulation" comes from the verb "emulate," which means to imitate or reproduce. Therefore, computer emulation is refers to the ability of a computer programme in an electronic device when one system imitates or reproduces another system with the technique of using an emulator to emulate (imitate) another program or device.Emulation works by handling the behavior of the processor and the individual components by using emulator which is a software application that can accurately imitate another computer, mobile phone, device or even arcade machine and run software from that computer. Virtually every home computer system that has been ever created has been emulated. Modern CPU can execute code thousands of times faster than computers from the early 80s and there are emulators for systems as recent as the Sony PlaySation 2 and PSP. An emulator is similar (in theory) to an interpreter and works in a similar way though an emulator does far more than just interpret instructions. 

Emulation also benefit to us which allows the user to use programs & applications that are otherwise completely incompatible with the machine or operating system they're using. For example, if a Mac-OS X user needs to use a particular program that can ONLY run in Windows, the user would have to use an emulator program that tricks the Mac-OS X computer into thinking it's a Windows computer. 








Qtspim


Qtspim is a self-contained simulator that runs MIPS32 programs. It reads and executes assembly language programs written for this processor. It also provides a simple debugger and minimal set of operating system services and does not execute binary (compiled) programs. Qtspim implements almost the entire MIPS32 assembler-extended instruction set. (It omits most floating point comparisons and rounding modes and the memory system page tables.) The MIPS architecture has several variants that differ in various ways (e.g., the MIPS64 architecture supports 64-bit integers and addresses), which means that it will not run programs for all MIPS processors.



When you open QtSpim, A window will open as shown in figure . The window is divided into different sections:

1.Register tabs display the content of all registers.






 



2. Buttons across the top are used to load and run a simulation

3. The Text tab displays the MIPS instructions loaded into memory to be executed.
(From left-to-right, the memory address of an instruction, the contents of the address
in hex, the actual MIPS instructions – where register numbers are used, the MIPS
assembly that you wrote, and any comments you made in your code are displayed.)







4. The Data tab displays memory addresses and their values in the data and stack
segments of the memory.

5. The Information Console lists the actions performed by the simulator.
example figure





Example Qtspim coding:

## Program adds 10 and 11
           .text # text section
           .globl main # call main by SPIM
main:
            ori $8,$0,0xA # load “10" into register 8
            ori $9,$0,0xB # load “11" into register 9
            add $10,$8,$9 # add registers 8 and 9, put result
            # in register 10

here is the tutorial link for the Qtspim.
http://www.youtube.com/watch?v=1jrZSK7Azp4





LIEW JUN JIE
B031210374

3 comments:

  1. i can understand well.^^

    ReplyDelete
  2. thanks.finally i can understand

    ReplyDelete
  3. erm!! the explanation not bad=] keep it

    ReplyDelete