ISA term project Anawil C. 5912087 Create a list of register - - PowerPoint PPT Presentation

isa term project
SMART_READER_LITE
LIVE PREVIEW

ISA term project Anawil C. 5912087 Create a list of register - - PowerPoint PPT Presentation

ISA term project Anawil C. 5912087 Create a list of register Assign pointer to point to array Code Create 2 variable to find clock cycle and how many time instruction has been executed Function to find register, once we receive input from


slide-1
SLIDE 1

ISA term project

Anawil C. 5912087

slide-2
SLIDE 2

Code

Create a list of register Assign pointer to point to array Create 2 variable to find clock cycle and how many time instruction has been executed Function to find register,

  • nce we receive input from

user and return index of register’s array

slide-3
SLIDE 3

Code (Cont.)

Function to move the value in the register Function addition Convert register into binary for calculation to find encoded value

slide-4
SLIDE 4

Code (Cont.)

Function subtraction Function multiplication Function divide

slide-5
SLIDE 5

Code (Cont.)

Convert int to binary Convert int to binary from 16-bits to 32-bits, after do multiplication Function carry, carry = 1 after sum 1 + 1, or carry = 0 after sum 1 + 0 or 0 + 1

slide-6
SLIDE 6

Code (Cont.)

Waiting for input And assign value to variable that is already define When we’re going to loop to keep executing until the user are done with the calculation It will keep adding instruction everytime there is new command Print the number of instructions and clock cycles, and CPI

slide-7
SLIDE 7

Code (Cont.)

Keep the discard after doing multiplication the size is double, after is done it should have temp value that is assign somewhere inside the register to keep the value of it

Print 32-bit value inside the register after doing multiplication of specific register. In this case we have 8 register so it’s going to have this if else 7, register number 7 (start from 0) will be temp register that keep track of multiplication and divide(previous value) For example 16 divide with 2, register 7(r7) will keep 16 inside the register

slide-8
SLIDE 8

Code (Cont.)

If there is no multiplication, then we can print normally with 16-bits register And waiting for new command, to end/quit the program (end 0 0)