11load ("@bazel-orfs//:openroad.bzl" , "orfs_flow" )
22
33filegroup (
4- name = "constraints-sdc " ,
4+ name = "constraints-gcd " ,
55 srcs = [
66 "designs/asap7/gcd/constraint.sdc" ,
77 ],
@@ -12,7 +12,7 @@ orfs_flow(
1212 name = "gcd" ,
1313 stage_args = {
1414 "synth" : {
15- "SDC_FILE" : "$(location :constraints-sdc )" ,
15+ "SDC_FILE" : "$(location :constraints-gcd )" ,
1616 },
1717 "floorplan" : {
1818 "DIE_AREA" : "0 0 16.2 16.2" ,
@@ -23,7 +23,84 @@ orfs_flow(
2323 },
2424 },
2525 stage_sources = {
26- "synth" : [":constraints-sdc " ],
26+ "synth" : [":constraints-gcd " ],
2727 },
2828 verilog_files = glob (include = ["designs/src/gcd/*.v" ]),
2929)
30+
31+
32+ filegroup (
33+ name = "constraints-swerv" ,
34+ srcs = [
35+ "designs/asap7/swerv_wrapper/constraint.sdc" ,
36+ ],
37+ visibility = [":__subpackages__" ],
38+ )
39+
40+ filegroup (
41+ name = "swerv-fastroute" ,
42+ srcs = [
43+ "designs/asap7/swerv_wrapper/fastroute.tcl" ,
44+ ],
45+ visibility = [":__subpackages__" ],
46+ )
47+
48+ filegroup (
49+ name = "additional_lefs" ,
50+ srcs = glob (include = ["designs/asap7/swerv_wrapper/lef/*.lef" ])
51+ )
52+ filegroup (
53+ name = "additional_libs" ,
54+ srcs = glob (include = ["designs/asap7/swerv_wrapper/lib/*.lib" ])
55+ )
56+
57+ SWERV_ALL = {"LIB_MODEL" :"CCS" ,
58+ "ADDITIONAL_LEFS" : "$(locations :additional_lefs)" ,
59+ "ADDITIONAL_LIBS" : "$(locations :additional_libs)" ,
60+ }
61+
62+ all_sources = [":additional_lefs" , ":additional_libs" ]
63+
64+ orfs_flow (
65+ name = "swerv_wrapper" ,
66+ stage_args = {
67+ "synth" : SWERV_ALL | {
68+ "SYNTH_HIERARCHICAL" : "1" ,
69+ "SDC_FILE" : "$(location :constraints-swerv)" ,
70+ },
71+ "floorplan" : SWERV_ALL | {
72+ "RTLMP_FLOW" : "1" ,
73+ "RTLMP_MAX_INST" : "30000" ,
74+ "RTLMP_MIN_INST" : "5000" ,
75+ "RTLMP_MAX_MACRO" : "30" ,
76+ "RTLMP_MIN_MACRO" : "4" ,
77+ "DIE_AREA" : "0 0 550 600" ,
78+ "CORE_AREA" : "5 5 545 595" ,
79+ "PLACE_PINS_ARGS" : "-exclude left:* -exclude right:*"
80+ },
81+ "place" : SWERV_ALL | {
82+ "PLACE_PINS_ARGS" : "-exclude left:* -exclude right:*" ,
83+ "PLACE_DENSITY_LB_ADDON" : "0.20" ,
84+ },
85+ "cts" : SWERV_ALL | {
86+ "TNS_END_PERCENT" : "100" ,
87+ },
88+ "route" : SWERV_ALL | {
89+ "FASTROUTE_TCL" : "$(location :swerv-fastroute)" ,
90+ },
91+ "final" : SWERV_ALL | {
92+ "PWR_NETS_VOLTAGEsS" : "" ,
93+ "GND_NETS_VOLTAGES" : "" ,
94+ }
95+ },
96+ verilog_files = glob (include = ["designs/src/swerv/swerv_wrapper.sv2v.v" ,
97+ "designs/asap7/swerv_wrapper/macros.v" ]),
98+ stage_sources = {
99+ "synth" : all_sources + [":constraints-swerv" ],
100+ "floorplan" : all_sources ,
101+ "place" : all_sources ,
102+ "cts" : all_sources ,
103+ "route" : all_sources + [":swerv-fastroute" ],
104+ "final" : all_sources ,
105+ },
106+ )
0 commit comments