Skip to content

Commit a8537dc

Browse files
committed
Merge remote-tracking branch 'origin' into ant_check_special_nets_issue
Signed-off-by: luis201420 <[email protected]>
2 parents 0b72824 + b4b32b9 commit a8537dc

File tree

235 files changed

+1051
-954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+1051
-954
lines changed

include/ord/Design.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ class Design
130130
void readDef(const std::string& file_name,
131131
bool continue_on_errors = false,
132132
bool floorplan_init = false,
133-
bool incremental = false,
134-
bool child = false);
133+
bool incremental = false);
135134
void link(const std::string& design_name);
136135

137136
void readDb(std::istream& stream);

include/ord/OpenRoad.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class dbDatabase;
1717
class dbBlock;
1818
class dbTech;
1919
class dbLib;
20+
class dbChip;
2021
class Point;
2122
class Rect;
2223
} // namespace odb
@@ -190,11 +191,10 @@ class OpenRoad
190191
bool make_library);
191192

192193
void readDef(const char* filename,
193-
odb::dbTech* tech,
194+
odb::dbChip* chip,
194195
bool continue_on_errors,
195196
bool floorplan_init,
196-
bool incremental,
197-
bool child);
197+
bool incremental);
198198

199199
void writeLef(const char* filename);
200200

