#include <netlist.h>
Collaboration diagram for NetType:
Public Member Functions | |
NetType (const vector< PinType > &newPins, const vector< PadType > &newPads) | |
NetType (const NetType &newNet) | |
void | operator= (const NetType &newNet) |
double | getHPWL (const OrientedPacking &pk) const |
Public Attributes | |
const vector< PinType > & | pins |
const vector< PadType > & | pads |
Private Member Functions | |
void | getOffsets (double orig_x_offset, double orig_y_offset, OrientedPacking::ORIENT orient, double &x_offset, double &y_offset) const |
Private Attributes | |
vector< PinType > | in_pins |
vector< PadType > | in_pads |
|
Definition at line 50 of file netlist.h. References in_pads, in_pins, pads, and pins.
|
|
Definition at line 182 of file netlist.h. References in_pads, and in_pins.
|
|
Definition at line 48 of file netlist.cxx. References getOffsets(), BasePacking::height, in_pads, in_pins, OrientedPacking::orient, OrientedPacking::ORIENT, BasePacking::width, BasePacking::xloc, and BasePacking::yloc.
00049 { 00050 double minX = Dimension::INFTY; 00051 double maxX = -1 * Dimension::INFTY; 00052 double minY = Dimension::INFTY; 00053 double maxY = -1 * Dimension::INFTY; 00054 00055 for (unsigned int i = 0; i < in_pads.size(); i++) 00056 { 00057 double xloc = in_pads[i].xloc; 00058 double yloc = in_pads[i].yloc; 00059 00060 minX = min(minX, xloc); 00061 maxX = max(maxX, xloc); 00062 minY = min(minY, yloc); 00063 maxY = max(maxY, yloc); 00064 // printf("PAD [%d]: %lf, %lf\n", i, xloc, yloc); 00065 } 00066 00067 for (unsigned int i = 0; i < in_pins.size(); i++) 00068 { 00069 double orig_x_offset = in_pins[i].x_offset; 00070 double orig_y_offset = in_pins[i].y_offset; 00071 00072 int blk_index = in_pins[i].block; 00073 OrientedPacking::ORIENT blk_orient = pk.orient[blk_index]; 00074 00075 double x_length = (blk_orient % 2 == 0)? 00076 pk.width[blk_index] : pk.height[blk_index]; 00077 double y_length = (blk_orient % 2 == 0)? 00078 pk.height[blk_index] : pk.width[blk_index]; 00079 00080 double x_offset = -1; 00081 double y_offset = -1; 00082 getOffsets(orig_x_offset, orig_y_offset, blk_orient, 00083 x_offset, y_offset); 00084 00085 double xloc = pk.xloc[blk_index] + (x_length / 2) + x_offset; 00086 double yloc = pk.yloc[blk_index] + (y_length / 2) + y_offset; 00087 00088 minX = min(minX, xloc); 00089 maxX = max(maxX, xloc); 00090 minY = min(minY, yloc); 00091 maxY = max(maxY, yloc); 00092 // printf("PIN [%d]: %lf (%lf-%lf), %lf(%lf-%lf)\n", 00093 // i, xloc, pk.xloc[blk_index], pk.xloc[blk_index]+x_length, 00094 // yloc, pk.yloc[blk_index], pk.yloc[blk_index]+y_length); 00095 } 00096 // printf("x-span: %lf - %lf\n", minX, maxX); 00097 // printf("y-span: %lf - %lf\n", minY, maxY); 00098 // printf("HPWL: %lf ", (maxX-minX) + (maxY-minY)); 00099 return ((maxX - minX) + (maxY - minY)); 00100 } |
Here is the call graph for this function:
|
Definition at line 196 of file netlist.h. References OrientedPacking::E, OrientedPacking::FE, OrientedPacking::FN, OrientedPacking::FS, OrientedPacking::FW, OrientedPacking::N, OrientedPacking::S, OrientedPacking::UNDEFINED, and OrientedPacking::W. Referenced by getHPWL().
00201 { 00202 switch (blk_orient) 00203 { 00204 case OrientedPacking::N: 00205 x_offset = orig_x_offset; 00206 y_offset = orig_y_offset; 00207 break; 00208 00209 case OrientedPacking::E: 00210 x_offset = orig_y_offset; 00211 y_offset = -1 * orig_x_offset; 00212 break; 00213 00214 case OrientedPacking::S: 00215 x_offset = -1 * orig_x_offset; 00216 y_offset = -1 * orig_y_offset; 00217 break; 00218 00219 case OrientedPacking::W: 00220 x_offset = -1 * orig_y_offset; 00221 y_offset = orig_x_offset; 00222 break; 00223 00224 case OrientedPacking::FN: 00225 x_offset = -1 * orig_x_offset; 00226 y_offset = orig_y_offset; 00227 break; 00228 00229 case OrientedPacking::FE: 00230 x_offset = orig_y_offset; 00231 y_offset = orig_x_offset; 00232 break; 00233 00234 case OrientedPacking::FS: 00235 x_offset = orig_x_offset; 00236 y_offset = -1 * orig_y_offset; 00237 break; 00238 00239 case OrientedPacking::FW: 00240 x_offset = -1 * orig_y_offset; 00241 y_offset = -1 * orig_x_offset; 00242 break; 00243 00244 case OrientedPacking::UNDEFINED: 00245 cout << "ERROR: the orientation for this block is undefined." 00246 << endl; 00247 exit(1); 00248 break; 00249 00250 default: 00251 cout << "ERROR in specified orientation." << endl; 00252 exit(1); 00253 break; 00254 } 00255 } |
|
Definition at line 190 of file netlist.h. References in_pads, and in_pins.
|
|
Definition at line 82 of file netlist.h. Referenced by getHPWL(), NetType(), and operator=(). |
|
Definition at line 81 of file netlist.h. Referenced by getHPWL(), NetType(), and operator=(). |
|
Definition at line 61 of file netlist.h. Referenced by NetType(). |
|
Definition at line 60 of file netlist.h. Referenced by NetType(). |