From fce7e03306dca1822323c3ac03b940a7e77412b9 Mon Sep 17 00:00:00 2001 From: Nikolay Puzanov Date: Thu, 17 Nov 2022 13:24:30 +0300 Subject: [PATCH] Set output file name to module top --- _template_verilator/Makefile | 6 +++--- _template_verilator/shell.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_template_verilator/Makefile b/_template_verilator/Makefile index 265c94c..908906c 100644 --- a/_template_verilator/Makefile +++ b/_template_verilator/Makefile @@ -8,7 +8,8 @@ INCLUDES = # PARAM_FFT_LENGTH ?= 256 # PARAM_REJECTOR_K_WIDTH ?= 8 -FLAGS = -Wno-WIDTH -cc --top-module $(TOP_MODULE) +1800-2017ext+sv --timing --trace --Mdir $(TOP_MODULE) +FLAGS = -Wno-WIDTH -cc --top-module $(TOP_MODULE) +1800-2017ext+sv \ + --timing --trace --Mdir $(TOP_MODULE) -o $(TOP_MODULE) FLAGS += $(foreach V,$(filter PARAM_%,$(.VARIABLES)),-G$(subst PARAM_,,$(V))=$($(V))) all: $(SOURCES) @@ -18,6 +19,5 @@ pre: verilator $(FLAGS) $(INCLUDES) $(SOURCES) clean: - rm -rf obj_dir - rm -rf datapath + rm -rf $(TOP_MODULE) rm -rf *.vcd diff --git a/_template_verilator/shell.nix b/_template_verilator/shell.nix index d40ec27..d900244 100644 --- a/_template_verilator/shell.nix +++ b/_template_verilator/shell.nix @@ -12,7 +12,7 @@ mkShell { echo -n > ${flags-file} echo -DVM_TRACE=1 >> ${flags-file} echo -xc++ >> ${flags-file} - echo -I./obj_dir >> ${flags-file} + echo -I./top >> ${flags-file} echo -I${unstable.verilator}/share/verilator/include >> ${flags-file} echo -I${clang}/resource-root/include >> ${flags-file} echo -I${glibc.dev}/include >> ${flags-file}