From 8067bd061b2e053ebdd9b736b11dcf93fd9b4619 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Mon, 18 Dec 2023 13:44:39 -0800 Subject: [PATCH 1/2] Remove help text on nonexistent bmark_timeout_cycles --- variables.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/variables.mk b/variables.mk index fcda57effb..71651bb290 100644 --- a/variables.mk +++ b/variables.mk @@ -29,8 +29,7 @@ HELP_SIMULATION_VARIABLES = \ " LOADMEM = riscv elf binary that should be loaded directly into simulated DRAM. LOADMEM=1 will load the BINARY elf" \ " LOADARCH = path to a architectural checkpoint directory that should end in .loadarch/, for restoring from a checkpoint" \ " VERBOSE_FLAGS = flags used when doing verbose simulation [$(VERBOSE_FLAGS)]" \ -" timeout_cycles = number of clock cycles before simulator times out, defaults to 10000000" \ -" bmark_timeout_cycles = number of clock cycles before benchmark simulator times out, defaults to 100000000" +" timeout_cycles = number of clock cycles before simulator times out, defaults to 10000000" # include default simulation rules HELP_COMMANDS = \ From 4d928c3c14d94723b40f870d74e117ee1635c0a1 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Mon, 18 Dec 2023 13:47:48 -0800 Subject: [PATCH 2/2] Rename timeout_cycles to TIMEOUT_CYCLES to match convention --- variables.mk | 15 ++++++++++----- vlsi/power.mk | 2 +- vlsi/sim.mk | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/variables.mk b/variables.mk index 71651bb290..dc3483aed1 100644 --- a/variables.mk +++ b/variables.mk @@ -29,7 +29,7 @@ HELP_SIMULATION_VARIABLES = \ " LOADMEM = riscv elf binary that should be loaded directly into simulated DRAM. LOADMEM=1 will load the BINARY elf" \ " LOADARCH = path to a architectural checkpoint directory that should end in .loadarch/, for restoring from a checkpoint" \ " VERBOSE_FLAGS = flags used when doing verbose simulation [$(VERBOSE_FLAGS)]" \ -" timeout_cycles = number of clock cycles before simulator times out, defaults to 10000000" +" TIMEOUT_CYCLES = number of clock cycles before simulator times out, defaults to 10000000" # include default simulation rules HELP_COMMANDS = \ @@ -274,7 +274,7 @@ PERMISSIVE_ON=+permissive PERMISSIVE_OFF=+permissive-off BINARY ?= BINARIES ?= -override SIM_FLAGS += +dramsim +dramsim_ini_dir=$(TESTCHIP_DIR)/src/main/resources/dramsim2_ini +max-cycles=$(timeout_cycles) +override SIM_FLAGS += +dramsim +dramsim_ini_dir=$(TESTCHIP_DIR)/src/main/resources/dramsim2_ini +max-cycles=$(TIMEOUT_CYCLES) VERBOSE_FLAGS ?= +verbose # get_out_name is a function, 1st argument is the binary get_out_name = $(subst $() $(),_,$(notdir $(basename $(1)))) @@ -300,7 +300,12 @@ build_dir =$(gen_dir)/$(long_name) GEN_COLLATERAL_DIR ?=$(build_dir)/gen-collateral ######################################################################################### -# assembly/benchmark variables +# simulation variables ######################################################################################### -timeout_cycles = 10000000 -bmark_timeout_cycles = 100000000 +TIMEOUT_CYCLES = 10000000 + +# legacy timeout_cycles handling +timeout_cycles ?= +ifneq ($(timeout_cycles),) +TIMEOUT_CYCLES=$(timeout_cycles) +endif diff --git a/vlsi/power.mk b/vlsi/power.mk index ff1c1729ef..c006d338a2 100644 --- a/vlsi/power.mk +++ b/vlsi/power.mk @@ -23,7 +23,7 @@ endif endif echo " start_times: ['0ns']" >> $@ echo " end_times: [" >> $@ - echo " '`bc <<< $(timeout_cycles)*$(CLOCK_PERIOD)`ns'" >> $@ + echo " '`bc <<< $(TIMEOUT_CYCLES)*$(CLOCK_PERIOD)`ns'" >> $@ echo " ]" >> $@ $(POWER_RTL_CONF): $(VLSI_RTL) diff --git a/vlsi/sim.mk b/vlsi/sim.mk index 1da6f0bcbf..f5ff85ff84 100644 --- a/vlsi/sim.mk +++ b/vlsi/sim.mk @@ -64,7 +64,7 @@ endif echo " execution_flags_meta: 'append'" >> $@ echo " saif.mode: 'time'" >> $@ echo " saif.start_time: '0ns'" >> $@ - echo " saif.end_time: '`bc <<< $(timeout_cycles)*$(CLOCK_PERIOD)`ns'" >> $@ + echo " saif.end_time: '`bc <<< $(TIMEOUT_CYCLES)*$(CLOCK_PERIOD)`ns'" >> $@ ifndef USE_VPD echo " options:" >> $@ echo ' - "-kdb"' >> $@