Skip to content

Commit a2bb042

Browse files
authored
Merge pull request #3832 from Pinata-Consulting/print-yaml
variables: create ad-hoc small .yaml files
2 parents 5c3c2c0 + 4b9bd75 commit a2bb042

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

flow/scripts/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,17 @@ Load synthesis result and list modules that were kept in hierarchical synthesis:
9494
aes_cipher_top
9595
aes_key_expand_128
9696
%
97+
98+
## Creating a .yaml file with specific variable values
99+
100+
Print any variable in .yaml syntax. To create a .yaml file that
101+
contains value of variables, run:
102+
103+
make print-CORE_UTILIZATION print-PLACE_DENSITY > foo.yaml
104+
105+
Outputs foo.yaml:
106+
107+
CORE_UTILIZATION: 55
108+
PLACE_DENSITY: 0.30
109+
110+
Useful in bazel-orfs flows or debugging configuration.

flow/scripts/variables.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ vars:
213213
$(UTILS_DIR)/generate-vars.sh $(OBJECTS_DIR)/vars
214214

215215
.PHONY: print-%
216-
# Print any variable, for instance: make print-DIE_AREA
217216
print-%:
218217
# HERE BE DRAGONS!
219218
#
@@ -224,6 +223,6 @@ print-%:
224223
# We have to use $(file ...) because we want to be able
225224
# to print variables that contain newlines.
226225
$(file >/tmp/print_tmp$$,$($*))
227-
@echo -n "$* = "
226+
@echo -n "$*: "
228227
@cat /tmp/print_tmp$$
229228
@rm /tmp/print_tmp$$

0 commit comments

Comments
 (0)