-void MainWindow::slotGraphValidation() {
- params->getGraph()->computeOutputPatterns(5);
- //params->parametersValidation();
+void MainWindow::slotGraphAnalysis() {
+ bool compat = true;
+ try {
+ params->getGraph()->computeOutputPatterns(1);
+ }
+ catch(Exception e) {
+ cerr << qPrintable(e.getMessage()) << endl;
+ compat = false;
+ if (e.getType() == IP_AP_NOTCOMPAT) {
+ FunctionalBlock* toBlock = (FunctionalBlock*)(e.getSource());
+ QString msg = tr("");
+ msg.append(toBlock->getName());
+ msg += " is not compatible with its input pattern.\nDo you want to launch automatic modification process to ensure the compatibility ?";
+ int ret = QMessageBox::question(this,tr("Building references library"),msg, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
+ if (ret == QMessageBox::Ok) {
+ dispatcher->findGraphModifications(toBlock);
+ }
+ }
+ }
+}
+
+void MainWindow::slotGenerateVHDL() {
+ try {
+ params->getGraph()->generateVHDL(params->projectPath);
+ }
+ catch(Exception e) {
+ cerr << qPrintable(e.getMessage()) << endl;
+ }