8 bit Instruction set ?

hello experts
I need some help
I want to make 8 bit instruction using folloing component so I made one simple example

8 bit instruction set
4 bit opcode + 2 bit source register +2 bit destination register+ 4 bit data

accumulator A
memory register R1
memory register R2
memory register R3



opcode         source       destination       data
0010               00               00                 xx
                 R1  01           A  01                xx
                 R2  10               XX                xx
                 R3  00               XX                xx


load data directly into R1
mov R1#data


opcode     source      destination       data
0010         R1 01          00                  data

load data directly into R2
mov R2#data


opcode     source      destination       data
0010         R2 10          00                  data

load data directly into R3
mov R3#data


opcode     source      destination       data
0010         R3 11          00                  data

load data directly into A
mov A#data


opcode     source      destination       data
0010            00         A  01                  data

mov the content of R1 into Accumulator
mov A, R1


opcode     source      destination       data
0010         R1 01          01                  disable

mov the content of R2 into Accumulator
mov A, R2


opcode     source      destination       data
0010         R2 10          01                  disable

mov the content of R3 into Accumulator
mov A, R3


opcode     source      destination       data
0010         R3 11          01                 disable

don't use any register disable


opcode       source       destination       data
0010               00               00                 xx      don't use register

rickharris3 years ago

http://e-tradition.net/bytes/6502/6502_instruction...

More than deals with your problem.

To make much sense out of this you really need to explain more.

Is this real or just a paper exercise.

If real what are you running it on?

If paper what are the constraintes you have.

vead (author)  rickharris3 years ago

hello

its just a paper exercise.

4 bit opcode + 2 bit source register +2 bit destination register+ 4 bit data

  • 4 bit alu
  • sel1 source register for alu
  • sel2 source register for alu
  • destination register for alu

    program memory

  • Program memory address bus -
  • Program memory data bus -
  • Program memory read enable;
  • Ram memory
  • Register memory address bus -
  • Register memory data bus -
  • Register memory read enable;
  • Register memory write enable

    accumulator register

  • rickharris vead3 years ago

    Then you should be able to apply the rest of you lesson!

    http://www.atmel.com/Images/doc4747.pdf

    may help you

    vead (author)  rickharris3 years ago

    data transfer instruction from A resistor to R1 resistor

    Instruction set

    c c c c c c a b b b b r r r r r data

    ----------- - ------- ---------

    --opcode--- a --bit-- register data

    6 bit op code - specify operation code such as add,mov ,subtract

    A (choose memory registers or accumulator )

    1 indicate A and 0 indicate memory register

    4 bit data

    4 bit source - specify the source

    5 bit destination -specify the destination

    mov A #data

    load data with A register

    100010 1 1111 11100 data

    ----------- - ------- ---------

    --opcode--- a --bit-- register data

    mov R1 #data

    load data with R1 resistor

    100010 0 1111 11100 data

    ----------- - ------- ---------

    --opcode--- a --bit-- register data