From: stephane Domas Date: Wed, 24 Jan 2018 17:18:27 +0000 (+0100) Subject: correct bug with clkrstgen X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/commitdiff_plain/eb12792fe5344f4d128b8aba2a7948aa13f6a1ae?ds=sidebyside correct bug with clkrstgen --- diff --git a/Dispatcher.cpp b/Dispatcher.cpp index a9beb48..638c991 100644 --- a/Dispatcher.cpp +++ b/Dispatcher.cpp @@ -559,7 +559,7 @@ GroupWidget *Dispatcher::createTopScene(){ GroupBlock *topBlock = graph->getTopGroup(); // creating the clkrstgen block ReferenceBlock* ref = params->getHiddenReferenceBlock("clkrstgen"); - FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(topBlock, ref); + FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(topBlock, ref); ConnectedInterface* fromIface = AI_TO_CON(topBlock->getIfaceFromName("ext_clk")); ConnectedInterface* toIface = AI_TO_CON(newOne->getIfaceFromName("ext_clk")); fromIface->connectTo(toIface); diff --git a/GroupBlock.cpp b/GroupBlock.cpp index 422cf97..6950b30 100644 --- a/GroupBlock.cpp +++ b/GroupBlock.cpp @@ -10,25 +10,40 @@ int GroupBlock::counter = 1; GroupBlock::GroupBlock(GroupBlock *_parent) throw(Exception) : AbstractBlock() { + GroupInterface* clk = NULL; + GroupInterface* rst = NULL; + // force topGroup to false if this group has a parent if (_parent != NULL) { topGroup = false; name = QString("sub_group")+"_"+QString::number(counter++); + // creating clk/rst interfaces + clk = new GroupInterface(this,"clk", AbstractInterface::Input, AbstractInterface::Clock); + rst = new GroupInterface(this,"reset", AbstractInterface::Input, AbstractInterface::Reset); + addInterface(clk); + addInterface(rst); } else { topGroup = true; name = QString("top_group"); // creating external clk/rst interfaces - GroupInterface* clk = new GroupInterface(this,"ext_clk", AbstractInterface::Input, AbstractInterface::Clock); - GroupInterface* rst = new GroupInterface(this,"ext_reset", AbstractInterface::Input, AbstractInterface::Reset); + clk = new GroupInterface(this,"ext_clk", AbstractInterface::Input, AbstractInterface::Clock); + rst = new GroupInterface(this,"ext_reset", AbstractInterface::Input, AbstractInterface::Reset); addInterface(clk); addInterface(rst); // creating clkrstgen block : done in Dispatcher since this has no access to library } parent = _parent; - if (parent != NULL) { - // adding this to the child blocks of parent - AB_TO_GRP(parent)->addBlock(this); + if (_parent != NULL) { + // adding this to the child blocks of parent + _parent->addBlock(this); + // connect clk/rst ifaces to parent clk/rst or to clkrstgen if parent is top group + if (_parent->isTop()) { + + } + else { + + } } } diff --git a/blast.creator.user b/blast.creator.user index 709b7ca..76fb271 100755 --- a/blast.creator.user +++ b/blast.creator.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c8006d66-d34f-42be-ad10-d0207752286d} + {3701e197-5b6c-48ea-9e98-a6cf6de18672} ProjectExplorer.Project.ActiveTarget @@ -19,7 +19,7 @@ Cpp - CppGlobal + qt2 @@ -31,7 +31,7 @@ 2 UTF-8 false - 4 + 2 false 80 true @@ -43,12 +43,12 @@ true true 0 - 8 - true + 4 + false 1 true true - true + false false @@ -61,7 +61,7 @@ Desktop Desktop - {2c9bf876-3476-44eb-8065-1f0844704dda} + {ed04208c-8774-456b-99b9-4a02094ca7a4} 0 0 0 @@ -128,7 +128,7 @@ false false - 1000 + 0 true @@ -169,8 +169,9 @@ + false %{buildDir} - Custom Executable + Exécutable personnalisé ProjectExplorer.CustomExecutableRunConfiguration 3768 diff --git a/lib/implementations/impls.bmf b/lib/implementations/impls.bmf index c49e68f..2115cfc 100644 Binary files a/lib/implementations/impls.bmf and b/lib/implementations/impls.bmf differ diff --git a/lib/references/apf27-wb-master.xml b/lib/references/apf27-wb-master.xml index 8c770f8..777424e 100644 --- a/lib/references/apf27-wb-master.xml +++ b/lib/references/apf27-wb-master.xml @@ -2,7 +2,7 @@ - clkrstgen + apf27_wb_master diff --git a/lib/references/references.bmf b/lib/references/references.bmf index 201d7b6..2c93c03 100644 Binary files a/lib/references/references.bmf and b/lib/references/references.bmf differ