Support multi-binary-run in RTL sim

This commit is contained in:
Jerry Zhao
2023-05-17 15:21:54 -07:00
parent 473e4c4225
commit 4da1dea50f
7 changed files with 57 additions and 35 deletions

View File

@@ -6,7 +6,7 @@ POWER_PAR_HIER_CONF = $(OBJ_DIR)/power-par-$(VLSI_TOP)-inputs.yml
.PHONY: $(POWER_CONF) $(POWER_RTL_CONF) $(POWER_SYN_CONF) $(POWER_PAR_CONF) $(POWER_PAR_HIER_CONF)
$(POWER_CONF): $(VLSI_RTL)
$(POWER_CONF): $(VLSI_RTL) check-binary
mkdir -p $(dir $@)
echo "power.inputs:" > $@
echo " top_module: $(VLSI_TOP)" >> $@
@@ -15,9 +15,9 @@ $(POWER_CONF): $(VLSI_RTL)
ifneq ($(BINARY), )
echo " waveforms: [" >> $@
ifndef USE_VPD
echo " '$(sim_out_name).fsdb'" >> $@
echo " '$(call get_sim_out_name,$(BINARY)).fsdb'" >> $@
else
echo " '$(sim_out_name).vpd'" >> $@
echo " '$(call get_sim_out_name,$(BINARY)).vpd'" >> $@
endif
echo " ]" >> $@
endif

View File

@@ -4,7 +4,7 @@ SIM_TIMING_CONF = $(OBJ_DIR)/sim-timing-inputs.yml
.PHONY: $(SIM_CONF) $(SIM_DEBUG_CONF) $(SIM_TIMING_CONF)
$(SIM_CONF): $(sim_common_files)
$(SIM_CONF): $(sim_common_files) check-binary
mkdir -p $(dir $@)
echo "sim.inputs:" > $@
echo " top_module: $(VLSI_TOP)" >> $@
@@ -47,14 +47,14 @@ ifneq ($(BINARY), )
endif
echo " tb_dut: 'TestDriver.testHarness.$(VLSI_MODEL_DUT_NAME)'" >> $@
$(SIM_DEBUG_CONF): $(sim_common_files)
$(SIM_DEBUG_CONF): $(sim_common_files) check-binary
mkdir -p $(dir $@)
mkdir -p $(output_dir)
echo "sim.inputs:" > $@
echo " defines: ['DEBUG']" >> $@
echo " defines_meta: 'append'" >> $@
echo " execution_flags:" >> $@
for x in $(VERBOSE_FLAGS) $(WAVEFORM_FLAG); do \
for x in $(VERBOSE_FLAGS) $(call get_waveform_flag,$(call get_sim_out_name,$(BINARY))); do \
echo ' - "'$$x'"' >> $@; \
done
echo " execution_flags_meta: 'append'" >> $@
@@ -65,9 +65,9 @@ ifndef USE_VPD
echo " options:" >> $@
echo ' - "-kdb"' >> $@
echo " options_meta: 'append'" >> $@
echo "sim.outputs.waveforms: ['$(sim_out_name).fsdb']" >> $@
echo "sim.outputs.waveforms: ['$(call get_sim_out_name,$(BINARY)).fsdb']" >> $@
else
echo "sim.outputs.waveforms: ['$(sim_out_name).vpd']" >> $@
echo "sim.outputs.waveforms: ['$(call get_sim_out_name,$(BINARY)).vpd']" >> $@
endif
$(SIM_TIMING_CONF): $(sim_common_files)