Skip to content

Commit bbb1c58

Browse files
malibertyshypark98
authored andcommitted
Merge pull request #8323 from The-OpenROAD-Project-staging/grt_remove_droute
grt: add command to destroy signal and clock nets routing
2 parents d34e3ac + 2c37297 commit bbb1c58

File tree

19 files changed

+1105
-2
lines changed

19 files changed

+1105
-2
lines changed

src/odb/include/odb/db.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,11 @@ class dbBlock : public dbObject
13301330

13311331
std::map<dbTechLayer*, dbTechVia*> getDefaultVias();
13321332

1333+
///
1334+
/// Destroy all the routing wires from signal and clock nets in this block.
1335+
///
1336+
void destroyRoutes();
1337+
13331338
public:
13341339
///
13351340
/// Create a chip's top-block. Returns nullptr of a top-block already

src/odb/src/db/dbBlock.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,6 +3167,20 @@ std::map<dbTechLayer*, odb::dbTechVia*> dbBlock::getDefaultVias()
31673167
return default_vias;
31683168
}
31693169

3170+
void dbBlock::destroyRoutes()
3171+
{
3172+
dbBlock* block = this;
3173+
for (odb::dbNet* db_net : block->getNets()) {
3174+
if (!db_net->getSigType().isSupply() && !db_net->isSpecial()
3175+
&& db_net->getSWires().empty() && !db_net->isConnectedByAbutment()) {
3176+
odb::dbWire* wire = db_net->getWire();
3177+
if (wire != nullptr) {
3178+
odb::dbWire::destroy(wire);
3179+
}
3180+
}
3181+
}
3182+
}
3183+
31703184
void dbBlock::setDrivingItermsforNets()
31713185
{
31723186
for (dbNet* net : getNets()) {

src/odb/src/swig/tcl/odb.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,4 +1101,9 @@ proc get_block { } {
11011101
set chip [$db getChip]
11021102
return [$chip getBlock]
11031103
}
1104+
1105+
proc destroy_routes { } {
1106+
set block [ord::get_db_block]
1107+
$block destroyRoutes
1108+
}
11041109
}

src/par/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ cc_library(
2626
"src/KWayFMRefine.h",
2727
"src/KWayPMRefine.cpp",
2828
"src/KWayPMRefine.h",
29+
"src/ArtNetSpec.cpp",
30+
"src/ArtNetSpec.h",
2931
"src/Multilevel.cpp",
3032
"src/Multilevel.h",
3133
"src/PartitionMgr.cpp",

src/par/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ add_library(par_lib
3232
src/KWayFMRefine.cpp
3333
src/KWayPMRefine.cpp
3434
src/PriorityQueue.cpp
35+
src/ArtNetSpec.cpp
3536
)
3637

3738
target_include_directories(par_lib

src/par/README.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,69 @@ Simply run the following script:
598598
./test/regression
599599
```
600600

601+
# ArtNet Spec File Generation Flow
602+
603+
ArtNet is the hierarchical clustering-based artificial netlist generator with the capability to support heterogeneous designs with macros.
604+
ArtNet enables netlist generation from (1) user-specified parameters, and (2) from parameters of a given target design.
605+
| <img src="doc/ArtNet_usecases.png" width=650px> |
606+
|:--:|
607+
| *Use Cases of ArtNet* |
608+
609+
## Netlist Parameters
610+
611+
| <img src="doc/ArtNet_ParamTable.png" width=550px> |
612+
|:--:|
613+
| *Description of Netlist Parameters* |
614+
615+
What is Rent's exponent?
616+
- Rent's Rule [(*link*)](https://ieeexplore.ieee.org/document/1671752)
617+
- A heuristic used to describe the relationship between the number of external pins (connections) and the size of a circuit (usually in terms of the number of gates). It provides a simple way to estimate how the complexity of a circuit grows as the number of components increases.
618+
- **Region1** refers to the portion of the circuit where Rent's rule is typically valid. In this region, the relationship between internal and external connections follows the power-law form described by Rent's rule.
619+
- In **Region 2**, the structure of the circuit may deviate from Rent¡¯s rule and the simple power-law relationship no longer holds as closely.
620+
| <img src="doc/RentsRule.png" width=750px> |
621+
|:--:|
622+
| *Region I and II in #Terminals-#Gate Plot* |
623+
624+
## Spec File Description
625+
- The spec file, which is the input file for ArtNet, is structured as follows.
626+
| <img src="doc/ArtNet_specFile.png" width=550px> |
627+
|:--:|
628+
| *Example of SpecFile* |
629+
630+
- **LIBRARY**: Defines the master names of all standard cells and macros used in the entire circuit.
631+
- **MODULE**: Specifies a submodule within the logical hierarchy under the top module. Multiple types of submodules can be defined; the example includes a single submodule named *sub_module*.
632+
- **LIBRARIES**: Lists the masters and MODULEs used within the circuit or submodule. MODULEs can also include LIBRARIES with other MODULE definitions, representing multi-level hierarchy..
633+
- **DISTRIBUTION**: Indicates the quantity of each master or MODULE defined in LIBRARIES.
634+
- For example, in the top module, if LIBRARIES includes *lib* and *sub_module*, the first DISTRIBUTION line refers to the number of each cell in LIBRARY *lib* (e.g., 1200 DFFHQx4, 3000 INVx2, etc.).
635+
- The second DISTRIBUTION line shows that 10 instances of *sub_module* are used under the top module.
636+
- **SIZE**:
637+
- The first SIZE defines the physical region size of Region 1 (recommended: 0.25x ~ 0.50x of total number of instances).
638+
- The second SIZE indicates the total number of instances in the MODULE or CIRCUIT (recommended: 100 ~ 10^9).
639+
- **p/q**: Represent the interconnect complexity.
640+
- p: Rent¡¯s exponent (recommended: 0.4 ~ 0.7)
641+
- q: the standard deviation of Rent¡¯s exponent. (recommended: 0.01 ~ 0.2)
642+
- **I/O**: The number of primary inputs and outputs for the MODULE or CIRCUIT. (recommended: 10 ~ 1000)
643+
644+
### Parameter Extraction Command
645+
646+
This command performs ArtNet spec file generation.
647+
648+
```tcl
649+
write_artnet_spec
650+
[ -out_file file ]
651+
```
652+
#### Options
653+
654+
| Switch Name | Description |
655+
| ----- | ----- |
656+
| `-out_file` | Name of output spec file. |
657+
658+
601659
## References
602660
1. Bustany, I., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). K-SpecPart: A Supervised Spectral Framework for Multi-Way Hypergraph Partitioning Solution Improvement. arXiv preprint arXiv:2305.06167. [(.pdf)](https://arxiv.org/pdf/2305.06167)
603661
1. Bustany, I., Gasparyan, G., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). "An Open-Source Constraints-Driven General Partitioning Multi-Tool for VLSI Physical Design", Proc. ACM/IEEE International Conference of Computer-Aided Design 2023,[(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/401/c401.pdf).
604-
662+
1. Landman, B. S., & Russo, R. L. (1971). "On a Pin Versus Block Relationship for Partitions of Logic Graphs", IEEE Trans. on Computers, 20(12) pp.1469-1479,[(*link*)](https://ieeexplore.ieee.org/document/1671752).
605663

606664
## License
607665

608-
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.
666+
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.

src/par/doc/ArtNet_ParamTable.png

193 KB
Loading

src/par/doc/ArtNet_specFile.png

311 KB
Loading

src/par/doc/ArtNet_usecases.png

123 KB
Loading

src/par/doc/RentsRule.png

112 KB
Loading

0 commit comments

Comments
 (0)