Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestDriver.v missing from gen-collateral after recompiling #1354

Merged
merged 4 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions fpga/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@ fpga_common_script_dir := $(fpga_dir)/common/tcl
#########################################################################################
# setup misc. sim files
#########################################################################################
SIM_FILE_REQS += \
$(ROCKETCHIP_RSRCS_DIR)/vsrc/EICG_wrapper.v

# copy files but ignore *.h files in *.f (match vcs)
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
cp -f $^ $(GEN_COLLATERAL_DIR)
$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR)
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
$(foreach file,\
Copy link
Contributor

@jerryz123 jerryz123 Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to merge this like this, but I think this is only a temporary fix. The rules should still work if SIM_FILE_REQS is an empty list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I kind of came up with the easiest fix that will work quickly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is blocking, let's merge this now. I found this issue as well and put this on my TODO list but I won't be able to get to this till afternoon tomorrow.

$^,\
$(SIM_FILE_REQS),\
$(if $(filter %.h,$(file)),\
,\
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
Expand Down
6 changes: 3 additions & 3 deletions sims/vcs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ SIM_FILE_REQS += \
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v

# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
cp -f $^ $(GEN_COLLATERAL_DIR)
$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR)
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
$(foreach file,\
$^,\
$(SIM_FILE_REQS),\
$(if $(filter %.h,$(file)),\
,\
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
Expand Down
6 changes: 3 additions & 3 deletions sims/verilator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ SIM_FILE_REQS += \
$(ROCKETCHIP_RSRCS_DIR)/csrc/remote_bitbang.cc

# copy files and add -FI for *.h files in *.f
$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR)
cp -f $^ $(GEN_COLLATERAL_DIR)
$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR)
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
$(foreach file,\
$^,\
$(SIM_FILE_REQS),\
$(if $(filter %.h,$(file)),\
echo "-FI $(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;,\
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
Expand Down
6 changes: 3 additions & 3 deletions vlsi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ SIM_FILE_REQS += \
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v

# copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir)
$(sim_files): $(SIM_FILE_REQS) | $(build_dir)
cp -f $^ $(build_dir)
$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(build_dir)
cp -f $(SIM_FILE_REQS) $(build_dir)
$(foreach file,\
$^,\
$(SIM_FILE_REQS),\
$(if $(filter %.h,$(file)),\
,\
echo "$(addprefix $(build_dir)/, $(notdir $(file)))" >> $@;))
Expand Down