Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 19th January 2004, 05:35 PM   (permalink)
Default Processor Instruction Format

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.
__________________
http://www.malaysia-edu.net
irc://irc.malaysia-edu.net/Malaysia
mus3na is offline  
Old 19th January 2004, 07:13 PM   (permalink)
Default

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.
crust is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 05:57 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker