So, the first first lab in the class that deals with drawing circuits is a couple of XOR circuits, but that is as good a place to start as any.
The circuits:
XOR 1
The Logic:
XOR 1 | |||||||||
A | B | ¬A | ¬B | A∧¬B | ¬A∧B | (A∧¬B)∨(¬A∧B) | |||
1 | 1 | 0 | 0 | 0 | 0 | 0 | |||
1 | 0 | 0 | 1 | 1 | 0 | 1 | |||
0 | 1 | 1 | 0 | 0 | 1 | 1 | |||
0 | 0 | 1 | 1 | 0 | 0 | 0 |
XOR 2 | |||||||||
A | B | ¬A | ¬B | ¬A∨¬B | A∨B | (¬A∨¬B)∧(A∨B) | |||
1 | 1 | 0 | 0 | 0 | 1 | 0 | |||
1 | 0 | 0 | 1 | 1 | 1 | 1 | |||
0 | 1 | 1 | 0 | 1 | 1 | 1 | |||
0 | 0 | 1 | 1 | 1 | 0 | 0 |
The Simulation:
TKGate
Digital Works
*TKGate is definitely not a perfect program. I tested it on one computer, and it ran so slowly that it was essentially unusable, and on another system it seemed to work well, but it would occasionally crash. So regardless of the software being used save early and save often. I was also able to use Digital Works on ubuntu running it under wine.
For me designing the circuits in these simulators was a great place to start.
.......................................................................................................................................................................
Programming the DE0 Nano:
Here I will detail the steps that I took in order to program the DE0 Nano with the XOR circuits. Because DE0 Nano development board only has two buttons I tied the circuits together, and also keep in mind that the logic is inversed because the switches are normally high and go low when pushed (double check and re-verify this).
Below is the circuit that the fpga will be programmed with.
A pinout with names correlating to the DE0 Nano Documentation and an example qsf file can be found in the project logs.
Ubuntu Step 1) Make sure that the USB-Blaster is working.
Step 2) Create Project
Step 3) Make the Pin Assignments and Draw the Cirucit
Step 4) Handle a compilation error.
Step 5) Program the DE0 Nano.
This simple example will only load the program to the FPGA, and will run so long as power is not cycled. If power is cycled the default program from the EPCS will be loaded.
Nice load of dead links