Close
0%
0%

Instruction Set for ECM-16/TTL homebrew cpu

All the instructions lead out in systematic manner

Similar projects worth following
The ECM-16/TTL cpu has quite a few instructions, and this project is a place where all of them are categorised and described in systematic way.

The instruction set can be subdivided into several broad categories:

- ALU operations on General Purpose Registers

- MOVs

- Loads of immediate values into registers

- Loads/Stores via explicit (direct) address

- Loads/Stores via address stored in Memory Pointer + offset

- Jumps

- Arithmetic operations on Memory Pointers

- Miscellaneous operations outside above categories.

These categories are defined by State Machine branching diagram.

  • General bit layout for instruction types

    Pavel01/26/2022 at 10:36 0 comments

    All instructions are 16-bit wide (1 word), with optional extension of 16 more bits for immediate value needed for some of these instructions.

    Bit patterns for the instruction types:
    
    bits in instruction word:   FEDC BA98 7654 3210  [extension]
    ALU:                        1xxx xxxx xxxx xxxx
    Load/Store via Mem Pointer: 011x xxxx xxxx xxxx  xxxx xxxx xxxx xxxx
    Load/Store via direct addr: 010x xxxx xxxx xxxx  xxxx xxxx xxxx xxxx
    MOV:                        0011 xxxx xxxx xxxx
    Load immediate value:       0010 xxxx xxxx xxxx  xxxx xxxx xxxx xxxx
    Jumps:                      0001 xxxx xxxx xxxx  xxxx xxxx xxxx xxxx
    Address Arithmetic:         0000 1xxx xxxx xxxx  xxxx xxxx xxxx xxxx
    Miscellaneous ops:          0000 0xxx xxxx xxxx
    

    All the 'x' places above can be either 0 or 1, depending on particular instruction.

    The extension word with immediate value is always present for Loads/Stores via direct address and Loads of immediate values, while for the Loads/Stores via Memory Pointer + offset, Jumps and Address Arithmetic instruction types it is optional, and depends on particular instruction. Thus, although I tried to make the ISA RISC-like, it has some elements of CISC in a sense that not all instructions are the same size.

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates