Close

some cases

A project log for Jelly

A minimal DIY 8-bit CPU made with TTL chips, to perform native brainfu*k language, extended to use three sequential access tapes.

Alvaro BarcellosAlvaro Barcellos 08/13/2022 at 23:200 Comments

case of lookups

Jelly translate all byte code information into a set of 16 valid commands, which use microcodes to change control lines to sequences of predefined states of machine.

These sequences are stored in eeproms at addresses defined by, a low nibble of pipeline cycles (M0-M3), a middle nibble of opcodes (M4-M7) and a high nibble (M8-M11) for allow different pages.

With just 16 opcodes for and using 16 cycles of pipeline, then a complete code page occupies only 256 bytes.

case of buffers

In Jelly, all devices share same data bus and must don't have simultaneous access. 

The data bus is isolated by four 3-state buffers, one for input data to decode and execute, one for output control  to devices, one to input data to process, one to output processed data. 

Each buffer have a select and a enable signals, (CP) to import and hold data from and (OE) to export data into, the data bus. 

These signals are named as (CP0, OE0) for first buffer, (CP1, OE1) for the second, (CP2, OE2) for the third, (CP3, OE3) for the forth.

case of devices

Any microcontroller has three distinct information spaces, one for "code" to be executed, one for "data" to be processed, one for "in/out" devices access.

In Jelly, these spaces are like tapes, sequential access tapes, three tapes that can be selected, moved backwards or forwards in steps, and can be read or written.

The signals to the control tapes are,  (BOB) to select tape 0, (ONE) to select tape 1, (TWO) to select tape 2, (RD) to allow read, (WR) to allow writes, (FW) to move forward, (BK) to move backward, also a (HLT) halt signal for devices.

Note that, the input/output space allow multiple devices be connected and used.

An analogy is a unique memory device with  have three pointers de acesso

case of operations

In Jelly, only one byte value can be accessed a time.

There are just copy, increase, decrease, negate and clear, no math operations with dual operands.

Just one flag for when value is zero and one flag for when pipeline cycle is zero.

There are signals for data are only (UP) increase a value or (DN) decrease a value, also extra for (CP) copy a value and (CL) clear a value.

(Need some extra logic chips for flags.)

case of signals

In Jelly, all signals are not multiplexed and are combined as:

For (BOB, ONE, TWO), reserve 0b100, 0b001, 0b010 for exclusive selection of each tape, 0b000 for no tape, 0b111 for halt, and 0b101, 0b110, 0b011, to set internal flags for other actions.

For (RD, WR), set 0b00 to do nothing, 0b01 to read, 0b10 to write, and 0b11 to repeat the last action.

For (FW, BW), set 0b00 to do nothing, 0b01 backward, 0b10 forward, and 0b11 to repeat the last move.

For (UP, DN), set 0b00 to do nothing, 0b01 to increase, 0b10 to decrease, and 0b11 to repeat the last operation.

internal flags

When two tapes are selected ( 0b101, 0b110, 0b011 ), is invalid for access the tapes and must be wipe out of data bus but could be useful for control internal flags.

Discussions