X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8fb3c55ee009a11db5e1c08a4cfb286979412745..3fb762e7042d9b4a1cf78556ad9ed7f117cc53ba:/Dispatcher.cpp diff --git a/Dispatcher.cpp b/Dispatcher.cpp index c50270c..b162559 100644 --- a/Dispatcher.cpp +++ b/Dispatcher.cpp @@ -684,7 +684,7 @@ void Dispatcher::addClkRstGenBlock(Context context, double frequency) { if (context == Design) { - params->clocks.append(frequency); + params->getGraph()->addClock(frequency); // get the top group GroupBlock *group = params->getGraph()->getTopGroup(); @@ -695,7 +695,7 @@ void Dispatcher::addClkRstGenBlock(Context context, double frequency) { FunctionalBlock* newOne = params->getGraph()->createFunctionalBlock(group, ref, true); QString name = "clkrstgen_"; - name += QString::number(params->clocks.size()-1); + name += QString::number(params->getGraph()->getClocks().size()-1); newOne->setName(name); // creating the box item @@ -704,8 +704,8 @@ void Dispatcher::addClkRstGenBlock(Context context, double frequency) { ConnectedInterface* fromIfaceClk = NULL; ConnectedInterface* fromIfaceReset = NULL; - QString clkName = "ext_clk_"+QString::number(params->clocks.size()-1); - QString rstName = "ext_reset_"+QString::number(params->clocks.size()-1); + QString clkName = "ext_clk_"+QString::number(params->getGraph()->getClocks().size()-1); + QString rstName = "ext_reset_"+QString::number(params->getGraph()->getClocks().size()-1); fromIfaceClk = new GroupInterface(group,clkName, AbstractInterface::Input, AbstractInterface::Clock); fromIfaceReset = new GroupInterface(group,rstName, AbstractInterface::Input, AbstractInterface::Reset); group->addInterface(fromIfaceClk); @@ -737,7 +737,7 @@ void Dispatcher::addClkRstGenBlock(Context context, double frequency) { -GroupWidget *Dispatcher::createTopScene(Context context){ +GroupWidget *Dispatcher::createTopScene(Context context, double mainClock){ static QString fctName = "Dispatcher::createTopScene()"; #ifdef DEBUG_FCTNAME cout << "call to " << qPrintable(fctName) << endl; @@ -748,7 +748,8 @@ GroupWidget *Dispatcher::createTopScene(Context context){ createIfaces = false; } // creating the graph and thus, the topgroup - Graph* graph = params->createGraph(createIfaces); + Graph* graph = params->initGraph(createIfaces); + graph->addClock(mainClock); // get the top group GroupBlock *topBlock = graph->getTopGroup(); // creating the top group widget @@ -771,8 +772,8 @@ GroupWidget *Dispatcher::createTopScene(Context context){ if (context == Design) { // create clkrstgen - double freq = params->clocks.at(0); - params->clocks.clear(); + double freq = params->getGraph()->getClock(0); + params->getGraph()->resetClocks(); addClkRstGenBlock(context,freq); }