+ if (context == Design) {
+ // creating the clkrstgen block
+ ReferenceBlock* ref = params->getHiddenReferenceBlock("clkrstgen");
+ FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(topBlock, ref, true);
+ // creating the clkrstgen item
+ BoxItem* clkResetItem = scene->createBoxItem(newOne, BoxItem::TopLeft, AbstractBoxItem::Position | AbstractBoxItem::Dimension, BoxItem::NoSpan);
+ params->blockToItem.insert(newOne,clkResetItem);
+ // creating top group ext_clk iface item
+ ConnectedInterface* fromIfaceClk = AI_TO_CON(topBlock->getIfaceFromName("ext_clk"));
+ InterfaceItem* fromIfaceItemClk = new InterfaceItem(0.5 , Parameters::West, fromIfaceClk, group, params, true);
+ group->addInterfaceItem(fromIfaceItemClk,true);
+ // creating top group ext_reset iface item
+ ConnectedInterface* fromIfaceReset = AI_TO_CON(topBlock->getIfaceFromName("ext_reset"));
+ InterfaceItem* fromIfaceItemReset = new InterfaceItem(0.5 , Parameters::West, fromIfaceReset, group, params, false);
+ group->addInterfaceItem(fromIfaceItemReset,true);
+ // connecting ext_clk iface items
+ InterfaceItem* toIfaceItemClk = clkResetItem->searchInterfaceItemByName("ext_clk");
+ if (toIfaceItemClk == NULL) {
+ cerr << "Abnormal case while connecting top group ext_clk to clkrstgen" << endl;
+ }
+ createConnection(context,fromIfaceItemClk, toIfaceItemClk, false);
+ // connecting ext_reset iface items
+ InterfaceItem* toIfaceItemReset = clkResetItem->searchInterfaceItemByName("ext_reset");
+ if (toIfaceItemReset == NULL) {
+ cerr << "Abnormal case while connecting top group ext_reset to clkrstgen" << endl;
+ }
+ createConnection(context,fromIfaceItemReset, toIfaceItemReset, false);
+ }
+
+
+ groupList.append(topGroupWidget);
+ return topGroupWidget;