Professional Documents
Culture Documents
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
MULT 2:3, 5:2
RISC
Approach
ARM CPU
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
Basic Concepts
■Program counter: A register which holds the address of the next
instruction (subsequent instruction) to be executed. This enables faster
execution. Program counter is a register and it cannot be accessed by
the programmer. Or, the programmer does not know the address of
the program counter. It is purposefully hidden from the programmers
view.
■ Stack and Stack Pointer: Stack is a temporary storage area where the
values can be stored. For an instance when a function is called like add
(3,4), the arguments 3,4 would be kept in the stack (the operation is
called pushing) and it is a temporary storage area. Once the function
call is done and result is ready, the result will be again kept on the top
of the stack. Once the execution is complete, the stack can be cleaned
(the operation is referred to as popping). Stack pointer is a register
used to point the stack.
■ Bus: The channel through with the information flows. The data could
be the address or the data from a particular location. If the bus carries
the data, it is called data bus and in case addresses go through the bus,
it is referred as address bus. There are control signals to be sent for
controlling actions and in that case, the bus is referred as control bus
The speed of a computer processor, or CPU, is
determined by the clock cycle, which is the
amount of time between two pulses of an
oscillator. Generally speaking, the higher
number of pulses per second, the faster the
computer processor will be able to process
information. The clock speed is measured in
Hz, typically either megahertz (MHz) or
gigahertz (GHz). For example, a 4GHz
processor performs 4,000,000,000 clock cycles
per second.
The time required by the microprocessor to complete an
operation of accessing memory or input/output devices is
called machine cycle.
One time period of frequency of microprocessor is called t-state.
A t-state is measured from the falling edge of one clock pulse to
the falling edge of the next clock pulse.
Here, Fetch cycle takes four t-states and execution cycle takes
three t-states.
Four steps of Machine cycle
•Fetch - Retrieve an instruction from the memory.
•Decode - Translate the retrieved instruction into a series of
computer commands.
•Execute - Execute the computer commands.
•Store - Send and write the results back in memory.
Instruction Cycle
• The sequence of operations that the CPU has to
carry out for execution of an Instruction is
called instruction cycle.
• 1:- Read an Instruction
• 2:- Decode the instruction
• 3:- Find the address of operand
• 4:- retrieve an operand
• 5:- perform desired operation
• 6:- find the address of destination
• 7:- store the result into the destination
Frequency
Example
Example
Assume machine A has 5MHz Crystal and Machine B has 10 MHz
Crystal
0.1uS
0.7uS