Initial commit
This commit is contained in:
28
_template_iverilog/Makefile
Normal file
28
_template_iverilog/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
TESTBENCH ?= testbench
|
||||
SOURCES ?= testbench.sv
|
||||
INCLUDE ?=
|
||||
|
||||
COMPILE_FLAGS += -DTESTBENCH -g2012
|
||||
PLUSARGS = -fst
|
||||
|
||||
.SILENT:
|
||||
|
||||
all: clean run
|
||||
|
||||
dump: COMPILE_FLAGS += -DDUMP
|
||||
dump: all
|
||||
|
||||
$(TESTBENCH).vvp: $(SOURCES)
|
||||
iverilog $(COMPILE_FLAGS) $(INCLUDE) -s $(TESTBENCH) -o $(TESTBENCH).vvp $(SOURCES)
|
||||
|
||||
run: $(TESTBENCH).vvp
|
||||
vvp $(TESTBENCH).vvp $(PLUSARGS)
|
||||
|
||||
preprocess: $(SORCES)
|
||||
iverilog -E $(COMPILE_FLAGS) $(INCLUDE) -s $(TESTBENCH) -o $(TESTBENCH)_preprocessed.sv $(SOURCES)
|
||||
|
||||
clean:
|
||||
rm -rf *.vvp
|
||||
rm -rf *.fst
|
||||
rm -rf *.vcd
|
||||
rm -rf *.csv
|
||||
9
_template_iverilog/shell-latest.nix
Normal file
9
_template_iverilog/shell-latest.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
iverilog-latest = callPackage /etc/nixos/programs/iverilog-latest.nix {};
|
||||
in
|
||||
mkShell {
|
||||
packages = [ iverilog-latest gnumake ];
|
||||
}
|
||||
5
_template_iverilog/shell.nix
Normal file
5
_template_iverilog/shell.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs; mkShell {
|
||||
packages = [ verilog gnumake ];
|
||||
}
|
||||
13
_template_iverilog/testbench.sv
Normal file
13
_template_iverilog/testbench.sv
Normal file
@@ -0,0 +1,13 @@
|
||||
`timescale 1ps/1ps
|
||||
|
||||
/* verilator lint_off DECLFILENAME */
|
||||
/* verilator lint_off MULTITOP */
|
||||
/* verilator lint_off STMTDLY */
|
||||
/* verilator lint_off INFINITELOOP */
|
||||
/* verilator lint_off INITIALDLY */
|
||||
|
||||
module testbench;
|
||||
initial begin
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user