GitXplorerGitXplorer
v

NANDs-to-DIV8

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
18b9784df287458861d9fb2740efa278032015cd

Update README.md

vv-espitalier committed 6 months ago
Verified
971d47210073ee960c5827634aa3529c7b0e1cb8

Update README.md

vv-espitalier committed 6 months ago
Verified
04ef12444c29e64b4ef6d04bf82a45e15ed808df

First commit

vv-espitalier committed 6 months ago
Verified
a341d3bc68928db97ecb5ec4fc6f0dbff4953e7c

Initial commit

vv-espitalier committed 6 months ago

README

The README file for this repository.

NANDs to DIV8

POC that NAND gates achieve functional completeness and can be used to build any complex binary function. In this example, a circuit that computes an 8-bit integer division is built from 1720 NAND gates.

Installation

You need to install ghdl to compile and simulate your circuits, and gtkwave to view the evolution of the signals over time.

On Ubuntu, you only need to install the appropriate packages:

sudo apt-get install ghdl gtkwave

Compile & Run

bash compile.sh

This will compile the vhdl sources and run bench tests (like regression tests). You can then visualize the results with gtkwave. For example:

gtkwave div8_tb.vcd

Example

exemple.png

In this example, a = 51 (0x33) is divided by b = 4. The calculation finishes after 72 ns (352 ns in the worst case), and the resulting quotient is q = 12 (0x0C), with a remainder of r = 3.