Activated DeviceAbstract for GSI.

This commit is contained in:
Matthias Koefferlein 2019-01-25 22:40:41 +01:00
parent 29264013b0
commit 4712ee0f29
2 changed files with 14 additions and 3 deletions

View File

@ -65,6 +65,10 @@ Class<db::Device> decl_dbDevice ("db", "Device",
gsi::method ("device_class", &db::Device::device_class,
"@brief Gets the device class the device belongs to.\n"
) +
gsi::method ("device_abstract", &db::Device::device_abstract,
"@brief Gets the device abstract for this device instance.\n"
"See \\DeviceAbstract for more details.\n"
) +
gsi::method ("circuit", (db::Circuit *(db::Device::*) ()) &db::Device::circuit,
"@brief Gets the circuit the device lives in."
) +
@ -134,12 +138,13 @@ Class<db::Device> decl_dbDevice ("db", "Device",
"This class has been added in version 0.26."
);
#if 0
// TODO: activate once the geometry API is opened (clusters at al.)
Class<db::DeviceAbstract> decl_dbDeviceAbstract ("db", "DeviceAbstract",
gsi::method ("netlist", (db::Netlist *(db::DeviceAbstract::*) ()) &db::DeviceAbstract::netlist,
"@brief Gets the netlist the device abstract lives in."
) +
gsi::method ("device_class", &db::DeviceAbstract::device_class,
"@brief Gets the device class of the device."
) +
gsi::method ("name=", &db::DeviceAbstract::set_name, gsi::arg ("name"),
"@brief Sets the name of the device abstract.\n"
"Device names are used to name a device abstract inside a netlist file. "
@ -162,7 +167,6 @@ Class<db::DeviceAbstract> decl_dbDeviceAbstract ("db", "DeviceAbstract",
"\n"
"This class has been added in version 0.26."
);
#endif
static void subcircuit_connect_pin1 (db::SubCircuit *subcircuit, const db::Pin *pin, db::Net *net)
{

View File

@ -778,6 +778,13 @@ class DBRegion_TestClass < TestBase
dss = RBA::DeepShapeStore::new
dss._create
assert_equal(RBA::DeepShapeStore::instance_count, 1)
# do a little testing on the DSS:
dss.max_vertex_count = 8
assert_equal(dss.max_vertex_count, 8)
dss.max_area_ratio = 42.0
assert_equal(dss.max_area_ratio, 42.0)
dss.threads = 3
assert_equal(dss.threads, 3)
dss = nil
GC.start
assert_equal(RBA::DeepShapeStore::instance_count, 0)