src/Design.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ void Design::readVerilog(const std::string& file_name)
5454
void Design::readDef(const std::string& file_name,
5555
bool continue_on_errors, // = false
5656
bool floorplan_init, // = false
57-
bool incremental, // = false
58-
bool child // = false
57+
bool incremental // = false
5958
)
6059
{
6160
if (floorplan_init && incremental) {
@@ -67,12 +66,12 @@ void Design::readDef(const std::string& file_name,
6766
if (tech_->getDB()->getTech() == nullptr) {
6867
getLogger()->error(utl::ORD, 102, "No technology has been read.");
6968
}
70-
getOpenRoad()->readDef(file_name.c_str(),
71-
tech_->getDB()->getTech(),
72-
continue_on_errors,
73-
floorplan_init,
74-
incremental,
75-
child);
69+
auto chip = tech_->getDB()->getChip();
70+
if (chip == nullptr) {
71+
chip = odb::dbChip::create(tech_->getDB(), tech_->getDB()->getTech());
72+
}
73+
getOpenRoad()->readDef(
74+
file_name.c_str(), chip, continue_on_errors, floorplan_init, incremental);
7675
}
7776

7877
void Design::link(const std::string& design_name)

src/OpenRoad.cc

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,12 @@ void OpenRoad::readLef(const char* filename,
329329
}
330330

331331
void OpenRoad::readDef(const char* filename,
332-
dbTech* tech,
332+
dbChip* chip,
333333
bool continue_on_errors,
334334
bool floorplan_init,
335-
bool incremental,
336-
bool child)
335+
bool incremental)
337336
{
338-
if (!floorplan_init && !incremental && !child && db_->getChip()
339-
&& db_->getChip()->getBlock()) {
337+
if (!floorplan_init && !incremental && chip && chip->getBlock()) {
340338
logger_->info(ORD, 48, "Loading an additional DEF.");
341339
}
342340

@@ -354,12 +352,7 @@ void OpenRoad::readDef(const char* filename,
354352
if (continue_on_errors) {
355353
def_reader.continueOnErrors();
356354
}
357-
if (child) {
358-
auto parent = db_->getChip()->getBlock();
359-
def_reader.createBlock(parent, search_libs, filename, tech);
360-
} else {
361-
def_reader.createChip(search_libs, filename, tech);
362-
}
355+
def_reader.readChip(search_libs, filename, chip);
363356
}
364357

365358
static odb::defout::Version stringToDefVersion(const string& version)

src/OpenRoad.i

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -311,26 +311,14 @@ read_lef_cmd(const char *filename,
311311

312312
void
313313
read_def_cmd(const char *filename,
314-
const char* tech_name,
315314
bool continue_on_errors,
316315
bool floorplan_init,
317316
bool incremental,
318-
bool child)
317+
odb::dbChip* chip)
319318
{
320319
OpenRoad *ord = getOpenRoad();
321-
auto* db = ord->getDb();
322-
dbTech* tech;
323-
if (tech_name[0] != '\0') {
324-
tech = db->findTech(tech_name);
325-
} else {
326-
tech = db->getTech();
327-
}
328-
if (!tech) {
329-
auto logger = getLogger();
330-
logger->error(utl::ORD, 52, "Technology {} not found", tech_name);
331-
}
332-
ord->readDef(filename, tech, continue_on_errors,
333-
floorplan_init, incremental, child);
320+
ord->readDef(filename, chip, continue_on_errors,
321+
floorplan_init, incremental);
334322
}
335323

336324
void

src/OpenRoad.tcl

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ proc read_lef { args } {
3838
ord::read_lef_cmd $filename $lib_name $tech_name $make_tech $make_lib
3939
}
4040

41-
sta::define_cmd_args "read_def" {[-floorplan_initialize|-incremental|-child]\
41+
sta::define_cmd_args "read_def" {[-floorplan_initialize|-incremental]\
4242
[-continue_on_errors]\
4343
[-tech name] \
44+
[-chip chip_name] \
4445
filename}
4546

4647
proc read_def { args } {
47-
sta::parse_key_args "read_def" args keys {-tech} \
48+
sta::parse_key_args "read_def" args keys {-tech -chip} \
4849
flags {-floorplan_initialize -incremental \
49-
-order_wires -continue_on_errors -child}
50+
-order_wires -continue_on_errors}
5051
sta::check_argc_eq1 "read_def" $args
5152
set filename [file nativename [lindex $args 0]]
5253
if { ![file exists $filename] } {
@@ -55,25 +56,41 @@ proc read_def { args } {
5556
if { ![file readable $filename] || ![file isfile $filename] } {
5657
utl::error "ORD" 4 "$filename is not readable."
5758
}
58-
set tech_name ""
5959
if { [info exists keys(-tech)] } {
6060
set tech_name $keys(-tech)
61+
set tech [[ord::get_db] findTech $tech_name]
62+
if { $tech == "NULL" } {
63+
utl::error ORD 52 "Technology $tech_name not found."
64+
}
6165
} elseif { ![ord::db_has_tech] } {
6266
utl::error "ORD" 5 "No technology has been read."
67+
} else {
68+
set tech [[ord::get_db] getTech]
6369
}
6470
if { [info exists flags(-order_wires)] } {
6571
utl::warn "ORD" 33 "-order_wires is deprecated."
6672
}
6773
set continue_on_errors [info exists flags(-continue_on_errors)]
6874
set floorplan_init [info exists flags(-floorplan_initialize)]
6975
set incremental [info exists flags(-incremental)]
70-
set child [info exists flags(-child)]
71-
if { $floorplan_init + $incremental + $child > 1 } {
72-
utl::error ORD 16 "Options -incremental, -floorplan_initialization,\
73-
and -child are mutually exclusive."
76+
if { $floorplan_init + $incremental > 1 } {
77+
utl::error ORD 16 "Options -incremental and -floorplan_initialization\
78+
are mutually exclusive."
79+
}
80+
if { [info exists keys(-chip)] } {
81+
set chip [[ord::get_db] findChip $keys(-chip)]
82+
if { $chip == "NULL" } {
83+
utl::error ORD 21 "Chip $keys(-chip) not found."
84+
}
85+
} else {
86+
if { [[ord::get_db] getChip] == "NULL" } {
87+
set chip [odb::dbChip_create [ord::get_db] $tech]
88+
} else {
89+
set chip [[ord::get_db] getChip]
90+
}
7491
}
75-
ord::read_def_cmd $filename $tech_name $continue_on_errors $floorplan_init \
76-
$incremental $child
92+
ord::read_def_cmd $filename $continue_on_errors $floorplan_init \
93+
$incremental $chip
7794
}
7895

7996
sta::define_cmd_args "write_def" {[-version version] filename}

src/ant/src/AntennaChecker.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@
99
#include <cstdio>
1010
#include <cstring>
1111
#include <fstream>
12-
#include <iostream>
1312
#include <map>
1413
#include <memory>
1514
#include <mutex>
16-
#include <queue>
1715
#include <set>
1816
#include <unordered_map>
19-
#include <unordered_set>
2017
#include <utility>
2118
#include <vector>
2219

src/cgt/include/cgt/ClockGating.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
#pragma once
55

6+
#include <cstddef>
67
#include <filesystem>
8+
#include <memory>
9+
#include <optional>
10+
#include <string>
11+
#include <vector>
712

813
#include "cgt/NetworkBuilder.h"
914
#include "cgt/RandomBits.h"

src/cgt/include/cgt/NetworkBuilder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
#pragma once
55

6+
#include <array>
7+
#include <cstddef>
8+
#include <string>
9+
610
#include "db_sta/dbNetwork.hh"
711
#include "db_sta/dbSta.hh"
812
#include "utl/deleter.h"

src/cgt/src/ClockGating.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@
44
#include "cgt/ClockGating.h"
55

66
#include <algorithm>
7+
#include <cassert>
8+
#include <cstdio>
9+
#include <cstdlib>
10+
#include <cstring>
11+
#include <filesystem>
712
#include <fstream>
13+
#include <memory>
14+
#include <ostream>
15+
#include <string>
16+
#include <tuple>
17+
#include <unordered_map>
818
#include <unordered_set>
19+
#include <vector>
920

1021
#include "base/abc/abc.h"
1122
#include "base/io/ioAbc.h"

0 commit comments

Comments
 (0)