notas sobre {poñg}, {bouncer-2d prototype} y ramificaciones

This commit is contained in:
sejo 2024-01-06 19:38:54 +01:00
parent 925ed185b6
commit 76fe6e7b64
15 changed files with 705 additions and 5 deletions

View File

@ -14,7 +14,7 @@ nos identificamos con las ideas del {permacomputing}.
# investigación
nuestra principal línea de exploración son {las danzas}, pero también diseñamos y desarrollamos {coloring computers}, y exploramos {beans computing}.
nuestra principal línea de exploración son {las danzas}, pero también diseñamos y desarrollamos {coloring computers}, y exploramos {cómputo frijol}.
¡nos encanta compartir! ya sea en tutoriales o pláticas y talleres.

View File

@ -1,14 +1,20 @@
# beans computing
lang=en es->{cómputo frijol}
non-electronic {digital systems} based on manipulating beans according to simple logical rules.
inspired by {the beans computer}, but going at a lower level. most of the times this is related to {paper computing}.
the {computadora de papel} is also related as a beans-based, "higher level" computer.
# projects and prototypes
# projects
{norpet} is a proof-of-concept for ideas we have about beans computing in an 8x8 grid or board.
=> ./img/foto_norpet_02.png closeup photo of the norpet board completely solved in one of its states: the grid is full of either soy or black beans.
# prototypes
{bouncing ball logic} and {bouncer-2d prototype} provide some notes from the initial development of {poñg} around 12020.
=> ./img/secuencia_bounce2d-8x6-0a3.gif a sequence of four frames showing two paper boards with black and soy beans in them: the one in the left contains the processing cells, and the one in the right looks like a screen composed of soy beans except for one, which seems to be moving from the top left corner to the bottom and right.
# truth tables

View File

