Open jeffng-or opened 2 months ago
Using the synth stage as an example, I'm thinking of adding code to each stage's clean target to do something like:
ifdef BLOCKS
rm -f $(foreach block,$(BLOCKS),./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/{1_*,mem.json} ./reports/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/synth_* ./logs/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/1_*)
which results in something like this if BLOCKS is set to "Element Joe":
rm -f ./results/asap7/mock-array_Element/base/1_* ./results/asap7/mock-array_Element/base/mem.json ./results/asap7/mock-array_Element/base/synth_* ./logs/asap7/mock-array_Element/base/1_* rm -f ./results/asap7/mock-array_Joe/base/1_* ./results/asap7/mock-array_Joe/base/mem.json ./results/asap7/mock-array_Joe/base/synth_* ./logs/asap7/mock-array_Joe/base/1_*
if BLOCKS isn't set, then it's a no-op.
Does that sound reasonable?
I still need to come up a a plan for when the Liberty and LEF files should be cleaned.
Or should there just be a clean_macros target that cleans up all block data for all steps? In other words, decouple the block data build cleanup from the main design clean:
.PHONY: clean_macros
clean_macros:
# rm all block data from results, reports, logs
I wonder if you can generate a clean rule in the same way we generate the build rules for the blocks. We don't write new rules for them but instead use the $(foreach block,$(BLOCKS),$(eval ...
Yeah, that's probably better. So, just to make sure I'm in sync with you:
That way, if someone calls clean_synth, then only the synth data for the top level is cleaned (i.e. the macros aren't touched). If someone wants to clean the macros specifically, they can call make clean_macros
I think it good to separate them. We could have a target to clean both.
Subject
[Flow] for any util, flow Makefile, or flow script issues.
Describe the bug
make clean_all for any design that uses BLOCKS (e.g. mock-array) doesn't clean the results/logs/objects for any of the blocks.
Expected Behavior
The rm commands that are part of clean_all should also clean up any results, objects, logs for any of the BLOCKS associated with the design.
Environment
To Reproduce
ls: cannot access 'results/asap7/mock-array*/base': No such file or directory (expected since nothing has been created yet)
build successful
lots of files under mock-array and mock-array-Element
mock-array-Element missing from rm commands
mock-array-Element directory and contents still there
Relevant log output
No response
Screenshots
No response
Additional Context
No response