File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
flow/designs/asap7/swerv_wrapper Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,21 @@ filegroup(
7373 srcs = [":{}_netlist" .format (name ) for name in BLACKBOXES ],
7474)
7575
76+ # Canonicalize the netlists to avoid rebuilds unecessarily.
77+ #
78+ # This is more a demonstration than a practical solution.
79+ #
80+ # Other things could be done here, like get a netlist from git lfs,
81+ # process the netlist in some other way, with Naja, etc.
82+ genrule (
83+ name = "netlists_canonicalized" ,
84+ srcs = [":netlists" ],
85+ outs = ["netlists_canonicalized.v" ],
86+ cmd = """
87+ cat $(locations :netlists) | grep -v -E '\\ (\\ * src = "|Generated by Yosys' > $@
88+ """ ,
89+ )
90+
7691[orfs_macro (
7792 name = top ,
7893 lef = "lef/{}.lef" .format (top ),
@@ -100,7 +115,7 @@ orfs_flow(
100115 macros = FAKERAMS ,
101116 sources = {
102117 "SDC_FILE" : [":constraint.sdc" ],
103- "SYNTH_NETLIST_FILES" : [":netlists " ],
118+ "SYNTH_NETLIST_FILES" : [":netlists_canonicalized " ],
104119 },
105120 verilog_files = [],
106121)
You can’t perform that action at this time.
0 commit comments