From bc5d59217a24b25c1b913bec4a41dd026d02720c Mon Sep 17 00:00:00 2001 From: stephane Domas Date: Wed, 9 May 2018 18:22:16 +0200 Subject: [PATCH] finalized analysis with clkconvert + started testbench gen. --- AbstractBoxItem.cpp | 2 + AbstractBoxItem.h | 3 ++ BlockLibraryWidget.cpp | 2 +- BoxItem.cpp | 5 ++- ConnectionItem.h | 1 + Dispatcher.cpp | 44 ++++++++++++++------- FunctionalBlock.cpp | 1 + Graph.cpp | 80 ++++++++++++++++++++++++++++++++++++- Graph.h | 1 + GroupBlock.cpp | 52 ++++++++++++------------ GroupItem.cpp | 3 ++ GroupScene.cpp | 2 +- InterfaceItem.cpp | 10 +++++ InterfaceItem.h | 1 + Makefile-isim | 33 ++++++++++++++++ Parameters.cpp | 89 +++++++++++++++++++++++++++++++++++++++++- SpecialBlock.cpp | 1 + StimuliItem.cpp | 2 +- blast.creator.user | 2 +- blastconfig.xml | 4 +- blastconfig.xsd | 8 ++-- projectfile.xsd | 53 ++++++++++++++++++++++++- 22 files changed, 344 insertions(+), 55 deletions(-) create mode 100644 Makefile-isim diff --git a/AbstractBoxItem.cpp b/AbstractBoxItem.cpp index 7912813..0a82055 100644 --- a/AbstractBoxItem.cpp +++ b/AbstractBoxItem.cpp @@ -41,6 +41,7 @@ AbstractBoxItem::AbstractBoxItem(AbstractBlock *_refBlock, Dispatcher *_dispatch selected = false; currentInterface = NULL; + visible = true; rstClkVisible = false; wishboneVisible = false; @@ -71,6 +72,7 @@ AbstractBoxItem::AbstractBoxItem(Dispatcher *_dispatcher, Parameters *_params, i selected = false; currentInterface = NULL; + visible = true; rstClkVisible = false; wishboneVisible = false; diff --git a/AbstractBoxItem.h b/AbstractBoxItem.h index d0965cf..e028728 100644 --- a/AbstractBoxItem.h +++ b/AbstractBoxItem.h @@ -57,6 +57,7 @@ public: void setRefBlock(AbstractBlock* _refBlock); inline void setId(int _id){ id = _id; } inline void setSelected(bool _selected) { selected = _selected; } + inline void setVisible(bool state) { visible = state; } void setRstClkVisible(bool b); void setWishboneVisible(bool b); void setDimension(int x, int y); @@ -77,6 +78,7 @@ public: virtual bool isBoxItem(); virtual bool isGroupItem(); virtual bool isStimuliItem(); + inline bool isVisible() { return visible; } inline bool isSelected() { return selected; } inline bool isRstClkVisible(){ return rstClkVisible;} inline bool isWishboneVisible(){ return wishboneVisible;} @@ -150,6 +152,7 @@ protected: int lock; bool selected; + bool visible; //! true if the box is shown bool rstClkVisible; //! true if clock/reset interfaces are visible bool wishboneVisible; //! true if wishbone interfaces are visible diff --git a/BlockLibraryWidget.cpp b/BlockLibraryWidget.cpp index 32012c5..47fd875 100644 --- a/BlockLibraryWidget.cpp +++ b/BlockLibraryWidget.cpp @@ -136,7 +136,7 @@ void BlockLibraryWidget::addClicked() { cout << "adding block to scene " << v.toInt() << endl; QHash clkRstToGen; - for(int i=1;iitemAtPosition(i,0); QLabel* lab = (QLabel *)(item->widget()); item = layClkRst->itemAtPosition(i,1); diff --git a/BoxItem.cpp b/BoxItem.cpp index 783716c..f3bc8eb 100644 --- a/BoxItem.cpp +++ b/BoxItem.cpp @@ -207,6 +207,9 @@ BoxItem::~BoxItem() { } void BoxItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + + if (!visible) return; + QPen pen(Qt::black, 3); if(selected) pen.setColor(Qt::red); @@ -1064,7 +1067,7 @@ void BoxItem::save(QXmlStreamWriter &writer) { writer.writeAttribute("id",QString::number(inter->getId())); writer.writeAttribute("name",inter->getName()); - writer.writeAttribute("ref_name",inter->refInter->getName()); + writer.writeAttribute("ref_name",inter->getReferenceName()); writer.writeAttribute("orientation",inter->getStrOrientation()); writer.writeAttribute("position",QString::number(inter->getPositionRatio())); diff --git a/ConnectionItem.h b/ConnectionItem.h index 13bf8a7..c4852c8 100644 --- a/ConnectionItem.h +++ b/ConnectionItem.h @@ -66,6 +66,7 @@ public: // testers inline bool isSelected() { return selected; } + inline bool isVisible() { return visible; } // others void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); diff --git a/Dispatcher.cpp b/Dispatcher.cpp index e1857c3..266160b 100644 --- a/Dispatcher.cpp +++ b/Dispatcher.cpp @@ -118,15 +118,16 @@ bool Dispatcher::createConnection(Context context, InterfaceItem *iface1, Interf ref2->connectTo(ref1); ok2 = true; } - if ((ok1 == true) || (ok2 == true)) { - - cout << "trying to create a connection from " << qPrintable(ref1->getOwner()->getName()) << "/" << qPrintable(ref1->getName()); - cout << " to " << qPrintable(ref2->getOwner()->getName()) << "/" << qPrintable(ref2->getName()); + if ((ok1 == true) || (ok2 == true)) { if (ok1) { + cout << "trying to create a connection from " << qPrintable(ref1->getOwner()->getName()) << "/" << qPrintable(ref1->getName()); + cout << " to " << qPrintable(ref2->getOwner()->getName()) << "/" << qPrintable(ref2->getName()); iface1->getOwner()->getScene()->createConnectionItem(iface1,iface2, visible); } else { + cout << "trying to create a connection from " << qPrintable(ref2->getOwner()->getName()) << "/" << qPrintable(ref2->getName()); + cout << " to " << qPrintable(ref1->getOwner()->getName()) << "/" << qPrintable(ref1->getName()); iface2->getOwner()->getScene()->createConnectionItem(iface2,iface1, visible); } @@ -223,10 +224,10 @@ void Dispatcher::generateVHDL(Context context) throw(Exception) { make.copy(dest); } - // copying external resources + // generate VHDL + copying external resources QString dest = params->projectPath; - dest += "/src/"; - try { + dest += "/src/"; + try { params->getGraph()->generateVHDL(dest); QList extResources = params->getGraph()->getExternalResources(); @@ -245,6 +246,17 @@ void Dispatcher::generateVHDL(Context context) throw(Exception) { catch(Exception e) { throw(e); } + // generate testbench + dest = params->projectPath; + dest += "/testbench/"; + dest += params->projectName; + dest += "_tb.vhd"; + try { + params->getGraph()->generateTestbench(params->projectName, dest); + } + catch(Exception e) { + throw(e); + } // creating parameters file QString paramName = params->projectPath+"/params-isim.txt"; @@ -273,8 +285,7 @@ void Dispatcher::generateVHDL(Context context) throw(Exception) { } out << endl; out << "VL_SRC := ${XILINX}/verilog/src/glbl.v" << endl << endl; - out << "TB_SRC := $(TB_DIR)/read_csv.vhd \\" << endl; - out << "\t$(TB_DIR)/$(PROJECT_NAME)_tb.vhd" << endl << endl; + out << "TB_SRC := $(TB_DIR)/$(PROJECT_NAME)_tb.vhd" << endl << endl; out << "SIMU_EXE := $(PROJECT_NAME)_tb" << endl << endl; paramFile.close(); @@ -759,13 +770,16 @@ GroupWidget *Dispatcher::createTopScene(Context context, double mainClock){ cout << "call to " << qPrintable(fctName) << endl; #endif - bool createIfaces = true; - if (context == Load) { - createIfaces = false; - } + Graph* graph = NULL; // creating the graph and thus, the topgroup - Graph* graph = params->initGraph(createIfaces); - graph->addClock(mainClock); + if (context == Design) { + graph = params->initGraph(true); + graph->addClock(mainClock); + } + else if (context == Load) { + graph = params->initGraph(false); + } + // get the top group GroupBlock *topBlock = graph->getTopGroup(); // creating the top group widget diff --git a/FunctionalBlock.cpp b/FunctionalBlock.cpp index 0eb4036..89250ec 100644 --- a/FunctionalBlock.cpp +++ b/FunctionalBlock.cpp @@ -668,6 +668,7 @@ void FunctionalBlock::createInputPattern() throw(Exception) { cout << "call to " << qPrintable(fctName) << endl; #endif + cout << "creating input pattern" << endl; lengthIP = -1; foreach(AbstractInterface* iface, getControlInputs()) { diff --git a/Graph.cpp b/Graph.cpp index 808dbda..d0c11cc 100644 --- a/Graph.cpp +++ b/Graph.cpp @@ -46,7 +46,7 @@ GroupBlock* Graph::getGroupBlockByName(QString name) { FunctionalBlock* Graph::createFunctionalBlock(GroupBlock* group, ReferenceBlock* ref, bool createIfaces) { FunctionalBlock* newBlock = NULL; - if (ref->getSpecialType() != -1) { + if (ref->getSpecialType() != SpecialBlock::NotSpecial) { cout << "Graph: create special block from " << qPrintable(ref->getName()) << endl; newBlock = new SpecialBlock(this, ref->getSpecialType(), group,ref, createIfaces); } @@ -206,6 +206,18 @@ void Graph::computeOutputPatterns(int nbExec) throw(Exception) { } void Graph::generateVHDL(const QString &path) throw(Exception) { + // generating VHDL for stimulis + cout << "generating stimulis" << endl; + try { + foreach(FunctionalBlock* stimuli, stimulis) { + stimuli->generateVHDL(path); + } + } + catch(Exception e) { + throw(e); + } + // generating VHDL for top group + cout << "generating top group" << endl; try { topGroup->generateVHDL(path); } @@ -214,6 +226,72 @@ void Graph::generateVHDL(const QString &path) throw(Exception) { } } +void Graph::generateTestbench(const QString &projectName, const QString &benchFile) throw(Exception) { + + + QFile vhdlBench(benchFile); + + if (!vhdlBench.open(QIODevice::WriteOnly)) { + throw(Exception(VHDLFILE_NOACCESS)); + } + + cout << "generate testbench" << endl; + QTextStream out(&vhdlBench); + + out << "-------------------------------------------------------------------------------" << endl; + out << "-- testbench for " << projectName << endl; + out << "-------------------------------------------------------------------------------" << endl << endl; + out << "-------------------------------------------------------------------------------" << endl; + out << "-- clock generator" << endl; + out << "-------------------------------------------------------------------------------" << endl << endl; + + out << "library IEEE;" << endl; + out << "use IEEE.STD_LOGIC_1164.all;" << endl; + out << "use IEEE.numeric_std.all;" << endl; + out << "entity clock_gen is" << endl; + out << " generic (" << endl; + out << " Tps : time -- high level width : must be < period" << endl; + out << " );" << endl; + out << " port (" << endl; + out << " phase : out std_logic" << endl; + out << " );" << endl; + out << "end entity clock_gen;" << endl<< endl; + + out << "architecture clock_gen_1 of clock_gen is" << endl; + out << " constant period : time := 2*Tps;" << endl; + out << "begin" << endl; + out << " clock_process : process" << endl; + out << " begin" << endl; + out << " phase <= '1', '0' after Tps;" << endl; + out << " wait for period;" << endl; + out << " end process clock_process;" << endl; + out << "end architecture clock_gen_1;" << endl << endl; + + out << "-------------------------------------------------------------------------------" << endl; + out << "-- testbench" << endl; + out << "-------------------------------------------------------------------------------" << endl << endl; + out << "library IEEE;" << endl; + out << "use IEEE.STD_LOGIC_1164.all;" << endl; + out << "use IEEE.numeric_std.all;" << endl; + out << "entity " << projectName << "_tb is" << endl; + out << "end entity " << projectName << "_tb;" << endl << endl; + out << "architecture " << projectName << "_tb_1 of " << projectName << "_tb is" << endl << endl; + + out << " component clock_gen" << endl; + out << " generic (" << endl; + out << " Tps : time" << endl; + out << " );" << endl; + out << " port (" << endl; + out << " phase : out std_logic" << endl; + out << " );" << endl; + out << " end component;" << endl << endl; + + topGroup->generateComponent(out,false); + + vhdlBench.close(); + +} + QList Graph::getExternalResources() { QList list = topGroup->getExternalResources(); return list; diff --git a/Graph.h b/Graph.h index d5b15a9..bbd7eb2 100644 --- a/Graph.h +++ b/Graph.h @@ -65,6 +65,7 @@ public: void computeOutputPatterns(int nbExec) throw(Exception); void generateVHDL(const QString& path) throw(Exception); + void generateTestbench(const QString& projectName, const QString& benchFile) throw(Exception); private: GroupBlock* topGroup; diff --git a/GroupBlock.cpp b/GroupBlock.cpp index 206d8cb..d3ff0ed 100644 --- a/GroupBlock.cpp +++ b/GroupBlock.cpp @@ -200,12 +200,10 @@ void GroupBlock::computeOutputPattern(int nbExec) throw(Exception) { while (!fifo.isEmpty()) { AbstractBlock* block = fifo.takeFirst(); - if (block->getOutputPatternComputed()) continue; // block has already been processed - - cout << "computing compat and output for " << qPrintable(block->getName()) << endl; - + if (block->getOutputPatternComputed()) continue; // block has already been processed try { + cout << "computing compatibility of " << qPrintable(block->getName()) << endl; block->checkInputPatternCompatibility(); } catch(Exception e) { @@ -214,6 +212,7 @@ void GroupBlock::computeOutputPattern(int nbExec) throw(Exception) { } try { + cout << "computing output of " << qPrintable(block->getName()) << endl; block->computeOutputPattern(); } catch(Exception e) { @@ -230,29 +229,32 @@ void GroupBlock::computeOutputPattern(int nbExec) throw(Exception) { ConnectedInterface* conn = (ConnectedInterface*)iface; foreach(ConnectedInterface* connTo, conn->getConnectedTo()) { - AbstractBlock* block1 = connTo->getOwner(); - cout << "testing if " << qPrintable(block1->getName()) << " has all connected inputs connected to already processed blocks" << endl; - bool addIt = true; - int maxLevel = 0; - - foreach(AbstractInterface* iface, block1->getControlInputs()) { - //cout << qPrintable(iface->getName()) << " of " << qPrintable(iface->getOwner()->getName()) << " connected to " << endl; - ConnectedInterface* connFrom = ((ConnectedInterface*)iface)->getConnectedFrom(); - //cout << qPrintable(connFrom->getName()) << " of " << qPrintable(connFrom->getOwner()->getName()) << endl; - - if ((connFrom != NULL) && (connFrom->getOwner()->getOutputPatternComputed() == false)) { - addIt = false; - break; - } - else { - if (connFrom->getOwner()->getTraversalLevel() > maxLevel) maxLevel = connFrom->getOwner()->getTraversalLevel(); + AbstractBlock* blockTo = connTo->getOwner(); + // do sthg only if blockTo is not this group block + if (blockTo != this) { + cout << "testing if " << qPrintable(blockTo->getName()) << " has all connected inputs connected to already processed blocks" << endl; + bool addIt = true; + int maxLevel = 0; + + foreach(AbstractInterface* iface, blockTo->getControlInputs()) { + cout << qPrintable(iface->getName()) << "/" << qPrintable(iface->getOwner()->getName()) << " connected from "; + ConnectedInterface* connFrom = ((ConnectedInterface*)iface)->getConnectedFrom(); + cout << qPrintable(connFrom->getName()) << "/" << qPrintable(connFrom->getOwner()->getName()) << endl; + + if ((connFrom != NULL) && (connFrom->getOwner()->getOutputPatternComputed() == false)) { + addIt = false; + break; + } + else { + if (connFrom->getOwner()->getTraversalLevel() > maxLevel) maxLevel = connFrom->getOwner()->getTraversalLevel(); + } } - } - if (addIt) { - cout << "adding " << qPrintable(block1->getName()) << " to the FIFO" << endl; - block1->setTraversalLevel(maxLevel+1); // level 0 = first blocks to be evaluated - fifo.append(block1); + if (addIt) { + cout << "adding " << qPrintable(blockTo->getName()) << " to the FIFO" << endl; + blockTo->setTraversalLevel(maxLevel+1); // level 0 = first blocks to be evaluated + fifo.append(blockTo); + } } } } diff --git a/GroupItem.cpp b/GroupItem.cpp index 283e6b4..d9e7459 100644 --- a/GroupItem.cpp +++ b/GroupItem.cpp @@ -88,6 +88,9 @@ void GroupItem::setParentItem(BoxItem *_parentItem) { } void GroupItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + + if (!visible) return; + if(boxWidth > 0 && boxHeight > 0){ if(selected) painter->setPen(Qt::red); diff --git a/GroupScene.cpp b/GroupScene.cpp index 13b6e11..a50cb5a 100644 --- a/GroupScene.cpp +++ b/GroupScene.cpp @@ -285,7 +285,7 @@ void GroupScene::save(QXmlStreamWriter &writer) { clkList += QString::number(d)+","; } clkList.chop(1); - writer.writeAttribute("clkList",clkList); + writer.writeAttribute("clklist",clkList); } groupItem->save(writer); diff --git a/InterfaceItem.cpp b/InterfaceItem.cpp index 02b04ac..7ee68c6 100644 --- a/InterfaceItem.cpp +++ b/InterfaceItem.cpp @@ -4,6 +4,7 @@ #include "GroupInterface.h" #include "FunctionalInterface.h" #include "BoxItem.h" +#include "ReferenceInterface.h" int InterfaceItem::counter = 0; @@ -45,6 +46,15 @@ QString InterfaceItem::getName() { return refInter->getName(); } +QString InterfaceItem::getReferenceName() { + if (!refInter->isFunctionalInterface()) { + return "no_refname_for_groupiface"; + } + FunctionalInterface* iface = AI_TO_FUN(refInter); + ReferenceInterface* refIface = iface->getReference(); + return refIface->getName(); +} + void InterfaceItem::updateName(QString name) { QFontMetrics fmName(params->defaultIfaceFont); nameWidth = fmName.width(refInter->getName()); diff --git a/InterfaceItem.h b/InterfaceItem.h index 26f9dd9..ab91adc 100644 --- a/InterfaceItem.h +++ b/InterfaceItem.h @@ -31,6 +31,7 @@ public: // getters inline int getId() { return id; } QString getName(); + QString getReferenceName(); inline double getPositionRatio() { return positionRatio; } inline double getPosition() { return position; } inline int getOrientation() { return orientation; } diff --git a/Makefile-isim b/Makefile-isim new file mode 100644 index 0000000..15319a1 --- /dev/null +++ b/Makefile-isim @@ -0,0 +1,33 @@ +OPT := params-isim.txt + +include $(OPT) + +ISIM_DIR := isim + +ISIM_LIB := work + +all : project compile + +project : $(PROJECT_NAME).prj + +compile : $(PROJECT_NAME).prj $(VHDL_SRC) + tb_name=$$( echo $(TB_SRC) | sed 's,.*/,,' | sed 's,[.].*,,'); \ + fuse $(ISIM_LIB).$$tb_name $(ISIM_LIB).glbl -prj $(PROJECT_NAME).prj -L unisim -L secureip -timeprecision_vhdl ps -o $(SIMU_EXE) + +view : + $(SIMU_EXE) -gui -wdb $(SIMU_EXE).wdb + +$(PROJECT_NAME).prj : + if [ -f $@ ]; then rm $@; fi + echo "### VHDL sources" + for fich in $(VHDL_SRC); do echo vhdl $(ISIM_LIB) $$fich >> $@; done + echo "### verilog sources" + for fich in $(VL_SRC); do echo verilog $(ISIM_LIB) $$fich >> $@; done + echo "### test bench sources" + for fich in $(TB_SRC); do echo vhdl $(ISIM_LIB) $$fich >> $@; done + +clean : + rm -f *~ + rm -f $(PROJECT_NAME).prj + cd $(SRC_DIR); rm -f *~ + cd $(TB_DIR); rm -f *~ diff --git a/Parameters.cpp b/Parameters.cpp index 23b798f..ecf69d9 100644 --- a/Parameters.cpp +++ b/Parameters.cpp @@ -261,6 +261,64 @@ GroupWidget *Parameters::loadProject(QDomElement root) throw(Exception) { } cout << "project path set to " << qPrintable(projectPath) << endl; } + + /********************************************************** + 0 : getting parameters + ***********************************************************/ + int width = 0; + int height = 0; + int lineLength = 0; + int gapLength = 0; + QString fontName=""; + int fontSize; + QString autoConn=""; + QDomNode paramsNode = root.elementsByTagName("parameters").at(0); + + QDomElement blocksElt = paramsNode.firstChildElement("block_view"); + width = blocksElt.attribute("width","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + height = blocksElt.attribute("height","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + fontName = blocksElt.attribute("font","none"); + if(fontName == "none") throw(Exception(PROJECTFILE_CORRUPTED)); + fontSize = blocksElt.attribute("font_size","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + defaultBlockWidth = width; + defaultBlockHeight = height; + defaultBlockFontName = fontName; + defaultBlockFontSize = fontSize; + defaultBlockFont = QFont(defaultBlockFontName, defaultBlockFontSize); + + QDomElement ifacesElt = paramsNode.firstChildElement("interface_view"); + lineLength = ifacesElt.attribute("line_length","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + width = ifacesElt.attribute("width","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + height = ifacesElt.attribute("height","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + fontName = ifacesElt.attribute("font","none"); + if(fontName == "none") throw(Exception(PROJECTFILE_CORRUPTED)); + fontSize = ifacesElt.attribute("font_size","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + arrowLineLength = lineLength; + arrowWidth = width; + arrowHeight = height; + defaultIfaceFontName = fontName; + defaultIfaceFontSize = fontSize; + defaultIfaceFont = QFont(defaultIfaceFontName, defaultIfaceFontSize); + + QDomElement connsElt = paramsNode.firstChildElement("connection_view"); + gapLength = connsElt.attribute("gap_length","none").toInt(&ok); + if(!ok) throw(Exception(PROJECTFILE_CORRUPTED)); + autoConn = connsElt.attribute("auto_conn","none"); + if (autoConn == "false") { + autoConnMainClk = false; + } + else { + autoConnMainClk = true; + } + connGapLength = gapLength; + /********************************************************** 1 : getting scene and creating associated group widgets ***********************************************************/ @@ -639,7 +697,7 @@ void Parameters::loadBlastConfiguration(QString confFile) throw(Exception) { attributeStr = eltInterfaces.attribute("height", "none"); arrowHeight = attributeStr.toInt(&ok); if (!ok || arrowHeight < 1) throw(Exception(CONFIGFILE_CORRUPTED)); - attributeStr = eltInterfaces.attribute("linelength", "none"); + attributeStr = eltInterfaces.attribute("line_length", "none"); arrowLineLength = attributeStr.toInt(&ok); if (!ok || arrowLineLength < 1) throw(Exception(CONFIGFILE_CORRUPTED)); attributeStr = eltInterfaces.attribute("font_size", "none"); @@ -651,7 +709,7 @@ void Parameters::loadBlastConfiguration(QString confFile) throw(Exception) { defaultIfaceFont = QFont(defaultIfaceFontName, defaultIfaceFontSize); QDomElement eltConnections = eltInterfaces.nextSiblingElement("connections"); - attributeStr = eltConnections.attribute("gaplength", "none"); + attributeStr = eltConnections.attribute("gap_length", "none"); connGapLength = attributeStr.toInt(&ok); if (!ok || connGapLength < 1) throw(Exception(CONFIGFILE_CORRUPTED)); } @@ -1157,6 +1215,33 @@ void Parameters::save(QString confFile) { writer.writeStartDocument(); writer.writeStartElement("blast_project"); + + writer.writeStartElement("parameters"); + writer.writeStartElement("block_view"); + writer.writeAttribute("width",QString::number(defaultBlockWidth)); + writer.writeAttribute("height",QString::number(defaultBlockHeight)); + writer.writeAttribute("font",defaultBlockFontName); + writer.writeAttribute("font_size",QString::number(defaultBlockFontSize)); + writer.writeEndElement(); // + writer.writeStartElement("interface_view"); + writer.writeAttribute("line_length",QString::number(arrowLineLength)); + writer.writeAttribute("width",QString::number(arrowWidth)); + writer.writeAttribute("height",QString::number(arrowHeight)); + writer.writeAttribute("font",defaultIfaceFontName); + writer.writeAttribute("font_size",QString::number(defaultIfaceFontSize)); + writer.writeEndElement(); // + writer.writeStartElement("connection_view"); + writer.writeAttribute("gap_length",QString::number(connGapLength)); + if (autoConnMainClk) { + writer.writeAttribute("auto_conn","true"); + } + else { + writer.writeAttribute("auto_conn","false"); + } + writer.writeEndElement(); // + + writer.writeEndElement(); // + writer.writeStartElement("scenes"); writer.writeAttribute("count",QString::number(dispatcher->getNumberOfScenes())); diff --git a/SpecialBlock.cpp b/SpecialBlock.cpp index be9452e..29f6d5a 100644 --- a/SpecialBlock.cpp +++ b/SpecialBlock.cpp @@ -159,6 +159,7 @@ void SpecialBlock::computeOutputPatternClockConvert(int nbExec) throw(Exception) connIface->setOutputPattern(pat); outputPattern.insert(connIface,pat); } + setOutputPatternComputed(true); cout << "output pattern computed" << endl; } diff --git a/StimuliItem.cpp b/StimuliItem.cpp index 4bc4f31..861bfc7 100644 --- a/StimuliItem.cpp +++ b/StimuliItem.cpp @@ -740,7 +740,7 @@ void StimuliItem::save(QXmlStreamWriter &writer) { writer.writeAttribute("id",QString::number(inter->getId())); writer.writeAttribute("name",inter->getName()); - writer.writeAttribute("ref_name",inter->refInter->getName()); + writer.writeAttribute("ref_name",inter->getReferenceName()); writer.writeAttribute("orientation",inter->getStrOrientation()); writer.writeAttribute("position",QString::number(inter->getPositionRatio())); diff --git a/blast.creator.user b/blast.creator.user index b5a3678..34b8287 100644 --- a/blast.creator.user +++ b/blast.creator.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/blastconfig.xml b/blastconfig.xml index 9092eab..26ec97a 100644 --- a/blastconfig.xml +++ b/blastconfig.xml @@ -31,7 +31,7 @@ - - + + diff --git a/blastconfig.xsd b/blastconfig.xsd index 6ad294a..85a678d 100644 --- a/blastconfig.xsd +++ b/blastconfig.xsd @@ -18,7 +18,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -166,7 +166,7 @@ - + diff --git a/projectfile.xsd b/projectfile.xsd index 336d2ac..8196754 100644 --- a/projectfile.xsd +++ b/projectfile.xsd @@ -241,13 +241,29 @@ - + + + + + + + + + + + + + + + + + @@ -291,6 +307,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5