From eb12792fe5344f4d128b8aba2a7948aa13f6a1ae Mon Sep 17 00:00:00 2001 From: stephane Domas Date: Wed, 24 Jan 2018 18:18:27 +0100 Subject: [PATCH 1/1] correct bug with clkrstgen --- Dispatcher.cpp | 2 +- GroupBlock.cpp | 25 ++++++++++++++++++++----- blast.creator.user | 21 +++++++++++---------- lib/implementations/impls.bmf | Bin 5790 -> 5790 bytes lib/references/apf27-wb-master.xml | 2 +- lib/references/references.bmf | Bin 21148 -> 21160 bytes 6 files changed, 33 insertions(+), 17 deletions(-) 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 c49e68f25fa1ac28c28ef0fdce6e97d230d2c9c1..2115cfcb4513070ae45b9cc0b35026aed97f7a8c 100644 GIT binary patch delta 74 zcmV-Q0JZ;~EuJl~;RTcP2ON|C1qhSj1tzmA1~>(ijSEVXtqTg1V+$a&*9&w4ld%rU glSvL{lY0;9lc^9Glb;X@lVuP(lXDg;v+NME1vlRuJpcdz delta 76 zcmV-S0JHy|EuJl~;RTZg1}2m92ON|A1qib%1~>(iw+kSXtqTg1V+%^N*9&w40cVp; i4rP-|4$6~z59*VL5IU2e5DJrJ5Ezql7Av#t5V8dznHy{X 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 201d7b69b499f838524ce159af8a32fc6e05fbb6..2c93c037751fd725fb1ce2d4e62209c562b58efc 100644 GIT binary patch delta 125 zcmbQUlySvUMivH!pd}kwCUYr2V_;yAV@PBuU`S&yVlZcjXDDY#0+P8vv0{c2hE#^4 z&Fi=xGuj(6m;evVE*a|p delta 95 zcmZ3nlyS~dMivH!pcxxkCUY^~n#?05xp^owaQy9#Fas~_*Kvoiv4dNLw7;V18bH)__KXeq| -- 2.39.5