Skip to content

Commit 7559f96

Browse files
authored
Merge pull request #8923 from gadfort/rcx-cleanup2
rcx: remove unused members
2 parents 5be9765 + f8b5434 commit 7559f96

File tree

5 files changed

+5
-137
lines changed

5 files changed

+5
-137
lines changed

src/rcx/include/rcx/extMeasureRC.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,6 @@ struct CouplingState
5252
one_count_table++;
5353
}
5454
}
55-
56-
// Print statistics
57-
void printStats(FILE* fp, uint dir) const
58-
{
59-
if (fp) {
60-
fprintf(fp,
61-
"\nDir=%d wireCnt=%d NotOrderedCnt=%d oneEmptyTable=%d "
62-
"oneCntTable=%d\n",
63-
dir,
64-
wire_count,
65-
not_ordered_count,
66-
empty_table_count,
67-
one_count_table);
68-
}
69-
}
7055
};
7156
struct CouplingConfig
7257
{

src/rcx/include/rcx/extRCap.h

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ class extRCModel
763763
const char* name,
764764
const char* suffix,
765765
const char* permissions);
766-
FILE* openSolverFile();
767766
void mkNet_prefix(extMeasure* m, const char* wiresNameSuffix);
768767
void mkFileNames(extMeasure* m, char* wiresNameSuffix);
769768
void writeWires2(FILE* fp, extMeasure* measure, uint wireCnt);
@@ -1374,7 +1373,6 @@ class extMeasure
13741373
double s2 = 0.0);
13751374
void setEffParams(double wTop, double wBot, double teff);
13761375
void addCap();
1377-
void printStats(FILE* fp);
13781376
void printMets(FILE* fp);
13791377

13801378
ext2dBox* addNew2dBox(odb::dbNet* net, int* ll, int* ur, uint m, bool cntx);
@@ -2707,7 +2705,6 @@ class extMain
27072705
uint _ccUp = 0;
27082706
uint _couplingFlag = 0;
27092707
bool _rotatedGs = false;
2710-
// uint _ccContextDepth = 0;
27112708
int _ccMinX;
27122709
int _ccMinY;
27132710
int _ccMaxX;
@@ -2798,95 +2795,14 @@ class extMain
27982795

27992796
int _noVariationIndex;
28002797

2801-
bool _ignoreWarning_1st;
2802-
bool _keepExtModel;
2803-
28042798
friend class extMeasure;
28052799

2806-
FILE* _blkInfoVDD = nullptr;
2807-
FILE* _viaInfoVDD = nullptr;
2808-
FILE* _blkInfoGND = nullptr;
2809-
FILE* _viaInfoGND = nullptr;
2810-
2811-
FILE* _stdCirVDD = nullptr;
2812-
FILE* _globCirVDD = nullptr;
2813-
FILE* _globGeomVDD = nullptr;
2814-
FILE* _stdCirGND = nullptr;
2815-
FILE* _globCirGND = nullptr;
2816-
2817-
FILE* _stdCirHeadVDD = nullptr;
2818-
FILE* _globCirHeadVDD = nullptr;
2819-
FILE* _globGeomGND = nullptr;
2820-
FILE* _stdCirHeadGND = nullptr;
2821-
FILE* _globCirHeadGND = nullptr;
2822-
FILE* _blkInfo = nullptr;
2823-
FILE* _viaInfo = nullptr;
2824-
FILE* _globCir = nullptr;
2825-
FILE* _globGeom = nullptr;
2826-
FILE* _stdCir = nullptr;
2827-
FILE* _globCirHead = nullptr;
2828-
FILE* _stdCirHead = nullptr;
2829-
FILE* _viaStackGlobCir = nullptr;
2830-
FILE* _viaStackGlobVDD = nullptr;
2831-
FILE* _viaStackGlobGND = nullptr;
2832-
2833-
odb::Ath__array1D<int>* _junct2viaMap = nullptr;
2834-
bool _dbgPowerFlow;
2835-
dbCreateNetUtil* _netUtil = nullptr;
2836-
2837-
std::vector<odb::dbBox*> _viaUp_VDDtable;
2838-
std::vector<odb::dbBox*> _viaUp_GNDtable;
2839-
std::vector<odb::dbBox*> _viaM1_GNDtable;
2840-
std::vector<odb::dbBox*> _viaM1_VDDtable;
2841-
std::vector<odb::dbBox*>* _viaM1Table = nullptr;
2842-
std::vector<odb::dbBox*>* _viaUpTable = nullptr;
2843-
2844-
uint _stackedViaResCnt;
2845-
uint _totViaResCnt;
2846-
odb::Ath__array1D<int>* _via2JunctionMap = nullptr;
2847-
std::map<odb::dbBox*, odb::dbNet*> _via_map;
2848-
std::map<uint, odb::dbNet*> _via_id_map;
2849-
std::map<uint, float> _capNode_map;
2850-
std::vector<odb::dbInst*> _powerMacroTable;
2851-
std::vector<odb::dbBox*> _viaUpperTable[2];
2852-
odb::Ath__array1D<char*>** _supplyViaMap[2]{nullptr, nullptr};
2853-
odb::Ath__array1D<odb::dbBox*>** _supplyViaTable[2]{nullptr, nullptr};
2854-
char* _power_source_file = nullptr;
2855-
std::vector<char*> _powerSourceTable[2];
2856-
FILE* _coordsFP = nullptr;
2857-
FILE* _coordsGND = nullptr;
2858-
FILE* _coordsVDD = nullptr;
2859-
std::vector<uint> _vddItermIdTable;
2860-
std::vector<uint> _gndItermIdTable;
2861-
FILE* _subCktNodeFP[2][2]{{nullptr, nullptr}, {nullptr, nullptr}};
2862-
uint _subCktNodeCnt[2][2];
2863-
bool _nodeCoords;
2864-
int _prevX;
2865-
int _prevY;
2866-
char _node_blk_dir[1024];
2867-
char _node_blk_prefix[1024];
2868-
char _node_inst_prefix[1024];
2869-
odb::Ath__array1D<odb::dbITerm*>* _junct2iterm = nullptr;
2870-
std::map<uint, odb::dbSBox*> _sbox_id_map;
2871-
2872-
uint _powerWireCnt;
2873-
uint _mergedPowerWireCnt;
2874-
uint _overlapPowerWireCnt;
2875-
uint _viaOverlapPowerCnt;
2876-
uint _multiViaCnt;
2877-
2878-
std::vector<odb::Rect*> _multiViaTable[20];
2879-
std::vector<odb::dbBox*> _multiViaBoxTable[20];
2880-
2881-
// v2 uint _debug_net_id = 0;
28822800
float _previous_percent_extracted = 0;
28832801

