generated from TinyTapeout/tt05-submission-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9f79ac
commit f2dc45a
Showing
3 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Makefile | ||
# See https://docs.cocotb.org/en/stable/quickstart.html for more info | ||
|
||
.PHONY: simulate convert all | ||
|
||
# defaults | ||
SIM ?= icarus | ||
TOPLEVEL_LANG ?= verilog | ||
|
||
# normal simulation | ||
ifneq ($(GATES),yes) | ||
|
||
# this is the only part you should need to modify: | ||
VERILOG_SOURCES += $(PWD)/tt_um_nand.sv | ||
|
||
else | ||
|
||
# gate level simulation requires some extra setup, you shouldn't need to touch this | ||
COMPILE_ARGS += -DGL_TEST | ||
COMPILE_ARGS += -DFUNCTIONAL | ||
COMPILE_ARGS += -DUSE_POWER_PINS | ||
COMPILE_ARGS += -DSIM | ||
COMPILE_ARGS += -DUNIT_DELAY=\#1 | ||
VERILOG_SOURCES += $(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/verilog/primitives.v | ||
VERILOG_SOURCES += $(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/verilog/sky130_fd_sc_hd.v | ||
|
||
# this gets copied in by the GDS action workflow | ||
VERILOG_SOURCES += $(PWD)/tb.v $(PWD)/gate_level_netlist.v | ||
endif | ||
|
||
# TOPLEVEL is the name of the toplevel module in your Verilog or VHDL file | ||
TOPLEVEL = tb | ||
|
||
# MODULE is the basename of the Python test file | ||
MODULE = test | ||
|
||
# include cocotb's make rules to take care of the simulator setup | ||
include $(shell cocotb-config --makefiles)/Makefile.sim | ||
|
||
convert: $(FILE).sv | ||
yosys "-p read_verilog -sv $(FILE).sv; write_verilog $(FILE).v" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//============================================================================== | ||
// | ||
// The code is generated by Intel Compiler for SystemC, version 1.5.15 | ||
// see more information at https://github.com/intel/systemc-compiler | ||
// | ||
//============================================================================== | ||
|
||
//============================================================================== | ||
// | ||
// Module: nand_gate () | ||
// | ||
module tt_um_nand // "tb.dut_inst" | ||
( | ||
input logic A, | ||
input logic B, | ||
output logic Z | ||
); | ||
|
||
//------------------------------------------------------------------------------ | ||
// Method process: do_nand (nand_gate.h:11:5) | ||
|
||
always_comb | ||
begin : do_nand // nand_gate.h:11:5 | ||
Z = !(A && B); | ||
end | ||
|
||
endmodule | ||
|
||
|