Fixing bugs

This commit is contained in:
Matthias Koefferlein 2026-06-25 23:10:02 +02:00
parent 50e0923ff6
commit 17bb54675b
2 changed files with 9 additions and 11 deletions

View File

@ -302,17 +302,6 @@ void LayoutToNetlist::extract_devices (db::NetlistDeviceExtractor &extractor, co
}
}
if (! extractor.device_class ()) {
db::DeviceClass *ddc = extractor.default_device_class ();
if (ddc) {
extractor.register_device_class (ddc);
}
}
if (! extractor.device_class ()) {
throw tl::Exception (tl::to_string (tr ("No device class registered for device extractor '%s' - cannot extract devices.")), extractor.name ());
}
extractor.extract (dss (), m_layout_index, layers, m_net_clusters, m_device_scaling);
// transfer errors to log entries

View File

@ -94,6 +94,15 @@ static void insert_into_region (const db::NetShape &s, const db::ICplxTrans &tr,
void NetlistDeviceExtractor::extract (db::DeepShapeStore &dss, unsigned int layout_index, const NetlistDeviceExtractor::input_layers &layer_map, hier_clusters_type &clusters, double device_scaling)
{
// If no device class is registered, use the default device class
if (! device_class ()) {
db::DeviceClass *ddc = default_device_class ();
if (! ddc) {
throw tl::Exception (tl::to_string (tr ("No device class registered for device extractor '%s' - cannot extract devices.")), name ());
}
register_device_class (ddc);
}
std::vector<unsigned int> layers;
layers.reserve (m_layer_definitions.size ());