Project Red - Fabrication

Project Red - Fabrication

19M Downloads

A cell like null cell for wires, but for bundles

makkarpov opened this issue · 8 comments

commented

It would be very nice to have such cell, because in complex 64x64 IC designs it sometimes necessary to cross bundled wires over each other. A cell that crosses bundle over plain wire will be also useful.

commented

you can make this with fabrication now

commented

AFAIK, currently fabrication does not have such cells. I can make "wire crossing IC", but I think that these cells will be most useful inside fabrication designs.

commented

Tried to built 16-bit adder/subtractor IC (IC that has all sides bundled - one side for A input, one side for B input, one side for output and one side for carry and control wires) and quickly discovered that it almost impossible to feed all adding units with data unless some bundled crossing cell exists. So please implement it.

commented

Yes, will do this soon.

commented

I wanted to give an idea for implementation of this feature, based on how wire nets work now now.

When IC is being compiled, tiles basically ask "What is placed left / right / below / on top of me?" and then connect nets accordingly. Checking what's to the right works like this pseudocode:

return tiles[x+1,y];

My idea is, a special "Wire crossover" tile can be added, which, whenever it is probed like that, redirects to the next tile in the same direction. That is, the previous pseudocode then will transform into following:

d=1;
while (isCrossover(tlies[x+d,y])) ++d;
return tiles[x+d,y];

Thus, these crossover tiles would "collapse" the grid, making it so that tiles on both ends of a "bridge" would behave as if they were adjacent.

The modification seems pretty straightforward, but I don't really know Scala and I'm mostly unfamiliar with this mod's internals, so I'm pretty much guaranteed to waste a lot of time on it and screw up a few times in process. So there won't be a pull request from me, at least for a while.

commented
commented

Nice to know that it's being worked on.
I did notice the slightly inconvenient assumption of one net per tile, thus my suggestion to treat crossovers as "grid irregularities" (wormholes?) instead of actual wires or gates (thus without any nets at all), which should mostly require replacing calls to ic.getTile(pos.offset(r)) with code that would skip over crossover tiles.
Using per-side nets and propagation masks is, of course, a more versatile solution. (And more difficult to implement.) It should also make it easier to implement array gates. Now that I think of it, making array gates work with my "wormhole" suggestion would be rather difficult.

commented

This is being discussed here: #1616