I wonder how this ALU works. From what I remember ALUs use lot of XOR gates because an adder is simply a network of XOR gates with carry propagation. How could a NOR gate do one bit addition? Add two bits ... XOR ... NOR 0 + 0 = 0...........0...........1 0 + 1 = 1...........1...........0 1 + 0 = 1...........1...........0 1 + 1 = 0...........0...........0
I think the idea is that you use registers and apply the NOR gate multiple times. In this sense the NOR gate is universal, while an OR gate nor a XOR gate are neither universal. I.e. XOR(x,y) = NOR(0, NOR(NOR(x,y), NOR(NOR(x,0),NOR(y,0))))) (maybe not the most minimal version and maybe even wrong)
MyNOR: Single board computer that uses a single NOR gate as its ALU
31–40 of 70 posts
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#32What sort of simulator is required to go from “running” to ordering a prototype board 26 days later? I had assumed physical breadboards and wires and chips were always necessary to prototype... 2019-11-02 The first version of the MyNOR simulator is running. The circuit works! 2019-11-17 I have finished the work on the microcode. I added support for MyNOR to my cross-assembler myca. 2019-11-28 PCB layout completed. A…
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#33What sort of simulator is required to go from “running” to ordering a prototype board 26 days later? I had assumed physical breadboards and wires and chips were always necessary to prototype... 2019-11-02 The first version of the MyNOR simulator is running. The circuit works! 2019-11-17 I have finished the work on the microcode. I added support for MyNOR to my cross-assembler myca. 2019-11-28 PCB layout completed. A…
[0] http://www.cburch.com/logisim/ [1] https://www.veripool.org/wiki/verilator
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#34Earlier quoted context omitted.
False advertising, then, IMO.
...but that's exactly the claim, restated.
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#35Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#36It is possible to build a CPU without a single gate: http://www.inf.fu-berlin.de/inst/ag-ki/rojas_home/documents/...
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#37Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#38What sort of simulator is required to go from “running” to ordering a prototype board 26 days later? I had assumed physical breadboards and wires and chips were always necessary to prototype... 2019-11-02 The first version of the MyNOR simulator is running. The circuit works! 2019-11-17 I have finished the work on the microcode. I added support for MyNOR to my cross-assembler myca. 2019-11-28 PCB layout completed. A…
Solderless breadboards are the equivalent of exploratory programming. If you know what you want to make you might as well go for a PCB (you can simulate the logic quite nicely these days).
Re: MyNOR: Single board computer that uses a single NOR gate as its ALU
#39It took me a while to find the answer in the description of the add instruction:
http://www.mynor.org/downloads/The_MyNOR_ADD_Instruction.pdf
It uses a lookup table to perform bit rotates. Unfortunately, this kind of breaks the entire idea of a one-NOR ALU data path. Now you have a table-driven 8-bit rotate ALU op (which is the same amount of table space needed for a 4-bit add!), and at that point you might as well ditch the NOR gate and implement everything else in microcode tables too. You can use lookup tables to implement any logic function, of course.
IOW I bet you could just modify the microcode of this thing to make it much faster by replacing the core of the ADD with another table.
Conversely, you can also just implement the NOR operation (or anything else) as control flow in the microcode sequencer, if you have any way to test bits instead, giving you a "zero-gate" ALU (ed: yeah, there is a conditional jump microinstruction).
So while this is definitely a very cool project and interesting design, I do find the claim of one-NOR purity questionable. It cheats. In a fun way, but this isn't a 1-NOR ALU CPU, it's a highly microcoded table-driven CPU that uses a two-transistor NOR gate as a gimmicky ALU component :-)
For implementing a faster ADD with the existing design, tables, and ditching the NOR, the tricky bit is mixing the inputs. One simple optimization would be to have a table that implements "rotate and add one" and one that implements "rotate". Then you can just test bit 0 of one operand, use that to select a table (via control flow) to apply to the second operand, then rotate the first operand, and repeat (2 table lookups). No NOR ops necessary. You could test two bits and cut it down to 3 table lookups per 2 bits added, or 5 table lookups per 4 bits added by just adding more tablespace. The issue here is you still need the flop+NOR to mix inputs bit by bit (even if just as control flow), but since addresses are split into halves, you could also have a table that converts one operand into the right table address MSB to index a 4-bit addition with rotate, for each nybbke. That gives you 8-bit addition in 4 table lookups, 256+256+4096 bytes of tables, and no conditional jumps, flip-flop, or NOR necessary. I bet there are other better ways of doing this too.