Add old (without --timing) verilator test
This commit is contained in:
1
test-verilator5/.gitignore
vendored
Normal file
1
test-verilator5/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
top
|
||||
19
test-verilator5/Makefile
Normal file
19
test-verilator5/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
TOP_MODULE = top
|
||||
|
||||
SOURCES = top.sv
|
||||
FLAGS_FILE = ../source/sources.f
|
||||
INCLUDES =
|
||||
PARAMS :=
|
||||
THREADS := 1
|
||||
|
||||
FLAGS = -Wno-WIDTH --top-module $(TOP_MODULE) +1800-2017ext+sv \
|
||||
--timing --Mdir $(TOP_MODULE) -o $(TOP_MODULE) -f $(FLAGS_FILE) \
|
||||
$(PARAMS) --timescale "1ps/1ps" --threads $(THREADS) -j 0
|
||||
|
||||
# FLAGS += --trace
|
||||
|
||||
all: $(SOURCES)
|
||||
verilator $(FLAGS) --binary $(INCLUDES) $(SOURCES)
|
||||
|
||||
clean:
|
||||
rm -rf $(TOP_MODULE)
|
||||
7
test-verilator5/__build.sh
Executable file
7
test-verilator5/__build.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
. ../scripts/sim_vars.sh
|
||||
|
||||
make clean
|
||||
make OPT_FAST="-Os -march=native" VM_PARALLEL_BUILDS=0 PARAMS="-GCPU_COUNT=$CPU_COUNT" THREADS=$THREADS
|
||||
5
test-verilator5/__run.sh
Executable file
5
test-verilator5/__run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. ../scripts/sim_vars.sh
|
||||
|
||||
./top/top +dlen=$BLOCK_SIZE
|
||||
7
test-verilator5/top.sv
Normal file
7
test-verilator5/top.sv
Normal file
@@ -0,0 +1,7 @@
|
||||
`timescale 1ps/1ps
|
||||
|
||||
module top #(parameter CPU_COUNT = 2);
|
||||
logic clock = 1'b0;
|
||||
initial forever #(10ns/2) clock = ~clock;
|
||||
testbench #(CPU_COUNT) testbench (clock);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user