Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/drt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ detailed_route
[-via_access_layer layer]
[-or_seed seed]
[-or_k k]
[-bottom_routing_layer layer]
[-top_routing_layer layer]
[-verbose level]
[-distributed]
[-remote_host rhost]
Expand Down Expand Up @@ -85,8 +83,6 @@ detailed_route
| `-min_access_points` | Refer to pin access arguments [here](#pin-access-arguments). |
| `-or_seed` | Refer to developer arguments [here](#developer-arguments). |
| `-or_k` | Refer to developer arguments [here](#developer-arguments). |
| `-bottom_routing_layer` | Bottommost routing layer name. |
| `-top_routing_layer` | Topmost routing layer name. |
| `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) |
| `-distributed` | Refer to distributed arguments [here](#distributed-arguments). |
| `-remote_host` | Refer to distributed arguments [here](#distributed-arguments). |
Expand Down Expand Up @@ -160,7 +156,6 @@ This function checks pin access.
```tcl
pin_access
[-db_process_node name]
[-bottom_routing_layer layer]
[-top_routing_layer layer]
[-via_access_layer layer]
[-via_in_pin_bottom_layer layer]
Expand All @@ -179,8 +174,6 @@ pin_access
| Switch Name | Description |
| ----- | ----- |
| `-db_process_node` | Specify process node. |
| `-bottom_routing_layer` | Bottommost routing layer. |
| `-top_routing_layer` | Topmost routing layer name. |
| `-via_access_layer` | Refer to pin access arguments [here](#pin-access-arguments). |
| `-via_in_pin_bottom_layer` | Refer to pin access arguments [here](#pin-access-arguments). |
| `-via_in_pin_top_layer` | Refer to pin access arguments [here](#pin-access-arguments). |
Expand Down
2 changes: 0 additions & 2 deletions src/drt/include/triton_route/TritonRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ struct ParamStruct
std::string viaAccessLayer;
int orSeed = 0;
double orK = 0;
std::string bottomRoutingLayer;
std::string topRoutingLayer;
int verbose = 1;
bool cleanPatches = false;
bool doPa = false;
Expand Down
6 changes: 0 additions & 6 deletions src/drt/src/TritonRoute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,12 +1275,6 @@ void TritonRoute::setParams(const ParamStruct& params)
}
router_cfg_->OR_SEED = params.orSeed;
router_cfg_->OR_K = params.orK;
if (!params.bottomRoutingLayer.empty()) {
router_cfg_->BOTTOM_ROUTING_LAYER_NAME = params.bottomRoutingLayer;
}
if (!params.topRoutingLayer.empty()) {
router_cfg_->TOP_ROUTING_LAYER_NAME = params.topRoutingLayer;
}
if (params.minAccessPoints > 0) {
router_cfg_->MINNUMACCESSPOINT_STDCELLPIN = params.minAccessPoints;
router_cfg_->MINNUMACCESSPOINT_MACROCELLPIN = params.minAccessPoints;
Expand Down
8 changes: 0 additions & 8 deletions src/drt/src/TritonRoute.i
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ void detailed_route_cmd(const char* outputMazeFile,
const char* viaAccessLayer,
int orSeed,
double orK,
const char* bottomRoutingLayer,
const char* topRoutingLayer,
int verbose,
bool cleanPatches,
bool noPa,
Expand Down Expand Up @@ -90,8 +88,6 @@ void detailed_route_cmd(const char* outputMazeFile,
viaAccessLayer,
orSeed,
orK,
bottomRoutingLayer,
topRoutingLayer,
verbose,
cleanPatches,
!noPa,
Expand All @@ -105,8 +101,6 @@ void detailed_route_cmd(const char* outputMazeFile,
}

void pin_access_cmd(const char* dbProcessNode,
const char* bottomRoutingLayer,
const char* topRoutingLayer,
const char* viaAccessLayer,
int verbose,
int minAccessPoints,
Expand All @@ -116,8 +110,6 @@ void pin_access_cmd(const char* dbProcessNode,
auto* router = ord::OpenRoad::openRoad()->getTritonRoute();
drt::ParamStruct params;
params.dbProcessNode = dbProcessNode;
params.bottomRoutingLayer = bottomRoutingLayer;
params.topRoutingLayer = topRoutingLayer;
params.verbose = verbose;
params.viaAccessLayer = viaAccessLayer;
params.minAccessPoints = minAccessPoints;
Expand Down
22 changes: 7 additions & 15 deletions src/drt/src/TritonRoute.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,10 @@ proc detailed_route { args } {
set or_k 0
}
if { [info exists keys(-bottom_routing_layer)] } {
set bottom_routing_layer $keys(-bottom_routing_layer)
} else {
set bottom_routing_layer ""
utl::error DRT 509 "-bottom_routing_layer is deprecated. Use set_routing_layers command instead."
}
if { [info exists keys(-top_routing_layer)] } {
set top_routing_layer $keys(-top_routing_layer)
} else {
set top_routing_layer ""
utl::error DRT 510 "-top_routing_layer is deprecated. Use set_routing_layers command instead."
}
if { [info exists keys(-verbose)] } {
sta::check_positive_integer "-verbose" $keys(-verbose)
Expand Down Expand Up @@ -169,7 +165,7 @@ proc detailed_route { args } {
drt::detailed_route_cmd $output_maze $output_drc $output_cmap \
$output_guide_coverage $db_process_node $enable_via_gen $droute_end_iter \
$via_in_pin_bottom_layer $via_in_pin_top_layer \
$via_access_layer $or_seed $or_k $bottom_routing_layer $top_routing_layer $verbose \
$via_access_layer $or_seed $or_k $verbose \
$clean_patches $no_pin_access $single_step_dr $min_access_points \
$save_guide_updates $repair_pdn_vias $drc_report_iter_step
}
Expand Down Expand Up @@ -296,14 +292,10 @@ proc pin_access { args } {
set db_process_node ""
}
if { [info exists keys(-bottom_routing_layer)] } {
set bottom_routing_layer $keys(-bottom_routing_layer)
} else {
set bottom_routing_layer ""
utl::error DRT 511 "-bottom_routing_layer is deprecated. Use set_routing_layers command instead."
}
if { [info exists keys(-top_routing_layer)] } {
set top_routing_layer $keys(-top_routing_layer)
} else {
set top_routing_layer ""
utl::error DRT 514 "-top_routing_layer is deprecated. Use set_routing_layers command instead."
}
if { [info exists keys(-via_access_layer)] } {
set via_access_layer $keys(-via_access_layer)
Expand Down Expand Up @@ -355,8 +347,8 @@ proc pin_access { args } {
}
drt::detailed_route_distributed $rhost $rport $vol $cloudsz
}
drt::pin_access_cmd $db_process_node $bottom_routing_layer \
$top_routing_layer $via_access_layer $verbose $min_access_points \
drt::pin_access_cmd $db_process_node \
$via_access_layer $verbose $min_access_points \
$via_in_pin_bottom_layer $via_in_pin_top_layer
}

Expand Down
2 changes: 0 additions & 2 deletions src/drt/src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ struct RouterConfiguration
int MTSAFEDIST = 2000;
int DRCSAFEDIST = 500;
int VERBOSE = 1;
std::string BOTTOM_ROUTING_LAYER_NAME;
std::string TOP_ROUTING_LAYER_NAME;
int BOTTOM_ROUTING_LAYER = 2;
int TOP_ROUTING_LAYER = std::numeric_limits<int>::max();
bool ALLOW_PIN_AS_FEEDTHROUGH = true;
Expand Down
33 changes: 20 additions & 13 deletions src/drt/src/io/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,8 @@ void io::Parser::readTechAndLibs(odb::dbDatabase* db)
}

auto tech = db->getTech();
if (tech == nullptr) {
auto block = db_->getChip()->getBlock();
if (tech == nullptr || block == nullptr) {
logger_->error(DRT, 136, "Load design first.");
}
getTech()->setDBUPerUU(tech->getDbUnitsPerMicron());
Expand All @@ -3039,27 +3040,32 @@ void io::Parser::readTechAndLibs(odb::dbDatabase* db)
setLayers(tech);

auto fr_tech = getTech();
if (!router_cfg_->BOTTOM_ROUTING_LAYER_NAME.empty()) {
frLayer* layer = fr_tech->getLayer(router_cfg_->BOTTOM_ROUTING_LAYER_NAME);

const int min_routing_layer = block->getMinRoutingLayer();
if (min_routing_layer > 0) {
odb::dbTechLayer* tech_layer = tech->findRoutingLayer(min_routing_layer);
frLayer* layer = fr_tech->getLayer(tech_layer->getName());
if (layer) {
router_cfg_->BOTTOM_ROUTING_LAYER = layer->getLayerNum();
} else {
logger_->warn(utl::DRT,
272,
"bottomRoutingLayer {} not found.",
router_cfg_->BOTTOM_ROUTING_LAYER_NAME);
tech_layer->getName());
}
}

if (!router_cfg_->TOP_ROUTING_LAYER_NAME.empty()) {
frLayer* layer = fr_tech->getLayer(router_cfg_->TOP_ROUTING_LAYER_NAME);
const int max_routing_layer = block->getMaxRoutingLayer();
if (max_routing_layer > 0) {
odb::dbTechLayer* tech_layer = tech->findRoutingLayer(max_routing_layer);
frLayer* layer = fr_tech->getLayer(tech_layer->getName());
if (layer) {
router_cfg_->TOP_ROUTING_LAYER = layer->getLayerNum();
} else {
logger_->warn(utl::DRT,
273,
"topRoutingLayer {} not found.",
router_cfg_->TOP_ROUTING_LAYER_NAME);
tech_layer->getName());
}
} else {
for (frLayerNum layer_num = fr_tech->getTopLayerNum();
Expand Down Expand Up @@ -3929,8 +3935,9 @@ Point io::TopLayerBTermHandler::getBestViaPosition(Rect pin_rect)
int io::TopLayerBTermHandler::countNetBTermsAboveMaxLayer(odb::dbNet* net)
{
odb::dbTech* tech = db_->getTech();
odb::dbTechLayer* top_tech_layer
= tech->findLayer(router_cfg_->TOP_ROUTING_LAYER_NAME.c_str());
odb::dbBlock* block = db_->getChip()->getBlock();
const int max_routing_layer = block->getMaxRoutingLayer();
odb::dbTechLayer* top_tech_layer = tech->findRoutingLayer(max_routing_layer);
int bterm_count = 0;
for (auto bterm : net->getBTerms()) {
int bterm_bottom_layer_idx = std::numeric_limits<int>::max();
Expand Down Expand Up @@ -4046,14 +4053,14 @@ void io::TopLayerBTermHandler::stackVias(odb::dbBTerm* bterm,

void io::TopLayerBTermHandler::processBTermsAboveTopLayer(bool has_routing)
{
if (router_cfg_->TOP_ROUTING_LAYER_NAME.empty()) {
odb::dbBlock* block = db_->getChip()->getBlock();
const int max_routing_layer = block->getMaxRoutingLayer();
if (max_routing_layer < 0) {
return;
}
odb::dbTech* tech = db_->getTech();
odb::dbBlock* block = db_->getChip()->getBlock();

odb::dbTechLayer* top_tech_layer
= tech->findLayer(router_cfg_->TOP_ROUTING_LAYER_NAME.c_str());
odb::dbTechLayer* top_tech_layer = tech->findRoutingLayer(max_routing_layer);
if (top_tech_layer != nullptr) {
int top_layer_idx = top_tech_layer->getRoutingLevel();
for (auto bterm : block->getBTerms()) {
Expand Down
2 changes: 0 additions & 2 deletions src/drt/src/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,6 @@ void serializeGlobals(Archive& ar, RouterConfiguration* router_cfg)
(ar) & router_cfg->MTSAFEDIST;
(ar) & router_cfg->DRCSAFEDIST;
(ar) & router_cfg->VERBOSE;
(ar) & router_cfg->BOTTOM_ROUTING_LAYER_NAME;
(ar) & router_cfg->TOP_ROUTING_LAYER_NAME;
(ar) & router_cfg->BOTTOM_ROUTING_LAYER;
(ar) & router_cfg->TOP_ROUTING_LAYER;
(ar) & router_cfg->ALLOW_PIN_AS_FEEDTHROUGH;
Expand Down
2 changes: 0 additions & 2 deletions src/drt/test/drt_aux.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def detailed_route(
params.viaInPinTopLayer = via_in_pin_top_layer
params.orSeed = or_seed
params.orK = or_k
params.bottomRoutingLayer = bottom_routing_layer
params.topRoutingLayer = top_routing_layer
params.verbose = verbose
params.cleanPatches = clean_patches
params.doPa = not no_pin_access
Expand Down
3 changes: 2 additions & 1 deletion src/drt/test/ndr_vias1.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ assign_ndr -ndr NDR_3W_3S -net clknet_2_1__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_2__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_3__leaf_clk

detailed_route -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
set_routing_layers -signal met1-met5
detailed_route -verbose 0

write_def $def_file
diff_files ndr_vias1.defok $def_file
3 changes: 2 additions & 1 deletion src/drt/test/ndr_vias2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ assign_ndr -ndr NDR_3W_3S -net clknet_2_1__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_2__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_3__leaf_clk

detailed_route -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
set_routing_layers -signal met1-met5
detailed_route -verbose 0

write_def $def_file
diff_files ndr_vias2.defok $def_file
3 changes: 2 additions & 1 deletion src/drt/test/ndr_vias3.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ assign_ndr -ndr NDR_3W_3S -net clknet_2_1__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_2__leaf_clk
assign_ndr -ndr NDR_3W_3S -net clknet_2_3__leaf_clk

detailed_route -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
set_routing_layers -signal met1-met5
detailed_route -verbose 0

write_def $def_file
diff_files ndr_vias3.defok $def_file
3 changes: 2 additions & 1 deletion src/drt/test/obstruction.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ read_guides "obstruction.guide"

set def_file [make_result_file obstruction.def]

detailed_route -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
set_routing_layers -signal met1-met5
detailed_route -verbose 0

write_def $def_file
diff_files obstruction.defok $def_file
6 changes: 5 additions & 1 deletion src/drt/test/top_level_term.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
gr = design.getGlobalRouter()
gr.readGuides("top_level_term.guide")

design.evalTclString(
"set_routing_layers -signal met1-met3"
)

drt_aux.detailed_route(
design, bottom_routing_layer="met1", top_routing_layer="met3", verbose=0
design, verbose=0
)

def_file = helpers.make_result_file("top_level_term.def")
Expand Down
3 changes: 2 additions & 1 deletion src/drt/test/top_level_term.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ read_guides "top_level_term.guide"

set def_file [make_result_file top_level_term.def]

detailed_route -bottom_routing_layer met1 -top_routing_layer met3 -verbose 0
set_routing_layers -signal met1-met3
detailed_route -verbose 0

write_def $def_file
diff_files top_level_term.defok $def_file
6 changes: 5 additions & 1 deletion src/drt/test/top_level_term2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
gr = design.getGlobalRouter()
gr.readGuides("top_level_term2.guide")

design.evalTclString(
"set_routing_layers -signal met1-met3"
)

drt_aux.detailed_route(
design, bottom_routing_layer="met1", top_routing_layer="met3", verbose=0
design, verbose=0
)

def_file = helpers.make_result_file("top_level_term2.def")
Expand Down
3 changes: 2 additions & 1 deletion src/drt/test/top_level_term2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ read_guides "top_level_term2.guide"

set def_file [make_result_file top_level_term2.def]

detailed_route -bottom_routing_layer met1 -top_routing_layer met3 -verbose 0
set_routing_layers -signal met1-met3
detailed_route -verbose 0

write_def $def_file
diff_files top_level_term2.defok $def_file
6 changes: 2 additions & 4 deletions src/drt/test/via_access_layer.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ read_lef "via_access_layer.lef"
read_def "via_access_layer.def"
read_guides "via_access_layer.guides"

detailed_route -bottom_routing_layer met3 \
-top_routing_layer met5 \
-via_access_layer met2 \
-verbose 0
set_routing_layers -signal met3-met5
detailed_route -via_access_layer met2 -verbose 0

set def_file [make_result_file via_access_layer.def]

Expand Down
2 changes: 1 addition & 1 deletion src/grt/test/pin_access1.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
grt_aux.set_routing_layers(design, signal="met1-met5", clock="met3-met5")

design.evalTclString(
"pin_access -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0"
"pin_access -verbose 0"
)

gr.setVerbose(True)
Expand Down
2 changes: 1 addition & 1 deletion src/grt/test/pin_access1.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set_global_routing_layer_adjustment * 0.5

set_routing_layers -signal met1-met5 -clock met3-met5

pin_access -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
pin_access -verbose 0

global_route -verbose

Expand Down
2 changes: 1 addition & 1 deletion src/grt/test/pin_access2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set_global_routing_layer_adjustment * 0.5

set_routing_layers -signal met1-met5 -clock met3-met5

pin_access -bottom_routing_layer met1 -top_routing_layer met5 -verbose 0
pin_access -verbose 0

global_route -verbose

Expand Down
Loading
Loading