if (context == Design) {
- params->clocks.append(frequency);
+ params->getGraph()->addClock(frequency);
// get the top group
GroupBlock *group = params->getGraph()->getTopGroup();
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
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);
-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;
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
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);
}