From eb12792fe5344f4d128b8aba2a7948aa13f6a1ae Mon Sep 17 00:00:00 2001 From: stephane Domas <stephane.domas@univ-fcomte.fr> 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 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 4.2.0, 2018-01-24T13:25:48. --> +<!-- Written by QtCreator 4.2.0, 2018-01-24T18:18:10. --> <qtcreator> <data> <variable>EnvironmentId</variable> - <value type="QByteArray">{c8006d66-d34f-42be-ad10-d0207752286d}</value> + <value type="QByteArray">{3701e197-5b6c-48ea-9e98-a6cf6de18672}</value> </data> <data> <variable>ProjectExplorer.Project.ActiveTarget</variable> @@ -19,7 +19,7 @@ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> <value type="QString" key="language">Cpp</value> <valuemap type="QVariantMap" key="value"> - <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> + <value type="QByteArray" key="CurrentPreferences">qt2</value> </valuemap> </valuemap> <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> @@ -31,7 +31,7 @@ <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> - <value type="int" key="EditorConfiguration.IndentSize">4</value> + <value type="int" key="EditorConfiguration.IndentSize">2</value> <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> <value type="int" key="EditorConfiguration.MarginColumn">80</value> <value type="bool" key="EditorConfiguration.MouseHiding">true</value> @@ -43,12 +43,12 @@ <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value> <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> - <value type="int" key="EditorConfiguration.TabSize">8</value> - <value type="bool" key="EditorConfiguration.UseGlobal">true</value> + <value type="int" key="EditorConfiguration.TabSize">4</value> + <value type="bool" key="EditorConfiguration.UseGlobal">false</value> <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> - <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> + <value type="bool" key="EditorConfiguration.cleanWhitespace">false</value> <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> </valuemap> </data> @@ -61,7 +61,7 @@ <valuemap type="QVariantMap"> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> - <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{2c9bf876-3476-44eb-8065-1f0844704dda}</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{ed04208c-8774-456b-99b9-4a02094ca7a4}</value> <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> @@ -128,7 +128,7 @@ <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value> <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value> - <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value> + <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">0</value> <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value> <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> @@ -169,8 +169,9 @@ <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> + <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> - <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Exécutable personnalisé</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> 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 @@ <block> <informations> <name> - clkrstgen + apf27_wb_master </name> <category ids="100" /> <description> 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;e<R0AV6fsUd?ggC$V85km@)X8<J4fV4S~P6d*tKsHE~C6F`$!c+!} K%@=sixB>vVE*a|p delta 95 zcmZ3nlyS~dMivH!pcxxkCUY^~n#?05xp^<w14esG1|tSbh7<-f216iDVMt^!20|l- nG$22XAr&ZMz>owaQy9#Fas~_*Kvoiv4dNLw7;V18bH)__KXeq| -- 2.39.5