28842802
double _minCapTable[64][64];
28852803
double _maxCapTable[64][64];
28862804
double _minResTable[64][64];
28872805
double _maxResTable[64][64];
2888-
uint _rcLayerCnt;
2889-
uint _rcCornerCnt;
28902806

28912807
public:
28922808
bool _lef_res;

src/rcx/src/extRCmodel.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,22 +2618,6 @@ void extMeasure::printMets(FILE* fp)
26182618
}
26192619
}
26202620

2621-
void extMeasure::printStats(FILE* fp)
2622-
{
2623-
fprintf(fp,
2624-
"<==> w= %g[%g %g] s= %g[%g] th= %g[%g] h= %g[%g] r= %g",
2625-
_w_m,
2626-
_topWidth,
2627-
_botWidth,
2628-
_s_m,
2629-
_seff,
2630-
_t,
2631-
_teff,
2632-
_h,
2633-
_heff,
2634-
_r);
2635-
}
2636-
26372621
FILE* extRCModel::openFile(const char* topDir,
26382622
const char* name,
26392623
const char* suffix,
@@ -2787,16 +2771,6 @@ FILE* extRCModel::mkPatternFile()
27872771
return fp;
27882772
}
27892773

2790-
FILE* extRCModel::openSolverFile()
2791-
{
2792-
FILE* fp = openFile(_wireDirName, _wireFileName, ".out", "r");
2793-
if (fp != nullptr) {
2794-
_parser->setInputFP(fp);
2795-
}
2796-
2797-
return fp;
2798-
}
2799-
28002774
bool extRCModel::openCapLogFile()
28012775
{
28022776
if (!_readSolver && !_runSolver) {

src/rcx/src/parse.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ static char* ATH__allocCharWord(int n, utl::Logger* logger)
4949
Ath__parser::Ath__parser(utl::Logger* logger)
5050
{
5151
_logger = logger;
52-
_lineSize = 10000;
53-
_maxWordCnt = 100;
5452
init();
5553
}
5654

@@ -69,7 +67,6 @@ Ath__parser::~Ath__parser()
6967
}
7068
delete[] _inputFile;
7169
delete[] _line;
72-
delete[] _tmpLine;
7370
delete[] _wordSeparators;
7471

7572
for (int ii = 0; ii < _maxWordCnt; ii++) {
@@ -86,7 +83,6 @@ Ath__parser::~Ath__parser()
8683
void Ath__parser::init()
8784
{
8885
_line = ATH__allocCharWord(_lineSize, _logger);
89-
_tmpLine = ATH__allocCharWord(_lineSize, _logger);
9086

9187
_wordArray = new char*[_maxWordCnt];
9288

@@ -98,15 +94,11 @@ void Ath__parser::init()
9894

9995
strcpy(_wordSeparators, " \n\t");
10096

101-
_commentChar = '#';
102-
10397
_lineNum = 0;
10498
_currentWordCnt = -1;
10599

106100
_inFP = nullptr;
107101
_inputFile = ATH__allocCharWord(512, _logger);
108-
109-
_progressLineChunk = 1000000;
110102
}
111103

112104
int Ath__parser::getLineNum()

src/rcx/src/parse.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,18 @@ class Ath__parser
5656
char* _tmpLine;
5757
char* _wordSeparators;
5858
char** _wordArray;
59-
char _commentChar;
60-
int _maxWordCnt;
6159

6260
int _lineNum;
6361
int _currentWordCnt;
64-
int _lineSize;
6562
FILE* _inFP;
6663
char* _inputFile;
6764

68-
int _progressLineChunk;
6965
utl::Logger* _logger;
66+
67+
static constexpr int _progressLineChunk = 1000000;
68+
static constexpr char _commentChar = '#';
69+
static constexpr int _maxWordCnt = 100;
70+
static constexpr int _lineSize = 10000;
7071
};
7172

7273
} // namespace rcx

0 commit comments

Comments
 (0)