@@ -40,9 +40,15 @@ OpenRoadPdkInfo = provider(
40
40
"rc_script_configuration" : "RC script for the various metal layers" ,
41
41
"tapcell_tcl" : "TCL file that sets tapcell options. This overrides other tapcell attributes in this rule." ,
42
42
"placement_padding_tcl" : "TCL Script for handling the placement padding of cells" ,
43
+ "detailed_routing_configuration" : "optional detailed routing configuration" ,
43
44
},
44
45
)
45
46
47
+ DetailedRoutingInfo = provider (
48
+ "Detailed routing info params for OpenROAD" ,
49
+ fields = ["bottom_routing_layer" , "top_routing_layer" , "via_in_pin_bottom_layer" , "via_in_pin_top_layer" , "enable_via_gen" ],
50
+ )
51
+
46
52
def _open_road_pdk_configuration_impl (ctx ):
47
53
return [
48
54
OpenRoadPdkInfo (
@@ -69,6 +75,7 @@ def _open_road_pdk_configuration_impl(ctx):
69
75
rc_script_configuration = ctx .file .rc_script_configuration ,
70
76
tapcell_tcl = ctx .file .tapcell_tcl ,
71
77
placement_padding_tcl = ctx .file .placement_padding_tcl ,
78
+ detailed_routing_configuration = ctx .attr .detailed_routing_configuration ,
72
79
),
73
80
]
74
81
@@ -98,7 +105,29 @@ open_road_pdk_configuration = rule(
98
105
"rc_script_configuration" : attr .label (allow_single_file = True ),
99
106
"tapcell_tcl" : attr .label (allow_single_file = True , doc = "TCL file that sets tapcell options. This overrides other tapcell attributes in this rule." ),
100
107
"placement_padding_tcl" : attr .label (allow_single_file = True , doc = "TCL Script for handling the placement padding of cells" ),
108
+ "detailed_routing_configuration" : attr .label (providers = [DetailedRoutingInfo ]),
109
+ },
110
+ )
111
+
112
+ def detailed_routing_configuration_impl (ctx ):
113
+ return [DetailedRoutingInfo (
114
+ bottom_routing_layer = ctx .attr .bottom_routing_layer ,
115
+ top_routing_layer = ctx .attr .top_routing_layer ,
116
+ via_in_pin_bottom_layer = ctx .attr .via_in_pin_bottom_layer ,
117
+ via_in_pin_top_layer = ctx .attr .via_in_pin_top_layer ,
118
+ enable_via_gen = ctx .attr .enable_via_gen ,
119
+ )]
120
+
121
+ detailed_routing_configuration = rule (
122
+ implementation = detailed_routing_configuration_impl ,
123
+ attrs = {
124
+ "bottom_routing_layer" : attr .string (mandatory = True , doc = "Minimum routing layer name" ),
125
+ "top_routing_layer" : attr .string (mandatory = True , doc = "Maximum routing layer name" ),
126
+ "via_in_pin_bottom_layer" : attr .string (doc = "via in pin bottom layer" ),
127
+ "via_in_pin_top_layer" : attr .string (doc = "via in pin top layer" ),
128
+ "enable_via_gen" : attr .bool (default = True ),
101
129
},
130
+ provides = [DetailedRoutingInfo ],
102
131
)
103
132
104
133
def assert_has_open_road_configuration (synthesis_info ):
0 commit comments