Processor Instruction Format

Status
Not open for further replies.

mus3na

New Member
Hello;

i had to build an 8-bit processor base on RISC. As I know, one of characteristic of RISC is to have a same length of instruction. so, i used an 8-bit SRAM as a memory, and all program and data will store in this same memory. The processor should have 8 line for address and 8 line more for data.

however, i already got 24 instruction which will used 5-bit. so, how to design the instruction since the instruction is store in memory, mean it must be 8-bit width, and the address for sure need to used 8-bit. the only solution i see is to used 16-bit instruction, but it will used two memory location (and PC should increase by 2 after each instruction executed). But, there are half of the instruction is register to register operation, and this instruction can be fix into 8-bit width, is it waste to used 16-bit to hold instruction which is able to be filled in 8-bit memory. in other time, 8-bit is not enough for other half instruction.
 
There are machines with 8 bit instructions, but not many that I can think of. In any case, small processors like the AVR and PIC have 12 or 14 bit instructions. They use a harvard architecture which means that there are distinct data and instruction memories. The instruction memories are perhaps 1k deep by <instruction width> wide. The data memory is 8 or 16 bits or whatever. In your case, if you have a single memory and separate register file, you will need to do some clever instruction decoding.
Alternatively, you could force your design to use for instance an X and Y register for inputs and Z for output, that would eliminate some of the decoding.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…