Beltmatic

Beltmatic

Not enough ratings
Lisp-like calculation pipeline
By FlameRat
Stackable, chain-able design to calculate any number similar to Lisp.
   
Award
Favorite
Favorited
Unfavorite
Overview
This is a general-purpose pipeline that's stackable and chain-able, that can calculate any number as long as the process can be converted to Lisp-like formula.

Although a bit space consuming, this design has a benefit of allowing you to stack parts indefinitely, due to every processor being "packaged" into having the same input and output "pinout".

Components

This is how the processors and belts are layout. For each processor M, and its two inputs (operands) a and b, the S-expression
(M a b)
would layout in a way that a comes from the right, b comes from top-left, and result goes out to the left.

---


This is the "terminal block", which ensures that the input is sent to the correct lane without needing a separate belt design. From a technical stand point, this can be considered an "identity function processor", which takes an input and output as-is.

It is needed whenever you wish to start a new chain of calculation.

---


This is how to output out of the chain. The output can be sent to the receiver or another chain as an input.

Note that the output only need to be located on the left of the last processor in the chain, and doesn't necessarily be on the left of the input as long as they both are on the left of the last processor.
Example

The above layout calculates the following S-expression.
(+ ( (* a b) (+ c) (* d) ) ( (+ e f) (* g) (* h) ) )

Which represents
a * b + c * d + ((e + f) * g * h)

---

The above layout calculates the following S-expression.
( (+ (* a b) ( (+ c d) (* e) (* f) ) ) (* g) (+ h) )

Which represents
( (a * b) + (c + d) * e * f ) ) * g) + h
Note
When using this design, try finding a location where all needed numbers are present and being approximately at where it needs to enter a chain to reduce some work.

Also this design can be expanded to 12 lanes or even more, I went for 6 because that's what I was using before solidifying the design to be copied everywhere.

Also also after figuring out this design the game feels "solved" to me and really kills my mood to try finishing the game. Like, this is so useful I can just try copying it everywhere to do the job. It's really just a matter of how many of these I wish to build. And without any layer of abstraction (as per similar games goes) this goes tedious real quick.

And lesson learned? IP cores are invaluable in circuit design.
2 Comments
tunasaladx 1 Nov, 2024 @ 12:59pm 
@Christopher The pictures match the S-expressions. What the first S-expression "means" is written incorrectly; it should be (a * b + c) * d + ((e + f) * g * h)

The inputs (a, b, c, etc.) come from the bridges. The bridge on the bottom-right corner gives "a", the one to its left gives "b", and so on. When you reach a belt coming down from above, the next letter comes from the far right of above (so in the second example, "c" comes from the top-right corner, "d" to its left, then "e", then "f". "g" is the next one on the bottom row).
Christopher Nolm 6 Sep, 2024 @ 2:10pm 
Do the pictures match the expressions? I can't follow it through.