Ijert: 32-Bit Risc Processor For Computer Architecture
Ijert: 32-Bit Risc Processor For Computer Architecture
Ijert: 32-Bit Risc Processor For Computer Architecture
ISSN: 2278-0181
Vol. 1 Issue 8, October - 2012
support a specific instruction set and its own programming there is a lack of understanding in
assembly code with proper instruction format. dataflow. Another approach uses MSI digital
The instruction set should have simplicity and components such as TTL to construct a computer
IJE
www.ijert.org 2
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 8, October - 2012
Rd: Destination Register; Rs: Source Register; were used, one for the higher word and one for the
k: Constant; PC : Program Counter; A : address lower word (32-bit instruction). The instruction
decoder deal with the raw data stored in the
Instructions are reclassified according to instruction registers and separates it in parts:
type of operands as follows: Operation code (OPCODE), Rd, Rs and A/K, so
Type J (Jumps): only use the OPCODE that these values can be sent to the corresponding
and a constant value (k); component, like the ALU, General Purpose
Type I (Immediate data): use the register block etc. This is achieved simply by
OPCODE, a density (Rd) or source (Rs) using a set of buffers inside a block to sort the
register and a constant value(k); signals to separate buses.
Type R (Register operation): require a General Purpose Resisters (GPR)
single destination register or both: GPRs store and save operands and results
destination and source register. during program execution. ALU and memories
must be able to write/read those registers, so a set
Type J: of eight 8-bit registers were used, along with
OPCODE Not Used K multiplexers and a decoders to control which
register is read or written. Two registers can be
Type I: written at a time.
OPCODE Rd k/A
Type R:
OPCODE Rd Rs Not Used
www.ijert.org 3
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 8, October - 2012
Arithmetic Logic Unit (ALU)
The ALU has 8 operations; each one of
them was created and converted into a symbol, 0
then a multiplexer was placed to a obtain a 3-bit
selector. Also it has 3 Flags: carry (C), half carry
(H) and zero (Z), which indicate whether there is a
carry, a half carry or a zero after any ALU
operation. 1
RAM Data Memory
The RAM memory is a data storage block,
there the stack is handled and other data are kept
as variables. It is built with 32 memory blocks of
32 bits each one. The address input is divided in 2 2
parts. The first part has 3 bits select the memory
block to read or write using a decoder. The second
has 5 bits that select the memory location between
0 and 31.
3
V. RESULTS
RT
www.ijert.org 4
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 8, October - 2012
Table II : TRUTH TABLE FOR CONTROL
UNIT STATE MACHINE
INSTRUCTIONS
GPR_SOURCE1
GPR_SOURCE0
ALU_SOURCE
RAM SOURCE
RAM_WRITE
GPR_WRITE
PC SOURCE
PC_CLOCK
IDR_LOAD
PC_LOAD
IR_LOAD
STATE
0 0 0 0 0 0 0 0 0 0 0 0 Reset
1 0 0 0 1 1 0 0 0 0 0 0 Fetch
JMP,
BRC,
2 1 0 0 0 0 0 0 0 0 0 0
BRZ,
BRH
Fig 6. Simulation of an applicationI (Subroutine jump)
3 0 1 0 0 0 0 0 0 0 0 0 Inc. PC
2 0 0 0 0 0 1 0 0 0 0 0 LDI
2 0 0 0 0 0 1 0 1 0 0 0 LDD
2 0 0 0 0 0 0 0 0 0 1 0 STD
ADDI,
2 0 0 0 0 0 1 1 0 1 0 0
SUBI
ADD,
RT
SUB,
AND,
2 0 0 0 0 0 1 1 0 0 0 0
OR, NOT,
IJE
SHL,
SHR
2 0 0 0 0 0 1 0 1 0 0 1 LDX
2 0 0 0 0 0 0 0 0 0 1 1 STX
2 0 0 0 0 0 1 1 1 0 0 0 LDP
2 1 0 1 0 0 0 0 0 0 0 0 JMR
Fig. 6 shows the jump to the subroutine which is Fig 7. Simulation of a test application (Storage in RAM)
executed when the PC changes from one value to
another value. IV. CONCLUSION
From this task we can observe that
flexibility of a design, which supports a great
modification and improvement of the design. The
simplicity of the design-based on functional blocks
make understanding of each part of a modern
computer works.
The circuit which is obtained can be used as
soft core processor for FPGA designs that would like
to add a CPU to handle other peripheral devices.
www.ijert.org 5
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 8, October - 2012
References:
[1] W. Stallings, Organizacin y Arhitecture
Computadoras, 7Editin, Pearson, 2006.
[2] M. Mano, Arquitectura de computadoras,
3 Editin, Pearson, 1994.
www.ijert.org 6