Created
December 14, 2019 21:30
-
-
Save EZLiang/42e4b82b7c47f0232c6770705bd66aa9 to your computer and use it in GitHub Desktop.
Transistoric
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NUTSHELL Transistoric | |
0: dead | |
1: wire | |
2: tail | |
3: head | |
4: splitter | |
5: splitter tail | |
6: splitter head | |
7: {Ng} semiconductor N | |
8: semiconductor N tail | |
9: semiconductor N charge | |
10: semiconductor N head | |
11: {Ps} semiconductor P | |
12: semiconductor P tail | |
13: semiconductor P charge | |
14: semiconductor P head | |
@TABLE | |
neighborhood: vonNeumann | |
states: 15 | |
symmetries: rotate4 reflect | |
head = (3,6,10,14) | |
tail = (2,5,8,12) | |
wire = (1,4,Ng,Ps) | |
shead = (10,14) | |
scharge = (9,13) | |
stail = (8,12) | |
swire = (Ng,Ps) | |
# logic 3-gate | |
1,0,head,wire,wire;3 | |
1,0,head,head,wire;3 | |
# logic 4-gate | |
1,head,wire,head,wire;3 | |
1,head,wire,wire,wire;3 | |
symmetries: permute | |
# semiconductors | |
swire,head,any,any,any;[0:(9,13)] | |
tail,scharge,any,any,any;[0] | |
## diode function | |
Ng,13,--13~3;8 | |
9,Ps,any~3;10 | |
symmetries: rotate4 reflect | |
13,any,any,8,any;Ps | |
## slowdown function | |
scharge,wire,0,wire,0;[0:shead] | |
## transistor function | |
Ps,9,any,any,any;14 | |
### PNP | |
9,13,any,any,any;10 | |
13,10,any,1,any;Ps | |
### T | |
Ng,13,any,wire,any;10 | |
symmetries: permute | |
# signal propagation | |
wire,head,any,any,any;[0:head] | |
head,any,any,any,any;[0:tail] | |
tail,any,any,any,any;[0:wire] | |
@COLORS | |
000:0 | |
F80:1 | |
888:2 | |
FFF:3 | |
FF0:4 | |
FF5:5 | |
FFA:6 | |
00F:7 | |
44F:8 | |
88F:9 | |
CCF:10 | |
F00:11 | |
F44:12 | |
F88:13 | |
FCC:14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RULE Transistoric | |
******************************** | |
**** COMPILED FROM NUTSHELL **** | |
**** v0.5.8 **** | |
******************************** | |
@NAMES | |
0 dead | |
1 wire | |
2 tail | |
3 head | |
4 splitter | |
5 splitter tail | |
6 splitter head | |
7 semiconductor N | |
8 semiconductor N tail | |
9 semiconductor N charge | |
10 semiconductor N head | |
11 semiconductor P | |
12 semiconductor P tail | |
13 semiconductor P charge | |
14 semiconductor P head | |
@TABLE | |
neighborhood: vonNeumann | |
symmetries: rotate4reflect | |
n_states: 15 | |
var any.0 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14} | |
var any.1 = any.0 | |
var any.2 = any.0 | |
var any.3 = any.0 | |
var head.0 = {10,3,6,14} | |
var head.1 = head.0 | |
var tail.0 = {8,2,12,5} | |
var wire.0 = {1,11,4,7} | |
var wire.1 = wire.0 | |
var wire.2 = wire.0 | |
var scharge.0 = {9,13} | |
var _a0.0 = {0,1,2,3,4,5,6,7,8,9,10,11,12,14} | |
var _a0.1 = _a0.0 | |
var _a0.2 = _a0.0 | |
1, 0, head.0, wire.0, wire.1, 3 | |
1, 0, head.0, head.1, wire.0, 3 | |
1, head.0, wire.0, head.1, wire.1, 3 | |
1, head.0, wire.0, wire.1, wire.2, 3 | |
7, any.0, any.1, any.2, head.0, 9 | |
11, any.0, any.1, any.2, head.0, 13 | |
tail.0, any.0, any.1, any.2, scharge.0, tail.0 | |
7, 13, _a0.0, _a0.1, _a0.2, 8 | |
9, 11, any.0, any.1, any.2, 10 | |
13, 8, any.0, any.1, any.2, 11 | |
9, 0, wire.0, 0, wire.1, 10 | |
13, 0, wire.0, 0, wire.1, 14 | |
11, 9, any.0, any.1, any.2, 14 | |
9, 13, any.0, any.1, any.2, 10 | |
13, 1, any.0, 10, any.1, 11 | |
7, 13, any.0, wire.0, any.1, 10 | |
1, any.0, any.1, any.2, head.0, 3 | |
4, any.0, any.1, any.2, head.0, 6 | |
7, any.0, any.1, any.2, head.0, 10 | |
11, any.0, any.1, any.2, head.0, 14 | |
3, any.0, any.1, any.2, any.3, 2 | |
6, any.0, any.1, any.2, any.3, 5 | |
10, any.0, any.1, any.2, any.3, 8 | |
14, any.0, any.1, any.2, any.3, 12 | |
2, any.0, any.1, any.2, any.3, 1 | |
5, any.0, any.1, any.2, any.3, 4 | |
8, any.0, any.1, any.2, any.3, 7 | |
12, any.0, any.1, any.2, any.3, 11 | |
@COLORS | |
0 0 0 0 | |
1 255 136 0 | |
2 136 136 136 | |
3 255 255 255 | |
4 255 255 0 | |
5 255 255 85 | |
6 255 255 170 | |
7 0 0 255 | |
8 68 68 255 | |
9 136 136 255 | |
10 204 204 255 | |
11 255 0 0 | |
12 255 68 68 | |
13 255 136 136 | |
14 255 204 204 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment