initial commit: implement a NAND gate, and test it
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*~
|
||||
*.vcd
|
||||
*.vvp
|
||||
nohup.out
|
||||
11
Makefile
Normal file
11
Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
clean:
|
||||
-rm *.vcd *.vvp
|
||||
|
||||
nand_tb: nand_tb.vcd
|
||||
gtkwave nand_tb.vcd &
|
||||
|
||||
nand_tb.vcd: nand_tb.vvp
|
||||
vvp nand_tb.vvp
|
||||
|
||||
nand_tb.vvp: nand.v nand_tb.v
|
||||
iverilog -o nand_tb.vvp nand_tb.v
|
||||
7
README.md
Normal file
7
README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
nand2tetris_verilog
|
||||
===================
|
||||
|
||||
My attempt at learning Verilog by using it to implement the
|
||||
[From Nand to Tetris](https://www.nand2tetris.org/) design. Initial stages
|
||||
need Icarus Verilog, GTKWave, and make to test.
|
||||
|
||||
7
nand.v
Normal file
7
nand.v
Normal file
@@ -0,0 +1,7 @@
|
||||
module Nand (in1, in2, out);
|
||||
input wire in1;
|
||||
input wire in2;
|
||||
output wire out;
|
||||
|
||||
assign out=~(in1&&in2);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user