mirror of https://github.com/KLayout/klayout.git
Fixed part of issue #1307: using pin names for the pin labels in DEF importer, generating pin names on pin name property + generating net names on net name property for pin shapes.
This commit is contained in:
parent
ae3c8c27f6
commit
44901f8885
|
|
@ -1153,8 +1153,7 @@ DEFImporter::read_pins (db::Layout &layout, db::Cell &design, double scale)
|
|||
{
|
||||
while (test ("-")) {
|
||||
|
||||
take (); // pin name
|
||||
|
||||
std::string pin_name = get ();
|
||||
std::string net;
|
||||
std::string dir;
|
||||
std::map <std::pair<std::string, unsigned int>, std::vector <db::Polygon> > geometry;
|
||||
|
|
@ -1281,7 +1280,7 @@ DEFImporter::read_pins (db::Layout &layout, db::Cell &design, double scale)
|
|||
if (flush || ! peek ("+")) {
|
||||
|
||||
// TODO: put a label on every single object?
|
||||
std::string label = net;
|
||||
std::string label = pin_name;
|
||||
/* don't add the direction currently, a name is sufficient
|
||||
if (! dir.empty ()) {
|
||||
label += ":";
|
||||
|
|
@ -1296,9 +1295,14 @@ DEFImporter::read_pins (db::Layout &layout, db::Cell &design, double scale)
|
|||
if (! dl.empty ()) {
|
||||
|
||||
db::properties_id_type prop_id = 0;
|
||||
if (produce_pin_props ()) {
|
||||
if (produce_pin_props () || produce_net_props ()) {
|
||||
db::PropertiesRepository::properties_set props;
|
||||
props.insert (std::make_pair (pin_prop_name_id (), tl::Variant (label)));
|
||||
if (produce_pin_props ()) {
|
||||
props.insert (std::make_pair (pin_prop_name_id (), tl::Variant (label)));
|
||||
}
|
||||
if (produce_net_props ()) {
|
||||
props.insert (std::make_pair (net_prop_name_id (), tl::Variant (net)));
|
||||
}
|
||||
prop_id = layout.properties_repository ().properties_id (props);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -882,6 +882,15 @@ TEST(131_patternname)
|
|||
run_test (_this, "patternname", "map:v.map+lef:v.lef+def:v.def", "au.oas.gz", default_options (), false);
|
||||
}
|
||||
|
||||
TEST(132_issue1307_pin_names)
|
||||
{
|
||||
db::LEFDEFReaderOptions opt = default_options ();
|
||||
opt.set_produce_pin_names (true);
|
||||
opt.set_pin_property_name (2);
|
||||
opt.set_cell_outline_layer ("OUTLINE (13/0)");
|
||||
run_test (_this, "issue-1307c", "lef:in.lef+def:in.def", "au.oas", opt, false);
|
||||
}
|
||||
|
||||
TEST(200_lefdef_plugin)
|
||||
{
|
||||
db::Layout ly;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,34 @@
|
|||
VERSION 5.7 ;
|
||||
DIVIDERCHAR "/" ;
|
||||
BUSBITCHARS "[]" ;
|
||||
DESIGN test ;
|
||||
UNITS DISTANCE MICRONS 2000 ;
|
||||
|
||||
DIEAREA ( 0 0 ) ( 37520 7840 ) ;
|
||||
|
||||
PINS 12 ;
|
||||
- VDD_PIN + NET VDD + SPECIAL + DIRECTION INOUT + USE POWER
|
||||
+ LAYER M2 ( -320 0 ) ( 320 37520 )
|
||||
+ FIXED ( 37520 3920 ) W ;
|
||||
- VSS_PIN + NET VSS + SPECIAL + DIRECTION INOUT + USE GROUND
|
||||
+ PORT
|
||||
+ LAYER M2 ( -18760 0 ) ( 18760 640 )
|
||||
+ FIXED ( 18760 -320 ) N
|
||||
+ PORT
|
||||
+ LAYER M2 ( -18760 0 ) ( 18760 640 )
|
||||
+ FIXED ( 18760 8160 ) S
|
||||
;
|
||||
END PINS
|
||||
|
||||
SPECIALNETS 4 ;
|
||||
- VSS ( * VSS )
|
||||
+ ROUTED M2 640 + SHAPE FOLLOWPIN ( 0 0 ) ( 37520 * )
|
||||
NEW M2 640 + SHAPE FOLLOWPIN ( 0 7840 ) ( 37520 * )
|
||||
+ USE GROUND
|
||||
;
|
||||
- VDD ( * VDD )
|
||||
+ ROUTED M2 640 + SHAPE FOLLOWPIN ( 0 3920 ) ( 37520 * )
|
||||
+ USE POWER
|
||||
;
|
||||
END SPECIALNETS
|
||||
END DESIGN
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
VERSION 5.7 ;
|
||||
|
||||
BUSBITCHARS "[]" ;
|
||||
DIVIDERCHAR "/" ;
|
||||
UNITS
|
||||
DATABASE MICRONS 1000 ;
|
||||
END UNITS
|
||||
|
||||
MANUFACTURINGGRID 0.002 ;
|
||||
|
||||
USEMINSPACING OBS OFF ;
|
||||
|
||||
LAYER overlap
|
||||
TYPE OVERLAP ;
|
||||
END overlap
|
||||
|
||||
LAYER contact
|
||||
TYPE CUT ;
|
||||
END contact
|
||||
|
||||
LAYER metal1
|
||||
TYPE ROUTING ;
|
||||
DIRECTION HORIZONTAL ;
|
||||
END metal1
|
||||
|
||||
LAYER via1
|
||||
TYPE CUT ;
|
||||
END via1
|
||||
|
||||
LAYER metal2
|
||||
TYPE ROUTING ;
|
||||
DIRECTION VERTICAL ;
|
||||
END metal2
|
||||
|
||||
LAYER via2
|
||||
TYPE CUT ;
|
||||
END via2
|
||||
|
||||
LAYER metal3
|
||||
TYPE ROUTING ;
|
||||
DIRECTION HORIZONTAL ;
|
||||
END metal3
|
||||
|
||||
LAYER via3
|
||||
TYPE CUT ;
|
||||
END via3
|
||||
|
||||
LAYER metal4
|
||||
TYPE ROUTING ;
|
||||
DIRECTION VERTICAL ;
|
||||
END metal4
|
||||
|
||||
LAYER via4
|
||||
TYPE CUT ;
|
||||
END via4
|
||||
|
||||
LAYER metal5
|
||||
TYPE ROUTING ;
|
||||
DIRECTION HORIZONTAL ;
|
||||
END metal5
|
||||
|
||||
|
||||
END LIBRARY
|
||||
Loading…
Reference in New Issue