mirror of https://github.com/KLayout/klayout.git
Merge pull request #518 from KLayout/issue-517
Fixed #517 (VIARULE issue in DEF reader)
This commit is contained in:
commit
91226230aa
|
|
@ -656,38 +656,44 @@ LEFDEFImporter::create_generated_via (std::vector<db::Polygon> &bottom,
|
||||||
top.push_back (db::Polygon (via_box.enlarged (te).moved (to)));
|
top.push_back (db::Polygon (via_box.enlarged (te).moved (to)));
|
||||||
|
|
||||||
const char *p = pattern.c_str ();
|
const char *p = pattern.c_str ();
|
||||||
int rp = 0;
|
int rp = pattern.empty () ? -1 : 0;
|
||||||
const char *p0 = p, *p1 = p;
|
const char *p0 = p, *p1 = p;
|
||||||
|
|
||||||
for (int r = 0; r < rows; ++r) {
|
for (int r = 0; r < rows; ++r) {
|
||||||
|
|
||||||
if (rp == 0 && *p) {
|
if (rp == 0) {
|
||||||
|
|
||||||
// read a new row specification
|
|
||||||
rp = 0;
|
|
||||||
while (*p && is_hex_digit (*p)) {
|
|
||||||
rp = (rp * 16) + hex_value (*p++);
|
|
||||||
}
|
|
||||||
if (*p == '_') {
|
|
||||||
++p;
|
|
||||||
}
|
|
||||||
|
|
||||||
p0 = p;
|
|
||||||
if (*p) {
|
if (*p) {
|
||||||
while (*p && (is_hex_digit (*p) || toupper (*p) == 'R')) {
|
|
||||||
|
// read a new row specification
|
||||||
|
rp = 0;
|
||||||
|
while (*p && is_hex_digit (*p)) {
|
||||||
|
rp = (rp * 16) + hex_value (*p++);
|
||||||
|
}
|
||||||
|
if (*p == '_') {
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
p1 = p;
|
p0 = p;
|
||||||
if (*p == '_') {
|
if (*p) {
|
||||||
++p;
|
while (*p && (is_hex_digit (*p) || toupper (*p) == 'R')) {
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p1 = p;
|
||||||
|
if (*p == '_') {
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rp > 0) {
|
if (rp != 0) {
|
||||||
|
|
||||||
--rp;
|
if (rp > 0) {
|
||||||
|
--rp;
|
||||||
|
}
|
||||||
|
|
||||||
const char *pp = p0;
|
const char *pp = p0;
|
||||||
unsigned int d = 0;
|
unsigned int d = 0;
|
||||||
|
|
|
||||||
|
|
@ -260,3 +260,8 @@ TEST(22)
|
||||||
run_test (_this, "issue-489b", "lef:in_tech.lef+lef:in.lef", "au.oas.gz", opt, false);
|
run_test (_this, "issue-489b", "lef:in_tech.lef+lef:in.lef", "au.oas.gz", opt, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(23)
|
||||||
|
{
|
||||||
|
run_test (_this, "issue-517", "def:in.def", "au.oas.gz", default_options (), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
VERSION 5.6 ;
|
||||||
|
NAMESCASESENSITIVE ON ;
|
||||||
|
DIVIDERCHAR "/" ;
|
||||||
|
BUSBITCHARS "<>" ;
|
||||||
|
DESIGN SMALL ;
|
||||||
|
UNITS DISTANCE MICRONS 100 ;
|
||||||
|
|
||||||
|
DIEAREA ( -30 -30 ) ( 1030 1030 ) ;
|
||||||
|
|
||||||
|
VIAS 1 ;
|
||||||
|
- via1_960x340
|
||||||
|
+ VIARULE Via1Array-0
|
||||||
|
+ CUTSIZE 140 140
|
||||||
|
+ LAYERS metal1 via1 metal2
|
||||||
|
+ CUTSPACING 160 160
|
||||||
|
+ ENCLOSURE 110 100 110 100
|
||||||
|
+ ROWCOL 1 3
|
||||||
|
;
|
||||||
|
END VIAS
|
||||||
|
|
||||||
|
SPECIALNETS 1 ;
|
||||||
|
- VDD ( * VDD )
|
||||||
|
+ ROUTED metal1 0 + SHAPE STRIPE ( 500 500 ) via1_960x340
|
||||||
|
+ USE POWER ;
|
||||||
|
END SPECIALNETS
|
||||||
|
|
||||||
|
END DESIGN
|
||||||
|
|
||||||
Loading…
Reference in New Issue