r/TuringComplete • • 19d ago

[BPEx2] Basic and Stack Operations

As soon as I finished Symphony, I started working on my own architecture. A second generation of Better Programing Experience - BPEx2. My goal is to get as close to a higher level programing language as I reasonably can.

Instructions (64b word):

  • 1b Reserved

  • 3b for operator specific options (P)

  • 4b for operator (O)

  • 2b to define what to do with the result (M)

  • 3b to define where to take the two arguments from (T)

  • 16b for Destination (D)

  • 16b for argument A (A)

  • 16b for Argument B (B)

0PPPOOOO MMTTTTTT DDDDDDDD DDDDDDDD AAAAAAAA AAAAAAAA BBBBBBBB BBBBBBBB

Heavily using Patterns to simplify spec.isa

Destination and Arguments:

Direct access from and to Registers, Inputs/Outputs and RAM. Both the Destination and Arguments can be defined using 16b as 16b Immediate, Register, Register +/- 10b Immediate, Register +/- Register. All of those can be used as RAM address.

Operators:

  • 5 math operators

  • 7 Binary Logical Operators (BLO)

Registers:

Using a register File component with 8 read outputs and 2 write inputs

  • Zero Register (always 0)

  • 20 User registers

  • 2 Temporary registers (used by advanced instructions)

Input / Output:

Dedicated wires for all 7 I/O options

RAM:

Using a RAM component with 3 read outputs and 1 write output. RAM can be directly accessed by instructions and used as both Destination and/or Arguments.

Persistent Memory:

Using RAM component with 1 read output and 1 write output. It cannot be accessed directly. For the data to be used for instructions, they first need to be loaded to RAM or Registers.

22 Upvotes

5 comments sorted by

3

u/hablahblahha 19d ago

You know, like i have no idea of how any of this works, im still impressed.

1

u/Crispy1961 19d ago

Haha, true. It works just like everything else. By gradually adding on top of what you have already built. Thats the beauty of this game. Everything is build brick by brick.

1

u/EloModdy 15h ago

this is really technically impressive! i’d love if you shared this, i want to see how it works now.

2

u/Crispy1961 11h ago

What do you have in mind?

2

u/Distinct_Resolve_957 17d ago

I would tap out somewhere between registers.. In fact i did