@ -0,0 +1,44 @@
# bouncer2d-8x6 computadora de mesa (prototipo)
lang=es en->{bouncer-2d prototype}
computadora de mesa con pantalla monocromática de 8x6: no electrónica, a escala humana, y muy lenta. un experimento de {cómputo frijol}.
siguiendo unas reglas simples, puedes colaborar con ella para computar y mostrar la animación de una pelota rebotando en las paredes de la pantalla, un cuado a la vez.
=> ./img/secuencia_bounce2d-8x6-0a3.gif a sequence of four frames showing two paper boards with black and soy beans in them: the one in the left contains the processing cells, and the one in the right looks like a screen composed of soy beans except for one, which seems to be moving from the top left corner to the bottom and right.
# descargas
=> https://ipfs.io/ipfs/QmfQwdoc68dPXnGTspTiWu8xjpCLGUaH7YYFUmx84YUtwS/ bouncer2d-8x6 lista para ser impresa (pdf)
# estructura
como podrás ver, la computadora consiste en dos páginas, ambas con celdas impresas.
podemos verla como dividida en cuatro secciones.
primera página:
* fila superior: estado actual de la máquina, codificado
* bloque de enmedio: celdas de procesamiento
* fila inferior: estado siguiente de la máquina, codificado
segunda página:
* pantalla monocromática de 8x6 pixeles/celdas
# modo de uso:
* antes que nada, elige dos clases de elementos múltiples que tengas, A y B (por ejemplo, A="frijoles" y B="garbanzos)
* cada celda solo puede tener uno de esos elementos en un momento dado
## para la fila superior (estado actual)
* si esta es la primera iteración, coloca en esta fila una combinación arbitraria de elementos (por ejemplo, todas las celdas con garbanzos en ellas)
* de no ser así, cuando termines una iteración y estés lista para empezar una nueva, transfiere los elementos de la fila inferior (estado siguiente) hacia la superior, manteniendo el mismo orden. así, el "estado siguiente" se convierte en el "estado actual"
## para las demás celdas
* observa las celdas de la computadora: cada una tiene su nombre hasta arriba, y una lista de 1 a 3 nombres que corresponden a sus "entradas".
* en cada celda, acuérdate y aplica la regla: coloca un elemento de tipo A en su interior solamente cuando todas sus entradas son de tipo B. en cualquier otro caso, coloca un elemento de tipo B.
* por ejemplo, regresando a los frijoles y garbanzos: "coloca un frijol en la celda cuando todas sus entradas tienen garbanzos. si no es así, coloca un garbanzo"
* cuando termines de iterar en todas las celdas, habrás completado un cuadro de la animación. ¡captúralo de alguna manera para que lo compares con los que sigan!

View File

@ -0,0 +1,42 @@
# bouncer2d-8x6 tabletop computer (prototype)
lang=en es->{bouncer-2d prototipo}
a tabletop non-electronic, human-scale, very-slow computer with an 8x6 monochromatic screen. a prototype of {beans computing}.
following a simple set of rules, you can collaborate with it to compute and display an animation of a ball bouncing in the walls of the screen, one frame at a time.
=> ./img/secuencia_bounce2d-8x6-0a3.gif a sequence of four frames showing two paper boards with black and soy beans in them: the one in the left contains the processing cells, and the one in the right looks like a screen composed of soy beans except for one, which seems to be moving from the top left corner to the bottom and right.
# downloads
=> => https://ipfs.io/ipfs/QmfQwdoc68dPXnGTspTiWu8xjpCLGUaH7YYFUmx84YUtwS/ bouncer2d-8x6 ready to be printed (pdf)
# structure
the computer has two pages, both of them with "cells". it has a total of four sections.
first page:
* top row: state of the machine (encoded)
* middle block: process cells
* bottom row: next state of the machine (encoded)
second page:
* 8x6 monochromatic screen
# how to use:
* first of all, choose two classes of elements, A and B (e.g. A="black beans" and B="chickpeas").
* each cell can only have one of those elements at a given time.
## for the top row
* if this is the first iteration, fill it with an arbitrary combination of your elements (e.g. all the cells with a chickpea in each)
* otherwise, when you finish an iteration and you are ready to start a new one, transfer the elements from the bottom row to the top row, keeping the same order.
## for all the other cells
* observe the cells in the computer: each one has a name at the top, and a list of 1 to 3 cell names that correspond to its inputs.
* for each cell, remember and apply the rule: put an element of class A inside the cell only when all of its inputs are B. otherwise put inside an element of class B.
* example rule: put a black bean inside the cell only when all of its inputs are chickpeas. otherwise, put a chickpea inside.
* when you finish iterating through all the cells, you would have completed a frame of the animation in the screen. capture it somehow!

209
src/bouncing_ball_logic.gmo Normal file
View File

@ -0,0 +1,209 @@
# bouncing ball logic
lang=en
may this serve as a reference for non-electronic, human-scale, very-slow implementations of digital circuits that embody a virtual ball bouncing in a screen.
these notes emerged from the work around {poñg}, "a human-scale digital videogame, with logic provided by people".
# 1-dimension
## 4-pixels wide screen
the ball is a pixel that bounces back and forth.
description of the logic in {verilog}:
```
// bouncing ball (pixel) in a 4-pixels screen
// using NOR gates
module onedimensional_bounce( E2, E1, E0, P3, P2, P1, P0, NE2, NE1, NE0 );
input wire E2, E1, E0; // curent state
output wire P3, P2, P1, P0; // pixels
output wire NE2, NE1, NE0; // next state
// inversions
wire nE2, nE1, nE0;
// ors
wire NE0_1, NE0_2, NE1_2;
// input inversions (3 gates)
not g00( nE0, E0);
not g01( nE1, E1);
not g02( nE2, E2);
// NE2
assign NE2 = E1;
// NE1
nor g03( NE1_2, nE2, nE0);
nor g04( NE1, P0, NE1_2);
// NE0
nor g05( NE0_1, nE2, E1, nE0);
nor g06( NE0_2, E2, nE1, nE0);
nor g07( NE0, NE0_1, NE0_2);
// pixels
nor g08( P3, nE1, E0);
nor g09( P2, nE1, nE0);
nor g10( P1, E1, nE0);
nor g11( P0, E1, E0); // also "NE1_1"
endmodule
```
### board and cards implementation
compatible with {beans computing}: use two classes of beans to indicate a 1 or a 0.
current state:
```
+----+----+----+
| i2 | i1 | i0 |
+----+----+----+
```
process helpers
```
+----+----+----+----+----+----+
| p5 | p4 | p3 | p2 | p1 | p0 |
+----+----+----+----+----+----+
```
next state and screen:
```
+----+----+----+ +----+----+----+----+
| o6 | o5 | o4 | | o3 | o2 | o1 | o0 |
+----+----+----+ +----+----+----+----+
```
the NOR-based cards for process and output cells:
process helpers:
```
p0: i0
p1: i1
p2: i2
p3: p2, p0
p4: p2, i1, p0
p5: i2, p1, p0
```
next state:
```
o6: p1
o5: o0, p3
o4: p4, p5
```
screen:
```
o3: p1, i0
o2: p1, p0
o1: i1, p0
o0: i1, i0
```
(card p0 would be read: p0 is 1 when i0 is 0, and it's 0 otherwise; card p5 would be read: p5 is 1 when all i2, p1 and p0 are 0, and it's 0 otherwise)
# 2-dimensions
## 8x6 screen
the following description, converted into a gate-level representation, results in the {bouncer-2d prototype}. the notes of how that process happened have to be recovered and documented here.
### high-level verilog code
```
module bouncer2d
#(
parameter PIXELSW = 8,
parameter PIXELSH = 6
)
(
input [$clog2(PIXELSW)-1:0] posx,
input [$clog2(PIXELSH)-1:0] posy,
input dirx,
input diry,
output [$clog2(PIXELSW)-1:0] newposx,
output [$clog2(PIXELSH)-1:0] newposy,
output newdirx,
output newdiry,
output [(PIXELSW*PIXELSH)-1:0] screen
);
bouncer1d #( .NPIXELS( PIXELSW)) bouncex (
.pos( posx ),
.dir( dirx ),
.newpos( newposx ),
.newdir( newdirx )
);
bouncer1d #( .NPIXELS( PIXELSH)) bouncey (
.pos( posy ),
.dir( diry ),
.newpos( newposy ),
.newdir( newdiry )
);
screen_decoder #(.PIXELSW(PIXELSW), .PIXELSH( PIXELSH ))
decoder (
.posx( posx ),
.posy( posy ),
.screen( screen )
);
endmodule // bouncer2d
module screen_decoder
#(
parameter PIXELSW = 8,
parameter PIXELSH = 6
)
(
input [$clog2(PIXELSW)-1:0] posx,
input [$clog2(PIXELSH)-1:0] posy,
output [(PIXELSW*PIXELSH)-1:0] screen
);
// decoder!
genvar c, r;
generate
for(c=0; c<PIXELSW; c = c + 1) begin
for(r=0; r<PIXELSH; r = r + 1) begin
assign screen[c + r*PIXELSW] = (posx==c) && (posy==r);
end
end
endgenerate
// another possibility, less effective while synthesizing
// assign screen = (1<<posx) << (posy*PIXELSW);
endmodule // screen_decoder
module bouncer1d
#( parameter NPIXELS = 8)
(
input [$clog2(NPIXELS)-1:0] pos,
input dir, // 1 inc, 0 dec
output [$clog2(NPIXELS)-1:0] newpos,
output newdir
);
/* //without edge-cases
assign newdir = (dir==1 && pos==(NPIXELS-2)) ? 0 : (dir==0 && pos==1) ? 1 : dir;
assign newpos = (dir==1) ? pos + 1 : pos - 1;
*/
// with edge cases (and less gates when synthesizing!)
assign newdir = (pos==0) ? 1 : (pos>=NPIXELS-1) ? 0 : (dir==1 && pos==NPIXELS-2) || (dir==0 && pos==1) ? ~dir : dir;
assign newpos = (pos==0) ? 1 : (pos>=NPIXELS-1) ? NPIXELS - 2 : (dir==1)? pos + 1 : pos -1;
endmodule
```

View File

@ -21,6 +21,26 @@ a coloring decoder built with NOT (triangle), AND (semicircle), and OR (the othe
=> https://opguides.info/engineering/circuits/digitallogic/ colored and animated version by Vega
=> https://ipfs.io/ipfs/QmZv53hr7QEzxrPaRNpiyU9VUNHw9UgyaTUqYD9x9iFpNA/dibujo_20201207_hex7segdecoder.png download the decoder in full size 1487x3057 (png, ~446KB)
## instructions
you use two colors to set the state of 4 "bits" at the top circles.
one color stands for "1", the other for "0".
what number, according to the conventions, would these 4 bits represent?
and what hexadecimal digit would correspond to that number?
you transmit those states/colors by coloring the wires.
the wires lead to three possible types of gates, all of them with their input(s) above, and their output below:
* NOT, a triangle: the output is the opposite color of the input
* AND, a semicircle: the output is color "1" only when ALL inputs are also color "1"; otherwise the output is color "0"
* OR, the other shape (?): the output is color "1" when ANY of the inputs are color "1"; otherwise the output is color "0".
you finish coloring, and you see the digit in the display as a result!
# computadora no(r)pal (12019)
=> ./img/dibujo_20190715-norpalera-fulladder_blanco_small.png logic circuit in the shape of nopal

View File

@ -6,7 +6,7 @@ estos incluyen, claro está, a las:
=> ./danzas_compuertas.gmi {danzas compuertas}
=> ./coloring_computers.gmi {coloring computers}
=> ./beans_computing.gmi {beans computing}
=> ./cómputo_frijol.gmi {cómputo frijol}
usamos la convención de utilizar dos valores posibles: 1 para denominar arriba, o verdadero, y 0 para denominar abajo, o falso.

13
src/cómputo_frijol.gmo Normal file
View File

@ -0,0 +1,13 @@
# cómputo frijol
lang=es es->{beans computing}
sistemas digitales no electrónicos basados en manipular frijoles de acuerdo a reglas lógicas simples.
# proyectos
{norpet mascota digital} fue una prueba de concepto de cómputo frijol en tableros de 8x8.
=> ./img/foto_norpet_02.png foto del tablero de norpet completamente lleno en uno de sus estados: la cuadrícula está llena de frijoles negros y de soya, uno en cada casilla.
# prototipos
el {bouncer-2d prototipo} surge del desarrollo inicial de la {propuesta poñg}.
=> ./img/secuencia_bounce2d-8x6-0a3.gif a sequence of four frames showing two paper boards with black and soy beans in them: the one in the left contains the processing cells, and the one in the right looks like a screen composed of soy beans except for one, which seems to be moving from the top left corner to the bottom and right.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 KiB

View File

@ -318,3 +318,342 @@ nor C12(r, p7, p8, p9, p10);
endmodule
```
# 7-segment display logic
may this serve as a reference for non-electronic, human-scale, very-slow implementations of digital circuits that use a 7-segment display as an output.
=> ./img/diagram_7segmentdisplay.png 7 segment display with labels, from wikimedia commons (image)
hex-digit to seven-segment table:
```
a b c d e f g
0 1 1 1 1 1 1 0
1 0 1 1 0 0 0 0
2 1 1 0 1 1 0 1
3 1 1 1 1 0 0 1
4 0 1 1 0 0 1 1
5 1 0 1 1 0 1 1
6 1 0 1 1 1 1 1
7 1 1 1 0 0 0 0
8 1 1 1 1 1 1 1
9 1 1 1 1 0 1 1
A 1 1 1 0 1 1 1
b 0 0 1 1 1 1 1
C 1 0 0 1 1 1 0
d 0 1 1 1 1 0 1
E 1 0 0 1 1 1 1
F 1 0 0 0 1 1 1
```
## hexadecimal decoder
different gate-level implementations of a 4-bit to 7-segment display hexadecimal decoder: the input is a 4-bit binary number, and the output is the display showing the corresponding hexadecimal digit.
* straightforward version (S)
* simplified version (K)
* simplified version in NOR
* simple-simplified version (Z)
comparison of number of gates:
```
S K Z
NOT 4 4 4
2-input OR 0 1 29
3-input OR 0 10 0
4-input OR 15 10 0
2-input AND 0 0 3
3-input AND 0 3 4
4-input AND 3 3 2
5-input AND 2 1 0
6-input AND 2 0 0
total 26 32 42
```
in cases S and K, the gates AND,OR can be replaced with NOR.
### straightforward version
this circuit uses a complete "product of maxterms" for each of the segments.
the maxterms correspond to the numbers that turn off that specific segment.
``` verilog
// 4-bit hexadecimal to 7-segment decoder with traditional gates
module hex_to_7seg( b3, b2, b1, b0, a, b, c, d, e, f, g);
input wire b3, b2, b1, b0; // 4 bits as input
output wire a, b, c, d, e, f, g; // 7 segments as output
// inversions:
wire n3,n2,n1,n0;
// maxterms:
wire orF, orE, orD, orC, orB, orA, or9, or7, or6, or5, or4, or3, or2, or1, or0;
// inversions:
not G00( n0, b0);
not G01( n1, b1);
not G02( n2, b2);
not G03( n3, b3);
// maxterms:
or G04( or0, b3, b2, b1, b0); // 0b0000, 0
or G05( or1, b3, b2, b1, n0); // 0b0001, 1
or G06( or2, b3, b2, n1, b0); // 0b0010, 2
or G07( or3, b3, b2, n1, n0); // 0b0011, 3
or G08( or4, b3, n2, b1, b0); // 0b0100, 4
or G09( or5, b3, n2, b1, n0); // 0b0101, 5
or G10( or6, b3, n2, n1, b0); // 0b0110, 6
or G11( or7, b3, n2, n1, n0); // 0b0111, 7
or G12( or9, n3, b2, b1, n0); // 0b1001, 9
or G13( orA, n3, b2, n1, b0); // 0b1010, A
or G14( orB, n3, b2, n1, n0); // 0b1011, B
or G15( orC, n3, n2, b1, b0); // 0b1100, C
or G16( orD, n3, n2, b1, n0); // 0b1101, D
or G17( orE, n3, n2, n1, b0); // 0b1110, E
or G18( orF, n3, n2, n1, n0); // 0b1111, F
// each segment (see table above)
and G19( a, or1, or4, orB, orD);
and G20( b, or5, or6, orB, orC, orE, orF);
and G21( c, or2, orC, orE, orF);
and G22( d, or1, or4, or7, orA, orF);
and G23( e, or1, or3, or4, or5, or7, or9);
and G24( f, or1, or2, or3, or7, orD);
and G25( g, or0, or1, or7, orC);
endmodule
```
### simplified version
this first simplification consists in reducing the number of inputs in the maxterms.
the general architecture stays the same: one level of ORs, and one level of ANDs.
``` verilog
// 4-bit hexadecimal to 7-segment decoder with traditional gates, "simplified"
module hex_to_7seg( b3, b2, b1, b0, a, b, c, d, e, f, g);
input wire b3, b2, b1, b0; // 4 bits as input
output wire a, b, c, d, e, f, g; // 7 segments as output
// inversions:
wire n3,n2,n1,n0;
// maxterms:
wire orD, orC, orB, orA, or9, or7, or5, or4, or2, or1;
// others:
wire or111X, or11X0, or1X11, orX110, orX111, or010X, or00X1, or001X, or0X11, or000X;
wire or0XX1;
// inversions:
not G00( n0, b0);
not G01( n1, b1);
not G02( n2, b2);
not G03( n3, b3);
// maxterms:
// we keep the maxterms: 1, 2, 4, 5, 7, 9, A, B, C, D
or G04( or1, b3, b2, b1, n0); // 0b0001, 1
or G05( or2, b3, b2, n1, b0); // 0b0010, 2
or G06( or4, b3, n2, b1, b0); // 0b0100, 4
or G07( or5, b3, n2, b1, n0); // 0b0101, 5
or G08( or7, b3, n2, n1, n0); // 0b0111, 7
or G09( or9, n3, b2, b1, n0); // 0b1001, 9
or G10( orA, n3, b2, n1, b0); // 0b1010, A
or G11( orB, n3, b2, n1, n0); // 0b1011, B
or G12( orC, n3, n2, b1, b0); // 0b1100, C
or G13( orD, n3, n2, b1, n0); // 0b1101, D
// 3-input ORs:
or G14(or111X, n3, n2, n1);
or G15(or11X0, n3, n2, b0);
or G16(or1X11, n3, n1, n0);
or G17(orX110, n2, n1, b0);
or G18(orX111, n2, n1, n0);
or G19(or010X, b3, n2, b1);
or G20(or00X1, b3, b2, n0);
or G21(or001X, b3, b2, n1);
or G22(or0X11, b3, n1, n0);
or G23(or000X, b3, b2, b1);
// 2-input OR:
or G24(or0XX1, b3, n0);
// each segment
and G25( a, or1, or4, orB, orD); // 4-inputs
and G26( b, or111X, or11X0, or1X11, orX110, or5); // 5-inputs
and G27( c, or111X, or11X0, or2); // 3-inputs
and G28( d, orX111, or1, or4, orA); // 4-inputs
and G29( e, or0XX1, or010X, or9); // 3-inputs
and G30( f, or00X1, or001X, or0X11, orD); // 4-inputs
and G31( g, or000X, or7, orC); // 3-inputs
endmodule
```
### simplified version, with NOR gates and cleaned up labels
this is the same circuit as above, but replacing the AND,OR gates with NOR gates (thanks to it being a "two-level product of maxterms" ciruit).
here the gates and their output wires are labelled GXX and gXX respectively, using octal numbering.
``` verilog
// 4-bit hexadecimal to 7-segment decoder with NOR gates
// "cleaned up" wire names
module hex_to_7seg( b3, b2, b1, b0, a, b, c, d, e, f, g);
input wire b3, b2, b1, b0; // 4 bits as input
output wire a, b, c, d, e, f, g; // 7 segments as output
wire g00, g01, g02, g03, g04, g05, g06, g07;
wire g10, g11, g12, g13, g14, g15, g16, g17;
wire g20, g21, g22, g23, g24, g25, g26, g27;
wire g30, g31, g32, g33, g34, g35, g36, g37;
// inversions:
not G00( g00, b0);
not G01( g01, b1);
not G02( g02, b2);
not G03( g03, b3);
// maxterms:
// we keep the maxterms: 1, 2, 4, 5, 7, 9, A, B, C, D
nor G04( g04, b3, b2, b1, g00); // 0b0001, 1
nor G05( g05, b3, b2, g01, b0); // 0b0010, 2
nor G06( g06, b3, g02, b1, b0); // 0b0100, 4
nor G07( g07, b3, g02, b1, g00); // 0b0101, 5
nor G10( g10, b3, g02, g01, g00); // 0b0111, 7
nor G11( g11, g03, b2, b1, g00); // 0b1001, 9
nor G12( g12, g03, b2, g01, b0); // 0b1010, A
nor G13( g13, g03, b2, g01, g00); // 0b1011, B
nor G14( g14, g03, g02, b1, b0); // 0b1100, C
nor G15( g15, g03, g02, b1, g00); // 0b1101, D
// 3-input:
nor G16(g16, g03, g02, g01);
nor G17(g17, g03, g02, b0);
nor G20(g20, g03, g01, g00);
nor G21(g21, g02, g01, b0);
nor G22(g22, g02, g01, g00);
nor G23(g23, b3, g02, b1);
nor G24(g24, b3, b2, g00);
nor G25(g25, b3, b2, g01);
nor G26(g26, b3, g01, g00);
nor G27(g27, b3, b2, b1);
// 2-input:
nor G30(g30, b3, g00);
// each segment
nor G31( g31, g04, g06, g13, g15); // 4-inputs
nor G32( g32, g16, g17, g20, g21, g07); // 5-inputs
nor G33( g33, g16, g17, g05); // 3-inputs
nor G34( g34, g22, g04, g06, g12); // 4-inputs
nor G35( g35, g30, g23, g11); // 3-inputs
nor G36( g36, g24, g25, g26, g15); // 4-inputs
nor G37( g37, g27, g10, g14); // 3-inputs
assign a = g31;
assign b = g32;
assign c = g33;
assign d = g34;
assign e = g35;
assign f = g36;
assign g = g37;
```
### simple-simplified version, with "normal" gates
in this circuit, repeated OR operations were "abbreviated": 4-input OR gates were replaced by 3 2-input OR gates, taking advantage of the fact that many of those 2-input ORs are common and can be reused.
here the transformation to NOR gates is not as straightforward: each OR that is an input for another OR, has to be inverted (adding a NOT) before being able to convert OR, AND to NORs.
this circuit is implemented as one of the {coloring computers}.
=> ./img/dibujo_20201207_hex7segdecoder_small.png the complete decoder
``` verilog
// 4-bit hexadecimal to 7-segment decoder with traditional gates, "simplified"
module hex_to_7seg( b3, b2, b1, b0, a, b, c, d, e, f, g);
input wire b3, b2, b1, b0; // 4 bits as input
output wire a, b, c, d, e, f, g; // 7 segments as output
// inversions:
wire n3,n2,n1,n0;
// maxterms:
wire orD, orC, orB, orA, or9, or7, or5, or4, or2, or1;
// others:
wire or111X, or11X0, or1X11, orX110, orX111, or010X, or00X1, or001X, or0X11, or000X;
wire or0XX1;
wire orXX00, orXX01, orXX10, orXX11, or00XX, or01XX, or10XX, or11XX;
wire and_or1or4, and_or111Xor11X0;
// inversions (4 gates)
not N00( n0, b0);
not N01( n1, b1);
not N02( n2, b2);
not N03( n3, b3);
// pairs of bits (9 gates)
or P00( orXX00, b1, b0); // ++
or P01( orXX01, b1, n0); // ++++
or P02( orXX10, n1, b0); // +++
or P03( orXX11, n1, n0); // ++++
or P04( or00XX, b3, b2); // +++
or P05( or01XX, b3, n2); // ++++
or P06( or10XX, n3, b2); // +++
or P07( or11XX, n3, n2); // ++++
// 2-input OR:
or P08( or0XX1, b3, n0); // ++
// was-3-input ORs (10 gates)
or T00(or111X, or11XX, n1); //n3, n2, n1;
or T01(or11X0, or11XX, b0); //n3, n2, b0;
or T02(or1X11, orXX11, n3); //n3, n1, n0;
or T03(orX110, orXX10, n2); //n2, n1, b0;
or T04(orX111, orXX11, n2); //n2, n1, n0;
or T05(or010X, or01XX, b1); //b3, n2, b1;
or T06(or00X1, or0XX1, b2 ); //b3, b2, n0;
or T07(or001X, or00XX, n1 ); //b3, b2, n1;
or T08(or0X11, or0XX1, n1 ); //b3, n1, n0;
or T09(or000X, or00XX, b1 ); //b3, b2, b1;
// maxterms: (10 gates, 2-input)
// we keep the maxterms: 1, 2, 4, 5, 7, 9, A, B, C, D
or M1( or1, or00XX, orXX01); // 0b0001, 1
or M2( or2, or00XX, orXX10); // 0b0010, 2
or M4( or4, or01XX, orXX00); // 0b0100, 4
or M5( or5, or01XX, orXX01); // 0b0101, 5
or M7( or7, or01XX, orXX11); // 0b0111, 7
or M9( or9, or10XX, orXX01); // 0b1001, 9
or MA( orA, or10XX, orXX10); // 0b1010, A
or MB( orB, or10XX, orXX11); // 0b1011, B
or MC( orC, or11XX, orXX00); // 0b1100, C
or MD( orD, or11XX, orXX01); // 0b1101, D
// helper ANDs (2 gates, 2-inputs)
and A01( and_or1or4, or1, or4);
and A02( and_or111Xor11X0, or111X, or11X0);
// each segment (7 gates)
and Sa( a, and_or1or4, orB, orD); // 3-inputs
and Sb( b, and_or111Xor11X0, or1X11, orX110, or5); // 4-inputs
and Sc( c, and_or111Xor11X0, or2); // 2-inputs
and Sd( d, and_or1or4, orX111, orA); // 3-inputs
and Se( e, or0XX1, or010X, or9); // 3-inputs
and Sf( f, or00X1, or001X, or0X11, orD); // 4-inputs
and Sg( g, or000X, or7, orC); // 3-inputs
endmodule
```
# bouncing ball
see {bouncing ball logic}.

View File

@ -16,6 +16,7 @@ have around two types of beans, like black beans and soy beans, print out the PD
# download
+ <iframe frameborder="0" src="https://itch.io/embed/1365973" width="552" height="167"><a href="https://compudanzas.itch.io/norpet">norpet by compudanzas</a></iframe>
=> https://compudanzas.itch.io/norpet download norpet from itch.io
# about

View File

@ -16,6 +16,7 @@ ten cerca dos tipos de frijoles, como frijoles negros y frijoles de soya, imprim
# descarga
+ <iframe frameborder="0" src="https://itch.io/embed/1365973" width="552" height="167"><a href="https://compudanzas.itch.io/norpet">norpet by compudanzas</a></iframe>
=> https://compudanzas.itch.io/norpet descarga norpet from itch.io
la traducción al español del tablero e instrucciones la realizó vladomiro, ¡muchas gracias!
@ -23,7 +24,7 @@ la traducción al español del tablero e instrucciones la realizó vladomiro, ¡
# acerca de
norpet fue una prueba de concepto de computación con frijoles y en papel que desarrollamos para un Jam de mascotas virtuales en itch.io
norpet fue una prueba de concepto de {cómputo frijol} y en papel que desarrollamos para un Jam de mascotas virtuales en itch.io
=> https://itch.io/jam/virtual-pet-jam Virtual Pet Jam - itch.io

23
src/poñg.gmo Normal file
View File

@ -0,0 +1,23 @@
# POÑG
lang=en
a human-scale digital videogame, with logic provided by people.
# the original idea
the following text is a slightly edited summary in english from around 12020-11 about {propuesta poñg}, originally written in spanish:
some time ago, i applied for a grant with this project: "a human-scale digital videogame, with logic provided by people". "a very low-res (16x12) monochromatic game simulating a tennis match between two people". i didn't get it, but i decided i'll design and build it nevertheles.
i consider this videogame is "electric" but not electronic: it uses electricity, wires, switches and LEDs/lightbulbs, but the logic is not semiconductor-based, it is human-based.
there are two human players with "controllers", but someone ("the operator(s)") has to go through each and every switch of the system, putting it in the corresponding position according to the (light) state of its inputs (a {nor} operation!), in order to calculate one frame.
when the frame is ready, it is "switched" into a display: players and audience can see the new state of the game, we can take an instant photography to document the frame, players can adjust the state of their controller, the display turns off and the switching process starts again.
the inputs of each iteration for the operator and the logic network would be a "vector" with the state of the game plus the state of the controllers.
# initial iteration
the initial iteration in 12020 resulted in some {beans computing} prototypes, which are documented in {bouncing ball logic} and {bouncer-2d prototype}.
=> ./img/secuencia_bounce2d-8x6-0a3.gif a sequence of four frames showing two paper boards with black and soy beans in them: the one in the left contains the processing cells, and the one in the right looks like a screen composed of soy beans except for one, which seems to be moving from the top left corner to the bottom and right.

View File

@ -1,5 +1,7 @@
# POÑG (Propuesta)
lang=es
el origen de {poñg}.
este texto fue enviado como parte de mi postulación para el programa jóvenes creadores (1)2020-(1)2021 del fonca, en la disciplina de medios audiovisuales, especialidad de nuevas tecnologías.
la propuesta no fue aceptada en la fase resolutiva.