Skip to content

Commit

Permalink
Fixed AREF vertical and horizontal steps
Browse files Browse the repository at this point in the history
  • Loading branch information
lanserge authored and jpc-lip6 committed Feb 9, 2024
1 parent 3e421b2 commit 1388da8
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions crlcore/src/ccore/gds/GdsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,8 +1350,7 @@ namespace {
string masterName;
uint16_t columns = 0;
uint16_t rows = 0;
DbU::Unit dx = 0;
DbU::Unit dy = 0;
Point vx, vy;
Point origin;
Transformation::Orientation orient = Transformation::Orientation::ID;

Expand Down Expand Up @@ -1434,17 +1433,20 @@ namespace {
else {
cdebug_log(101,0) << "arrayOrigin: " << origin << endl;
}
Transformation arrayTransf ( 0, 0, orient );
dx = arrayTransf.getX(coordinates[2] * _scale - origin.getX(),
coordinates[3] * _scale - origin.getY()) / columns;
dy = arrayTransf.getY(coordinates[4] * _scale - origin.getX(),
coordinates[5] * _scale - origin.getY()) / rows;
cdebug_log(101,0) << "dx=" << DbU::getValueString(dx) << endl;
cdebug_log(101,0) << "dy=" << DbU::getValueString(dy) << endl;
if (not dx and (columns > 1))
vx.setX((coordinates[2] * _scale - origin.getX()) / columns);
vx.setY((coordinates[3] * _scale - origin.getY()) / columns);
vy.setX((coordinates[4] * _scale - origin.getX()) / rows);
vy.setY((coordinates[5] * _scale - origin.getY()) / rows);
cdebug_log(101,0) << "vx=("
<< DbU::getValueString(vx.getX())
<< DbU::getValueString(vx.getY()) << ")" << endl;
cdebug_log(101,0) << "vy=("
<< DbU::getValueString(vy.getX())
<< DbU::getValueString(vy.getY()) << ")" << endl;
if (not vx.getX() and not vx.getY() and (columns > 1))
cerr << Error( "GdsStream::readAref(): Null dx, but more than one column (%d)."
, columns ) << endl;
if (not dy and (rows > 1))
if (not vy.getX() and not vy.getY() and (rows > 1))
cerr << Error( "GdsStream::readAref(): Null dy, but more than one row (%d)."
, rows ) << endl;
}
Expand All @@ -1458,8 +1460,8 @@ namespace {
if (_cell) {
for ( uint32_t column=0 ; column < (uint32_t)columns ; ++column ) {
for ( uint32_t row=0 ; row < (uint32_t)rows ; ++row ) {
DbU::Unit xpos = origin.getX() + column*dx;
DbU::Unit ypos = origin.getY() + row *dy;
DbU::Unit xpos = origin.getX() + column*vx.getX() + row*vy.getX();
DbU::Unit ypos = origin.getY() + column*vx.getY() + row*vy.getY();
Transformation itemTransf = Transformation( xpos, ypos, orient );

cdebug_log(101,0) << "column=" << column
Expand Down

0 comments on commit 1388da8

Please sign in to comment.