Initial work on build system
Simple makefile to build testbench in vivado. Testbench currently just has a clock and a reset. Empty gb top module.
This commit is contained in:
parent
1a6259caa1
commit
e56afb8c9e
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
build/.Xil
|
||||
build/xsim.dir
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "synthflow"]
|
||||
path = synthflow
|
||||
url = gitea:fumyuun/synthflow.git
|
5
build/tb_top.Makefile
Normal file
5
build/tb_top.Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
TB = tb_top
|
||||
SOURCES = gb.sv tb_top.sv
|
||||
PATH_SRC = ../rtl:../sim/tbench
|
||||
|
||||
include ../synthflow/vivado/Makefile.rules
|
8
rtl/gb.sv
Normal file
8
rtl/gb.sv
Normal file
@ -0,0 +1,8 @@
|
||||
module gb (
|
||||
input logic clk_i,
|
||||
input logic nreset_i
|
||||
);
|
||||
|
||||
|
||||
|
||||
endmodule : gb
|
21
sim/tbench/tb_top.sv
Normal file
21
sim/tbench/tb_top.sv
Normal file
@ -0,0 +1,21 @@
|
||||
module tb_top ();
|
||||
|
||||
logic clk;
|
||||
logic nreset;
|
||||
|
||||
gb gb_inst (
|
||||
.clk_i (clk),
|
||||
.nreset_i(nreset)
|
||||
);
|
||||
|
||||
initial begin
|
||||
clk = 1'b0;
|
||||
nreset = 1'b1;
|
||||
|
||||
#1 nreset = 1'b0;
|
||||
#24 nreset = 1'b1;
|
||||
end // initial
|
||||
|
||||
always #5 clk = ~clk;
|
||||
|
||||
endmodule : tb_top
|
1
synthflow
Submodule
1
synthflow
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 767277e341012aa54acd72d26be9ea2fc921ca0c
|
Loading…
Reference in New Issue
Block a user