Commit fec93bd3 by Yijun Tan

electric force bugged

parent 6c0b5d11
......@@ -2,3 +2,5 @@ images/*
.vscode/*
.build/*
.data/*
test.cpp
a.exe
\ No newline at end of file
No preview for this file type
......@@ -1274,7 +1274,7 @@ Pin P60 4298 0
LibCell N MC221 50 33 1
Pin P1 25 16
DieSize 0 0 23000 19000
DieSize 0 0 23000 38000
TopDieMaxUtil 80
BottomDieMaxUtil 80
This source diff could not be displayed because it is too large. You can view the blob instead.
NumTechnologies 2
Tech TA 3
LibCell N MC1 7 10 1
LibCell N MC1 400 300 1
Pin P1 2 7
LibCell N MC2 14 10 2
Pin P1 10 4
......@@ -20,7 +20,7 @@ Pin P1 2 12
Pin P2 3 3
Pin P3 15 7
DieSize 0 0 40 60
DieSize 0 0 800 600
TopDieMaxUtil 80
BottomDieMaxUtil 90
......@@ -35,35 +35,7 @@ TerminalSize 6 6
TerminalSpacing 5
TerminalCost 10
NumInstances 8
NumInstances 1
Inst C1 MC1
Inst C2 MC3
Inst C3 MC3
Inst C4 MC2
Inst C5 MC2
Inst C6 MC3
Inst C7 MC2
Inst C8 MC1
NumNets 6
Net N1 2
Pin C1/P1
Pin C2/P2
Net N2 3
Pin C2/P1
Pin C3/P1
Pin C7/P2
Net N3 2
Pin C2/P3
Pin C8/P1
Net N4 3
Pin C3/P3
Pin C6/P2
Pin C7/P1
Net N5 3
Pin C4/P2
Pin C6/P1
Pin C5/P1
Net N6 2
Pin C4/P1
Pin C5/P2
NumNets 0
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
float scale; //visualizer scale
public:
void init();
void init(int);
void makeCellList();
void setCellTechs();
void makeInstList();
......@@ -44,6 +44,7 @@ public:
//cimg
#if VISUAL
void draw(std::string, int Scale=1);
void plotDensity(cimg_library::CImg<unsigned char>&);
void plotCells(cimg_library::CImg<unsigned char>&);
void plotNets(cimg_library::CImg<unsigned char>&);
void drawLine(cimg_library::CImg<unsigned char>&, const int, const int, const int, const int, const unsigned int, const unsigned char[]);
......
......@@ -13,7 +13,7 @@ int main() {
std::string picname;
circuit->init();
circuit->init(0);
picname = "initial.bmp";
circuit->draw(picname);
......@@ -24,11 +24,11 @@ int main() {
std::cout << "Electric potential apply." << std::endl;
for (int i = 0; i < 30; ++i) {
for (int i = 0; i < 1; ++i) {
circuit->Iteration(i);
std::cout << "HPWL:" << circuit->calHPWL() << std::endl;
if (i % 1 == 0) {
if ((i+1) % 1 == 0) {
picname = "iter" + std::to_string(i) + ".bmp";
circuit->draw(picname);
......
......@@ -29,7 +29,7 @@ void Database::readcase(std::string inputfilename)
//ss >> techs[i][cell_name].w;
//ss >> techs[i][cell_name].h;
std::cout << cell_name << " " << techs[i][j+1].is_macro << " " << techs[i][j+1].area << std::endl;
//std::cout << cell_name << " " << techs[i][j+1].is_macro << " " << techs[i][j+1].area << std::endl;
int pin_num;
ss >> pin_num;
......
......@@ -61,7 +61,7 @@ void fftBin::doFFT() {
float wwy2 = wy_sq[j];
float density = electricDensity[i][j];
float phi = 000;
float phi = 0;
float electroX = 0, electroY = 0;
if (i == 0 && j == 0) {
phi = electroX = electroY = 0.0f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment