From 393ef1811f8c3854294b59f125d3dbfe4c1b8556 Mon Sep 17 00:00:00 2001 From: hagantsa Date: Wed, 7 Feb 2024 15:15:27 +0200 Subject: [PATCH 1/2] [CORRECTIVE] Fix modelsim generator crash when changing output dir (generating from design). --- .../ModelSimWriterFactory/ModelSimWriterFactory.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Plugins/ModelSimGenerator/ModelSimWriterFactory/ModelSimWriterFactory.cpp b/Plugins/ModelSimGenerator/ModelSimWriterFactory/ModelSimWriterFactory.cpp index 1cab001bf..dceca3355 100644 --- a/Plugins/ModelSimGenerator/ModelSimWriterFactory/ModelSimWriterFactory.cpp +++ b/Plugins/ModelSimGenerator/ModelSimWriterFactory/ModelSimWriterFactory.cpp @@ -52,7 +52,7 @@ QList > ModelSimWriterFactory::prepareDesign(QL QList > components; - foreach (QSharedPointer mDesign, designs) + for (QSharedPointer mDesign : designs) { components.append(mDesign->getTopInstance()); components.append(mDesign->getInstances()->values()); @@ -63,14 +63,15 @@ QList > ModelSimWriterFactory::prepareDesign(QL document->writer_ = writer; document->fileName_ = designs.first()->getTopInstance()->getModuleName() + ".do"; document->vlnv_ = designs.first()->getTopInstance()->getComponent()->getVlnv().toString(); + document->metaDesign_ = designs.first(); - foreach (QSharedPointer mComponent, components) + for (QSharedPointer mComponent : components) { QString basePath = library_->getPath(mComponent->getComponent()->getVlnv()); - foreach (QSharedPointer fileSet, *mComponent->getFileSets()) + for (QSharedPointer fileSet : *mComponent->getFileSets()) { - foreach (QSharedPointer file, *fileSet->getFiles()) + for (QSharedPointer file : *fileSet->getFiles()) { // Fetch the absolute path to the file QString absolutePath = General::getAbsolutePath(basePath, file->name()); From a924550384fe1c6afec694ef8617081fd4ac47f0 Mon Sep 17 00:00:00 2001 From: hagantsa Date: Fri, 9 Feb 2024 15:10:18 +0200 Subject: [PATCH 2/2] [CORRECTIVE] Fix crash when adding generated files to file set of component with no component instantiation in selected view. Fixes generators using generation control. --- .../GeneratorPlugin/GenerationControl.cpp | 12 +++++------- version.h | 14 +++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Plugins/PluginSystem/GeneratorPlugin/GenerationControl.cpp b/Plugins/PluginSystem/GeneratorPlugin/GenerationControl.cpp index 634fcc45c..ebe8eeaca 100644 --- a/Plugins/PluginSystem/GeneratorPlugin/GenerationControl.cpp +++ b/Plugins/PluginSystem/GeneratorPlugin/GenerationControl.cpp @@ -91,9 +91,7 @@ bool GenerationControl::writeDocuments() } // If instantiation exists, make sure that the instantiation refers to the file set. - QStringList fileSetRefs = instantiation->getFileSetReferenceStrings(); - - if (instantiation && !fileSetRefs.contains(fileSet->name())) + if (instantiation && instantiation->getFileSetReferenceStrings().contains(fileSet->name())) { QSharedPointer newFileSetRef(new FileSetRef()); newFileSetRef->setReference(fileSet->name()); @@ -106,7 +104,7 @@ bool GenerationControl::writeDocuments() bool fails = false; // Go through each potential file. - foreach(QSharedPointer output, *outputControl_->getOutputs()) + for (QSharedPointer output : *outputControl_->getOutputs()) { // Form the path from the determined output path plus determined file name. QString absFilePath = outputControl_->getOutputPath() + "/" + output->fileName_; @@ -235,7 +233,7 @@ void GenerationControl::initializeDocuments() QList > documents = factory_->prepareDesign(designs); // Go through the parsed designs. - foreach(QSharedPointer output, documents) + for (QSharedPointer output : documents) { if (!output) { @@ -421,7 +419,7 @@ QSharedPointer > > GenerationControl::findPossibleVie } // Go through each view of the containing component and pick the eligible ones. - foreach(QSharedPointer view, *input.component->getViews()) + for (QSharedPointer view : *input.component->getViews()) { // Find the design instantiation of the view. QSharedPointer dis = input.component->getModel()-> @@ -469,7 +467,7 @@ QSharedPointer > > GenerationControl::findPossibleVie (new QList >); // In practice, go through each view, and if it is not hierarchical, append to the list. - foreach (QSharedPointer view, *targetComponent->getViews()) + for (QSharedPointer view : *targetComponent->getViews()) { if (!view->isHierarchical()) { diff --git a/version.h b/version.h index e10f9a724..5cac1ccfc 100644 --- a/version.h +++ b/version.h @@ -10,20 +10,20 @@ #ifndef VERSIONNO__H #define VERSIONNO__H -#define VERSION_FULL 3.13.124.0 +#define VERSION_FULL 3.13.125.0 #define VERSION_BASEYEAR 0 #define VERSION_DATE "2024-02-09" -#define VERSION_TIME "10:18:27" +#define VERSION_TIME "13:11:58" #define VERSION_MAJOR 3 #define VERSION_MINOR 13 -#define VERSION_BUILDNO 124 +#define VERSION_BUILDNO 125 #define VERSION_EXTEND 0 -#define VERSION_FILE 3,13,124,0 -#define VERSION_PRODUCT 3,13,124,0 -#define VERSION_FILESTR "3,13,124,0" -#define VERSION_PRODUCTSTR "3,13,124,0" +#define VERSION_FILE 3,13,125,0 +#define VERSION_PRODUCT 3,13,125,0 +#define VERSION_FILESTR "3,13,125,0" +#define VERSION_PRODUCTSTR "3,13,125,0" #endif