Skip to content

Commit e1f8a02

Browse files
committed
ant/cgt: tidy/format and bzl BUILD fix
Signed-off-by: Matt Liberty <[email protected]>
1 parent 8cfd042 commit e1f8a02

File tree

6 files changed

+32
-20
lines changed

6 files changed

+32
-20
lines changed

src/ant/include/ant/AntennaChecker.hh

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

44
#pragma once
55

6+
#include <memory>
7+
68
#include "odb/db.h"
79

810
namespace utl {

src/ant/src/AntennaChecker.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
#include <map>
1111
#include <memory>
1212
#include <mutex>
13-
#include <queue>
1413
#include <set>
1514
#include <string>
1615
#include <unordered_map>
1716
#include <utility>
1817
#include <vector>
1918

19+
#include "AntennaCheckerImpl.hh"
2020
#include "Polygon.hh"
2121
#include "WireBuilder.hh"
2222
#include "boost/pending/disjoint_sets.hpp"
@@ -88,7 +88,8 @@ void AntennaChecker::setReportFileName(const char* file_name)
8888
impl_->setReportFileName(file_name);
8989
}
9090

91-
void AntennaChecker::makeNetWiresFromGuides(const std::vector<odb::dbNet*>& nets)
91+
void AntennaChecker::makeNetWiresFromGuides(
92+
const std::vector<odb::dbNet*>& nets)
9293
{
9394
impl_->makeNetWiresFromGuides(nets);
9495
}

src/ant/src/AntennaCheckerImpl.hh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
#pragma once
55

6+
#include <fstream>
67
#include <map>
8+
#include <memory>
79
#include <mutex>
8-
#include <queue>
910
#include <set>
11+
#include <string>
12+
#include <utility>
13+
#include <vector>
1014

1115
#include "ant/AntennaChecker.hh"
1216
#include "odb/db.h"

src/cgt/BUILD

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ cc_library(
1616
name = "cgt",
1717
srcs = [
1818
"src/ClockGating.cpp",
19+
"src/ClockGatingImpl.h",
1920
"src/MakeClockGating.cpp",
2021
"src/NetworkBuilder.cpp",
22+
"src/NetworkBuilder.h",
23+
"src/RandomBits.h",
2124
":swig",
2225
":tcl",
2326
],
2427
hdrs = [
2528
"include/cgt/ClockGating.h",
2629
"include/cgt/MakeClockGating.h",
27-
"include/cgt/NetworkBuilder.h",
28-
"include/cgt/RandomBits.h",
2930
],
3031
defines = [
3132
"ABC_NAMESPACE=abc",

src/cgt/src/ClockGating.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern void Abc_FrameSetLibGen(void* pLib);
6565
namespace cgt {
6666

6767
ClockGating::ClockGating(utl::Logger* logger, sta::dbSta* open_sta)
68-
: impl_(std::make_unique<Impl>(logger, open_sta))
68+
: impl_(std::make_unique<Impl>(logger, open_sta))
6969
{
7070
}
7171

@@ -679,12 +679,13 @@ static std::vector<sta::Net*> except(
679679
return result;
680680
}
681681

682-
void ClockGating::Impl::searchClockGates(sta::Instance* const instance,
683-
std::vector<sta::Net*>& good_gate_conds,
684-
const std::vector<sta::Net*>::iterator begin,
685-
const std::vector<sta::Net*>::iterator end,
686-
abc::Abc_Ntk_t& abc_network,
687-
const bool clk_enable)
682+
void ClockGating::Impl::searchClockGates(
683+
sta::Instance* const instance,
684+
std::vector<sta::Net*>& good_gate_conds,
685+
const std::vector<sta::Net*>::iterator begin,
686+
const std::vector<sta::Net*>::iterator end,
687+
abc::Abc_Ntk_t& abc_network,
688+
const bool clk_enable)
688689
{
689690
int half_len = (end - begin) / 2;
690691
if (half_len == 0) {
@@ -1105,7 +1106,7 @@ utl::UniquePtrWithDeleter<abc::Abc_Ntk_t> ClockGating::Impl::makeTestNetwork(
11051106
}
11061107

11071108
bool ClockGating::Impl::simulationTest(abc::Abc_Ntk_t* const abc_network,
1108-
const std::string& combined_gate_name)
1109+
const std::string& combined_gate_name)
11091110
{
11101111
DebugScopedTimer timer(
11111112
sim_time_, logger_, CGT, "clock_gating", 3, "Simulation time: {}");
@@ -1144,7 +1145,7 @@ bool ClockGating::Impl::simulationTest(abc::Abc_Ntk_t* const abc_network,
11441145
}
11451146

11461147
bool ClockGating::Impl::satTest(abc::Abc_Ntk_t* const abc_network,
1147-
const std::string& combined_gate_name)
1148+
const std::string& combined_gate_name)
11481149
{
11491150
DebugScopedTimer timer(
11501151
sat_time_, logger_, CGT, "clock_gating", 3, "SAT time: {}");
@@ -1215,9 +1216,10 @@ bool ClockGating::Impl::isCorrectClockGate(
12151216
return true;
12161217
}
12171218

1218-
void ClockGating::Impl::insertClockGate(const std::vector<sta::Instance*>& instances,
1219-
const std::vector<sta::Net*>& gate_cond_nets,
1220-
const bool clk_enable)
1219+
void ClockGating::Impl::insertClockGate(
1220+
const std::vector<sta::Instance*>& instances,
1221+
const std::vector<sta::Net*>& gate_cond_nets,
1222+
const bool clk_enable)
12211223
{
12221224
auto network = sta_->getDbNetwork();
12231225

@@ -1387,7 +1389,8 @@ void ClockGating::Impl::dump(const char* const name)
13871389
dump_counter_++;
13881390
}
13891391

1390-
void ClockGating::Impl::dumpAbc(const char* const name, abc::Abc_Ntk_t* const network)
1392+
void ClockGating::Impl::dumpAbc(const char* const name,
1393+
abc::Abc_Ntk_t* const network)
13911394
{
13921395
if (!dump_dir_) {
13931396
return;
@@ -1429,7 +1432,8 @@ std::filesystem::path ClockGating::Impl::getAbcGraphvizDumpPath(
14291432
/ (std::to_string(dump_counter_) + "_abc_" + name + ".dot");
14301433
}
14311434

1432-
std::filesystem::path ClockGating::Impl::getAbcVerilogDumpPath(const char* const name)
1435+
std::filesystem::path ClockGating::Impl::getAbcVerilogDumpPath(
1436+
const char* const name)
14331437
{
14341438
return getDumpDir() / (std::to_string(dump_counter_) + "_abc_" + name + ".v");
14351439
}

src/cgt/src/ClockGatingImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#pragma once
55

6-
#include <cstddef>
76
#include <filesystem>
87
#include <memory>
98
#include <optional>
@@ -12,6 +11,7 @@
1211

1312
#include "NetworkBuilder.h"
1413
#include "RandomBits.h"
14+
#include "cgt/ClockGating.h"
1515
#include "db_sta/dbSta.hh"
1616
#include "utl/deleter.h"
1717
#include "utl/unique_name.h"

0 commit comments

Comments
 (0)