speeding up simulation using dedicated full dpi-based FPU core
This commit is contained in:
@@ -31,12 +31,13 @@ MULTICORE ?= -DNUM_CLUSTERS=1 -DNUM_CORES=2 -DL2_ENABLE=0
|
||||
TOP = Vortex
|
||||
|
||||
RTL_DIR=../rtl
|
||||
DPI_DIR=../dpi
|
||||
|
||||
FPU_INCLUDE = -I$(RTL_DIR)/fp_cores -I$(RTL_DIR)/fp_cores/svdpi -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/include -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/src -I$(RTL_DIR)/fp_cores/fpnew/src/fpu_div_sqrt_mvp/hdl -I$(RTL_DIR)/fp_cores/fpnew/src
|
||||
FPU_INCLUDE = -I$(RTL_DIR)/fp_cores -I$(DPI_DIR) -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/include -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/src -I$(RTL_DIR)/fp_cores/fpnew/src/fpu_div_sqrt_mvp/hdl -I$(RTL_DIR)/fp_cores/fpnew/src
|
||||
RTL_INCLUDE = -I$(RTL_DIR)/ -I$(RTL_DIR)/libs -I$(RTL_DIR)/interfaces -I$(RTL_DIR)/cache -I$(RTL_DIR)/simulate $(FPU_INCLUDE)
|
||||
|
||||
SRCS = simulator.cpp testbench.cpp
|
||||
SRCS += $(RTL_DIR)/fp_cores/svdpi/float_dpi.cpp
|
||||
SRCS += $(DPI_DIR)/util_dpi.cpp $(DPI_DIR)/float_dpi.cpp
|
||||
|
||||
VL_FLAGS += -O2 --language 1800-2009 --assert -Wall -Wpedantic
|
||||
VL_FLAGS += -Wno-DECLFILENAME
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#define RESET_DELAY 2
|
||||
#define RESET_DELAY 4
|
||||
|
||||
#define ENABLE_DRAM_STALLS
|
||||
#define DRAM_LATENCY 24
|
||||
@@ -75,13 +75,6 @@ void Simulator::reset() {
|
||||
vortex_->csr_rsp_ready = 0;
|
||||
|
||||
vortex_->reset = 1;
|
||||
|
||||
vortex_->clk = 0;
|
||||
this->eval();
|
||||
vortex_->clk = 1;
|
||||
this->eval();
|
||||
|
||||
vortex_->reset = 0;
|
||||
|
||||
for (int i = 0; i < RESET_DELAY; ++i) {
|
||||
vortex_->clk = 0;
|
||||
@@ -89,8 +82,11 @@ void Simulator::reset() {
|
||||
vortex_->clk = 1;
|
||||
this->eval();
|
||||
}
|
||||
|
||||
vortex_->reset = 0;
|
||||
|
||||
// Turn on assertion after reset
|
||||
printf("*** enabling assertion at tick: %ld", timestamp);
|
||||
Verilated::assertOn(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user