Changeset 32
- Timestamp:
- May 30, 2007, 12:08:56 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Tools/Viewer
- Files:
-
- 28 added
- 2 deleted
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/include/BaseV.h
r26 r32 6 6 #include <iterator> 7 7 #include <qlist.h> 8 #include <qmap.h> 9 #include "Tools/Viewer/Bdd/include/LimitParam.h" 10 #include "Tools/Viewer/Bdd/include/Group.h" 11 #include "Tools/Viewer/Bdd/include/Param.h" 8 12 9 13 10 14 #include "Tools/Viewer/Bdd/include/BaseP.h" 11 15 #include "Tools/Viewer/Bdd/include/Signal.h" 16 12 17 using namespace std; 13 18 namespace morpheo{ … … 20 25 private: 21 26 string comment; 22 QList<BaseP> *pos; 23 QList<string> *listcomp; 24 //QList<Param> *param; 27 QList<morpheo::tools::viewer::bdd::BaseP> *pos; 28 QList<string> *listcomp; //dico index 29 /*list of groups(singleton)*/ 30 QList<string> *listgroup; //dico index 31 QList<morpheo::tools::viewer::bdd::Group> *groups; 32 /*list of limit parameters names*/ 33 QMap<string,morpheo::tools::viewer::bdd::LimitParam> *limitp; 34 /*list of sources link(generation file)*/ 35 QMap<string,string> *link_src; 36 /*list of destination link(generation file)*/ 37 QMap<string,string> *link_dest; 25 38 26 39 protected: 27 40 public: 28 //access eurs29 morpheo::tools::viewer::bdd::BaseP 41 //accessors 42 morpheo::tools::viewer::bdd::BaseP get_BasePos(string v); 30 43 morpheo::tools::viewer::bdd::Signal *getSignal(morpheo::tools::viewer::bdd::BaseP *top,string c,PortMap *dest); 31 44 QList<morpheo::tools::viewer::bdd::BaseP> *getBaseP(); 32 //morpheo::tools::viewer::bdd::Param get_Param(string v); 33 //constructeurs 45 string getLinksrc(string name); 46 string getLinkdest(string name); 47 void setComment(string s); 48 49 //constructors 34 50 BaseV(); 35 51 ~BaseV (); 52 53 void addBaseP(morpheo::tools::viewer::bdd::BaseP *p,string t); 54 /*search a group*/ 55 morpheo::tools::viewer::bdd::Group searchGroup(string v); 56 ///*search a param*/ 57 //morpheo::tools::viewer::bdd::Param searchParam(string group,string v); 58 /*search a limitparam*/ 59 morpheo::tools::viewer::bdd::LimitParam searchLimitParam(string v); 36 60 37 void setComment(string s); 38 void addBaseP(morpheo::tools::viewer::bdd::BaseP *p,string t); 39 //void addParam(morpheo::tools::viewer::bdd::Param *p); 61 /*modify a parameter value*/ 62 void modifyValue(string nomgroup,string nameparam,int value); 63 64 /*add/remove group*/ 65 int modifyGroup(string namegroup,int step); 66 int nbGroup(string namegroup); 67 68 /*add a source link */ 69 void addLinksrc(string name,string src); 70 /*add a dest link */ 71 void addLinkdest(string name,string dest); 72 73 /*add a group with his level*/ 74 void addGroup(morpheo::tools::viewer::bdd::Group *g); 75 /*add limit param*/ 76 void addLimitParam(morpheo::tools::viewer::bdd::LimitParam *lp); 77 /*take group list*/ 78 QList<morpheo::tools::viewer::bdd::Group> *getGroups(); 79 /*take LimitParam list*/ 80 QList<morpheo::tools::viewer::bdd::LimitParam> getLimitParam(); 81 /*debug*/ 82 void afficheLimitParamConsole(); 83 void afficheParamConsole(); 40 84 void afficheBaseConsole(); 41 85 };//end class BaseV -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/Architecture_searchComponent.cpp
r20 r32 11 11 12 12 morpheo::tools::viewer::bdd::Component Architecture::getComponent(string v){ 13 return components->operator[](listcomp->indexOf(v,0)); 13 int index=listcomp->indexOf(v,0); 14 if(index!=-1) 15 return components->operator[](index); 16 else 17 return Component(NULL,NULL,0,0,0,0); 14 18 } 15 19 };//end bdd -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_accessors.cpp
r26 r32 19 19 } 20 20 21 QList<morpheo::tools::viewer::bdd::Group> *BaseV::getGroups() 22 { 23 return groups; 24 } 25 26 QList<morpheo::tools::viewer::bdd::LimitParam> BaseV::getLimitParam() 27 { 28 return limitp->values(); 29 } 30 31 string BaseV::getLinksrc(string name) 32 { 33 return link_src->value(name); 34 } 35 string BaseV::getLinkdest(string name) 36 { 37 return link_dest->value(name); 38 } 39 40 int BaseV::nbGroup(string namegroup) 41 { 42 int i=0,j=0, res=-1; 43 while (i!=-1) 44 { 45 i=listgroup->indexOf(namegroup,j); 46 j=i+1; 47 res++; 48 } 49 return res; 50 } 51 21 52 };//end bdd 22 53 };//end viewer -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_afficheBaseConsole.cpp
r26 r32 1 1 /* 2 2 * 3 * [desc.] 3 * [BaseV_afficheBaseConsole] 4 * debug : show contents of position file in memory 4 5 */ 5 6 #include "Tools/Viewer/Bdd/include/BaseV.h" -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_alloc.cpp
r20 r32 1 1 /* 2 2 * 3 3 * [desc.] … … 13 13 pos=new QList<BaseP>(); 14 14 listcomp=new QList<string>(); 15 // param=new morpheo::tools::viewer::bdd::QList<Param>(); 15 groups=new QList<morpheo::tools::viewer::bdd::Group>(); 16 listgroup=new QList<string>(); 17 limitp=new QMap<string,morpheo::tools::viewer::bdd::LimitParam>(); 18 link_src=new QMap<string,string>; 19 link_dest=new QMap<string,string>; 16 20 } 17 21 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_getSignal.cpp
r26 r32 1 1 /* 2 2 * 3 3 * [desc.] … … 24 24 srcX=p->get_x(); 25 25 srcY=p->get_y(); 26 //cout << dest->getComponent() <<endl; 27 morpheo::tools::viewer::bdd::BaseP res=get_BasePos(dest->getComponent()); 28 morpheo::tools::viewer::bdd::Port *pm=(res.getEntity())->searchPort(dest->getPort()); 26 morpheo::tools::viewer::bdd::Port *pm; 27 if(dest->getComponent()==(top->getEntity())->getName()) 28 { 29 //cout << dest->getComponent() <<endl; 30 morpheo::tools::viewer::bdd::BaseP res=get_BasePos(dest->getComponent()); 31 pm=(res.getEntity())->searchPort(dest->getPort()); 32 } 33 else 34 { 35 x=aa->getComponent(dest->getComponent()); 36 pm= x.searchPort(dest->getPort()); 37 } 29 38 destX=pm->get_x(); 30 39 destY=pm->get_y(); -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_searchComponent.cpp
r30 r32 1 2 1 /* 3 2 * … … 13 12 morpheo::tools::viewer::bdd::BaseP BaseV::get_BasePos(string v){ 14 13 int tmp=listcomp->indexOf(v,0); 15 if(tmp==-1){ 16 cout << "not found\n"; 14 if(tmp == -1) 17 15 return NULL; 18 }19 16 else 20 17 return pos->operator[](tmp); -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Bdd/src/BaseV_unalloc.cpp
r20 r32 10 10 namespace bdd{ 11 11 12 BaseV::~BaseV(){} 12 BaseV::~BaseV(){ 13 pos->clear(); 14 limitp->clear(); 15 groups->clear(); 16 } 13 17 14 18 };//end bdd -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/include/window.h
r30 r32 40 40 #include <qevent.h> 41 41 #include <qfiledialog.h> 42 42 #include <qscrollarea.h> 43 #include <qcombobox.h> 44 #include <qspinbox.h> 43 45 44 46 #include "Tools/Viewer/Parser/include/parser.h" … … 72 74 void _setParse(Parse *p); //parse the base 73 75 void _init_file(); //search component and port before drawing 76 74 77 private slots: 75 78 76 79 void _open(); //open a file 77 void _open_error();80 void _open_error(); 78 81 79 82 void _save(); //save a file … … 90 93 void _defautZoom(); 91 94 92 void _level(); 95 void _level(); 93 96 void _informations(); //show or hide informations window 94 97 void _parameters(); //show or hide parameters window … … 98 101 99 102 void _back();//return to the previous view 100 void _cancel_selection(); 101 void _apply(); 103 void _cancel_selection();//cancel the selection of a component 104 void _apply();//apply the parameters changes 105 void currentIndexChanged(QString s); 106 void valueChanged(int i); 102 107 103 108 protected : 104 void mousePressEvent (QMouseEvent *); //mouse handler when mouse pressed105 void mouseMoveEvent (QMouseEvent *); //mouse handler in other case109 void mousePressEvent (QMouseEvent *); //mouse handler when mouse pressed 110 void mouseMoveEvent (QMouseEvent *); //mouse handler in other case 106 111 private : 107 112 void wparameters(); // parameters window builder … … 110 115 void repaint(); //repaint the panel with current parameters 111 116 void drawPort(int x,int y,int pos,string dir); //draw the components ports 112 void write_name(string name); //write the name of the component clicked name in the informations window117 void write_name(string type,string name); //write the name of the component clicked name in the informations window 113 118 void write_comment(string comment); 114 119 void write_type(string t); 120 void erase_line(QLabel *l1, QLabel *l2);//erase a line in the informations window 121 void erase_comment();//erase and hide the comment line in the informations window 122 void display_param();//display the parameters 115 123 116 124 QList <Port> port_east; //ports lists … … 118 126 QList <Port> port_north; 119 127 QList <Port> port_south; 120 QList <Component> *compo; 121 122 QWidget *wparam;//windows widget (informations, parameters, open, save ...) 128 QList <Component> *compo;//component list 129 QList <Param> param;//parameters list 130 QList <Group> *group;//groups list 131 132 QWidget *wscroll; 133 QMainWindow *wparam;//windows widget (informations, parameters, quit, open) 123 134 QWidget *winfo; 124 QWidget *ws;125 135 QWidget *wq; 126 136 QWidget *wa; … … 130 140 QBoxLayout *informations; //informations box 131 141 QBoxLayout *parameters; //parameters box 142 QBoxLayout *pbox; 132 143 133 144 Parse *parse; //the parser … … 139 150 QPainter painter; 140 151 141 QStatusBar *status; 152 QStatusBar *status;//status bar 142 153 143 154 QLineEdit *file_name; //retrieve the name user wants to open from the open window … … 157 168 int window_height; //main window size 158 169 int window_width; 159 int margeX;//size of the marge160 int margeY;161 170 int portX;//port size, position and size of components, used when drawing the architecture 162 171 int portY; 163 int posX; 172 int posX;//used to retrieve the position and the size of a component 164 173 int posY; 165 174 int tailleX; 166 175 int tailleY; 167 176 168 int cpt_level; 169 QString tab[ 50];177 int cpt_level;//level in the architecture 178 QString tab[20];//save the father when user change the level 170 179 171 180 QString father;//father name 172 181 QString current;//name of the current architecture visible 173 182 183 QScrollArea *sc; 184 174 185 bool save_as; 175 bool first_save;176 186 bool info_open; //know if the informations window opened or not 177 187 bool param_open; //know if the parameters window opened or not … … 187 197 bool mess_open;//chargment message box opened or not 188 198 bool component_clicked;//if user clicked on a component to modify its parameters 189 190 199 bool apply_display;//if the apply button is displayed 200 bool scroll_hide; 201 bool parameter_modify; 191 202 }; 192 203 }; -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_about_actions.cpp
r21 r32 6 6 using namespace morpheo::tools::viewer::graphics; 7 7 8 8 /*about window constructor*/ 9 9 void Window::_about(){ 10 10 QMessageBox *mess = new QMessageBox(this); -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_drawAll.cpp
r30 r32 13 13 QString t; 14 14 15 15 16 if(paint){ 17 /*draw the main component*/ 16 18 painter.begin(this); 17 19 painter.setPen(Qt::blue); 18 20 painter.drawRect(MARGEX,MARGEY,MARGEX+450,MARGEY+450); 21 22 Entity *e = p.getEntity(); 23 string s; 24 s.append(e->getName()); 25 s.append(" : "); 26 s.append(e->getType()); 27 painter.setPen(Qt::black); 28 painter.drawText(50,10,500,60,Qt::AlignCenter,QString::fromStdString(s)); 29 painter.setPen(Qt::blue); 19 30 20 31 /*draw the ports of the main component*/ 21 32 for(QList<Port>::iterator it=port_east.begin(); it!=port_east.end(); ++it){ 22 33 portX = it->get_x(); … … 43 54 portX = it->get_x() ; 44 55 portY = it->get_y() ; 45 drawPort(portX + MARGEX,portY+ MARGEY,SOUTH,it->getDirection());56 drawPort(portX + MARGEX,portY+ MARGEY + 20 ,SOUTH,it->getDirection()); 46 57 47 58 } 48 59 60 /*draw the components inside the main component*/ 49 61 if(p.getArchitecture()!=NULL){ 50 62 compo = p.getComponent(); … … 61 73 schema=tp.getSchema(); 62 74 switch(schema){ 63 case 0: 75 case 0://a basic element 64 76 painter.drawRect(posX,posY,tailleX,tailleY); 65 77 break; 66 case 1: 78 case 1://a combinatoire element 67 79 painter.drawEllipse(posX,posY,tailleX,tailleY); 68 80 break; 69 case 2: 81 case 2://a FIFO 70 82 painter.drawRect(posX,posY,tailleX,tailleY); 71 83 painter.drawLine(posX+tailleX/4,posY+tailleY,posX+tailleX/4,posY); … … 73 85 painter.drawLine(posX+3*tailleX/4,posY+tailleY,posX+3*tailleX/4,posY); 74 86 break; 75 case 3: 87 case 3://a register 76 88 painter.drawRect(posX,posY,tailleX,tailleY); 77 89 painter.drawLine(posX,posY+tailleY,posX+tailleX/2,posY+tailleY/2); … … 83 95 if (componentName){ 84 96 QString compo_name = QString::fromStdString(it->getName()); 85 painter.drawText(posX , posY + tailleY/2,compo_name);97 painter.drawText(posX - compo_name.size()/2 , posY + tailleY/2,compo_name); 86 98 } 99 100 /*draw the ports of the inside components*/ 87 101 Coord *co2=new Coord( co->get_hg_x() + tailleX/2, co->get_hg_y() + tailleY/2,tailleX/2,tailleY/2); 88 102 … … 124 138 QList<PortMap> *pm=it->getPortMap(); 125 139 140 /*draw the signals*/ 126 141 for (QList<PortMap>::iterator it3=pm->begin();it3!=pm->end();++it3) 127 142 { -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_drawPort.cpp
r20 r32 5 5 using namespace morpheo::tools::viewer::graphics; 6 6 7 /*draw the port in rectangular form*/ 7 8 void Window::drawPort(int x,int y,int pos,string dir){ 8 9 if(pos == NORTH){ -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_file_actions.cpp
r30 r32 9 9 /*signals actions implementation*/ 10 10 11 /*open function*/ 11 12 void Window::_open(){ 12 13 QString current2; 13 14 if(!file_open && is_save){//if no file open or if the file opened has been saved -> open other file, else -> ask for saving file 14 15 current2 = QFileDialog::getOpenFileName(this,"", "./data"); 16 this->setDisabled(true); 17 /*if a file has been opened*/ 15 18 if(current2!=""){ 16 this->setDisabled(true);17 19 current_name = current2; 18 20 if(parse->open_file( current_name.toStdString(),0)==-1) … … 54 56 } 55 57 58 /*initialize the database when a file has been opened*/ 56 59 void Window::_init_file(){ 57 60 is_save = true; 58 61 base = parse->getBaseV();//parse the base and open the file 59 #ifdef DEBUG_ALL62 //#ifdef DEBUG_ALL 60 63 base->afficheBaseConsole(); 61 #endif64 //#endif 62 65 cpt_level = 0; 63 66 … … 75 78 paint = true; 76 79 repaint(); 80 display_param(); 77 81 this->setDisabled(false); 78 82 setMouseTracking(true); 79 83 } 80 84 85 /*if user entered a wrong file name*/ 81 86 void Window::_open_error(){ 82 87 QMessageBox *error = new QMessageBox(this); … … 84 89 error->addButton("ok",QMessageBox::YesRole); 85 90 error->show(); 91 this->setDisabled(false); 86 92 } 87 93 88 94 /*save functions*/ 89 95 void Window::_save(){ 90 96 if(file_open){ 91 97 if (wa_open) 92 98 wa->close(); 93 if(save_as || first_save || (current_name==NULL)){//if "save as" or if it's the first time the user click on save (new file) -> save as99 if(save_as){//if "save as" 94 100 current_name = QFileDialog::getSaveFileName(this,"","./data"); 95 101 save_as = false; 96 first_save = false;102 parse->save_file(current_name.toStdString(),0); 97 103 } 98 104 else { 99 status->showMessage("file " + current_name + " saved",900); 105 parse->save_file(current.toStdString(),0); 106 status->showMessage("file " + current + " saved",900); 100 107 is_save = true;//file saved 101 108 } … … 133 140 } 134 141 142 /*close function*/ 135 143 void Window::_close(){ 136 144 paint = false; 145 repaint(); 137 146 parse->closeBaseV(); 138 lname->setText(""); 139 ln->setText(""); 140 lt->setText(""); 141 write_name(""); 142 write_comment(""); 143 comment->hide(); 147 erase_line(ln,lname); 148 erase_line(lt,ltype); 149 erase_comment(); 144 150 winfo->show(); 151 wscroll->hide(); 152 scroll_hide = true; 153 wparam->show(); 145 154 file_open = false; 146 repaint();147 155 } 148 156 157 /*quit functions*/ 149 158 void Window::_quit(){ 150 159 //if the file is not saved -> ask to the user if he wants to save it. If yes -> save, else quit. … … 171 180 _quit2(); 172 181 } 173 182 /*close all the windows opened*/ 174 183 void Window::_quit2(){ 175 184 /*test if there are windows (other than the main window) opened*/ -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_informations_window.cpp
r30 r32 7 7 using namespace morpheo::tools::viewer::graphics; 8 8 9 /*informations window constructor*/ 9 10 void Window::winformations() 10 11 { … … 12 13 informations = new QBoxLayout(QBoxLayout::TopToBottom,0); 13 14 winfo->setWindowTitle("informations"); 14 winfo->setFixedSize(3 50,292);15 winfo->setFixedSize(370,180); 15 16 winfo->move(628,50); 17 16 18 19 /*name line*/ 17 20 QBoxLayout *bname = new QBoxLayout(QBoxLayout::LeftToRight,0); 18 21 ln = new QLabel(); … … 23 26 bname->addWidget(lname); 24 27 28 /*type line*/ 25 29 QBoxLayout *btype = new QBoxLayout(QBoxLayout::LeftToRight,0); 26 30 lt = new QLabel(); … … 30 34 btype->addWidget(lt); 31 35 btype->addWidget(ltype); 32 36 37 /*comment line*/ 33 38 comment = new QLineEdit(); 34 39 comment->setText(""); 35 40 comment->setReadOnly(true); 36 41 42 /*buttons*/ 37 43 QPushButton *noselect = new QPushButton("cancel selection",wparam); 38 44 QPushButton *back = new QPushButton("back",wparam); … … 50 56 } 51 57 58 /*write the comment of the componenet selected*/ 52 59 void Window::write_comment(string cm){ 53 60 QString c = QString::fromStdString(cm); 54 61 comment->setText(c); 62 comment->setCursorPosition(1); 55 63 comment->show(); 56 64 } 57 65 58 void Window::write_name(string name){ 59 QString n = QString::fromStdString(name); 60 lname->setText(n); 66 void Window::erase_comment(){ 67 comment->setText(""); 68 comment->hide(); 69 } 70 /*write the name of the component selected*/ 71 void Window::write_name(string type,string name){ 72 QString n = QString::fromStdString(type); 73 ln->setText(n); 74 QString n2 = QString::fromStdString(name); 75 lname->setText(n2); 61 76 } 62 77 78 void Window::erase_line(QLabel *l1, QLabel *l2){ 79 l1->setText(""); 80 l2->setText(""); 81 } 82 83 /*write the type of the component selected*/ 63 84 void Window::write_type(string type){ 64 85 lt->setText("type"); -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_main.cpp
r26 r32 16 16 int main (int argc, char* argv[]) 17 17 { 18 /*if to many arguments*/ 18 19 if(argc>2){ 19 20 cout << "error : argument must be a file name or nothing" << endl; … … 22 23 } 23 24 25 /*construct the base*/ 24 26 Parse *par = new Parse(); 25 27 26 28 /*create the window application*/ 27 29 QApplication *a=new QApplication (argc,argv); 28 30 29 if(argc == 2){31 if(argc == 2){ 30 32 if(par->open_file(argv[1],0)==-1){ 31 33 cout << "file doesn't exist or is not a valid format" << endl; -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_main_window.cpp
r30 r32 16 16 component_clicked = false; 17 17 cpt_level=0; 18 18 apply_display = false; 19 scroll_hide = false; 20 parameter_modify = false; 21 19 22 /*menu bar*/ 20 23 QMenuBar *menu_bar = new QMenuBar(this); … … 122 125 123 126 /*main window title*/ 124 this->setWindowTitle(" Viewer");127 this->setWindowTitle("Morpheo Viewer"); 125 128 126 129 /*parameters window creation*/ … … 145 148 /*file unsaved at init*/ 146 149 save_as = false; 147 first_save = false; //first_save = true for a new file148 150 149 151 current_name = name; -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_mouseEvent.cpp
r30 r32 6 6 using namespace morpheo::tools::viewer::graphics; 7 7 8 /*mouse press event handler*/ 8 9 void Window::mousePressEvent (QMouseEvent *e){ 9 10 if(paint && (p.getArchitecture() != NULL)){ … … 16 17 mouseY = mouseEvent->y(); 17 18 18 bool bc = false;19 bool bc,b3 = false; 19 20 int cx,cy,tx,ty; 20 string cc,nc,type;21 string s2,cc,nc,type,comm; 21 22 bool found = false; 22 23 24 /*search the component under the mouse focus*/ 23 25 for(QList<Component>::iterator it=compo->begin();it!=compo->end();++it){ 24 26 Coord *co = it->get_Position(); … … 28 30 int tailley = co->get_size_y(); 29 31 QString t=QString::fromStdString(it->getType()).toLower(); 32 /*go to the next level if comoponent doubleclicked*/ 30 33 if(e->type() == QMouseEvent::MouseButtonDblClick && e->button() == Qt::LeftButton){ 31 34 … … 66 69 paint = true; 67 70 repaint(); 68 write_name(""); 69 write_comment(""); 70 write_type(""); 71 ln->setText(""); 72 lt->setText(""); 73 comment->hide(); 71 erase_line(lt,ltype); 72 erase_line(ln,lname); 73 erase_comment(); 74 74 found = false; 75 75 this->setDisabled(false); 76 76 component_clicked = false; 77 77 } 78 78 /*search and display the informations of the component clicked*/ 79 79 if(e->type() == QMouseEvent::MouseButtonPress && e->button() == Qt::LeftButton){ 80 80 if(mouseX >= px + MARGEX && mouseY >= py +MARGEY && mouseX <= px+taillex + MARGEX && mouseY <= py+tailley + MARGEY) { … … 88 88 BaseP tp = base->get_BasePos(t.toStdString()); 89 89 if(&tp != NULL) 90 90 cc=tp.getComment(); 91 91 component_clicked = true; 92 } 93 94 for(QList<Port>::iterator it=port_east.begin(); it!=port_east.end(); ++it){ 95 portX = it->get_x(); 96 portY = it->get_y(); 97 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){ 98 b3 = true; 99 s2 = it->getName(); 100 comm = it->getComment(); 101 type = it->getDirection(); 102 } 103 } 104 105 for(QList<Port>::iterator it=port_west.begin(); it!=port_west.end(); ++it){ 106 portX = it->get_x() ; 107 portY = it->get_y() ; 108 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 + MARGEY){ 109 b3 = true; 110 s2 = it->getName(); 111 comm = it->getComment(); 112 type = it->getDirection(); 113 } 114 } 115 116 for(QList<Port>::iterator it=port_north.begin(); it!=port_north.end(); ++it){ 117 portX = it->get_x() ; 118 portY = it->get_y() ; 119 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 +MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 +MARGEY){ 120 b3 = true; 121 s2 = it->getName(); 122 type = it->getDirection(); 123 comm = it->getComment(); 124 } 125 } 126 127 for(QList<Port>::iterator it=port_south.begin(); it!=port_south.end(); ++it){ 128 portX = it->get_x() ; 129 portY = it->get_y() ; 130 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){ 131 b3 = true; 132 s2 = it->getName(); 133 comm = it->getComment(); 134 type = it->getDirection(); 135 } 92 136 } 93 137 } 94 138 } 95 139 if(bc){ 96 write_name( nc);140 write_name("component",nc); 97 141 write_type(type); 98 ln->setText("component");99 lt->setText("type");100 142 write_comment(cc); 143 } 144 if(b3){ 145 write_name("signal",s2); 146 write_type(type); 147 write_comment(comm); 148 component_clicked = true; 101 149 } 102 150 } 103 151 } 104 152 105 153 /*mouse move event handler*/ 106 154 void Window::mouseMoveEvent(QMouseEvent *e){ 107 155 bool b = false; … … 110 158 int px,py,taillex,tailley,ppx,ppy; 111 159 string s,s2,c,type; 112 113 if(paint && (p.getArchitecture() != NULL) && !component_clicked){ 114 115 compo = p.getComponent(); 116 117 QMouseEvent *mouseEvent = (QMouseEvent *) e; 118 119 mouseX = mouseEvent->x(); 120 mouseY = mouseEvent->y(); 121 122 for(QList<Component>::iterator it=compo->begin();it!=compo->end();++it){ 123 Coord *co = it->get_Position(); 124 px = co->get_hg_x(); 125 py = co->get_hg_y(); 126 taillex = co->get_size_x(); 127 tailley = co->get_size_y(); 128 QString t=QString::fromStdString(it->getType()).toLower(); 129 QList<PortMap> *pm=it->getPortMap(); 130 131 if(e->type() == QMouseEvent::MouseMove){ 132 if(mouseX >= px + MARGEX && mouseY >= py +MARGEY && mouseX <= px+taillex + MARGEX && mouseY <= py+tailley + MARGEY) { 133 b = true; 134 s = it->getName(); 135 type = it->getType(); 136 BaseP tp=base->get_BasePos(t.toStdString()); 137 if(&tp!=NULL) 138 c=tp.getComment(); 139 ppx = px; 140 ppy = py; 141 break; 142 } 143 else{ 144 for (QList<PortMap>::iterator it3=pm->begin();it3!=pm->end();++it3) { 145 Signal *sig=base->getSignal(&p,it->getName(),new PortMap(*it3)); 146 if(mouseX >= sig->get_src_x() - 15 + MARGEX && mouseY >= sig->get_src_y() - 15 + MARGEY && mouseX <= sig->get_src_x() + 15 + MARGEX && mouseY <= sig->get_src_y() + 15 +MARGEY){ 147 b2 = true; 148 s = it3->getName(); 149 break; 150 } 151 } 152 } 153 } 154 } 155 156 if(b){ 157 write_name(s); 158 write_type(type); 159 ln->setText("component"); 160 write_comment(c); 161 lt->setText("type"); 162 b3 = false; 163 b2 = false; 164 } 165 166 if(b2){ 167 write_name(s); 168 write_type(""); 169 lt->setText(""); 170 write_comment(""); 171 ln->setText("signal"); 172 comment->hide(); 173 b3 = false; 174 b = false; 175 } 176 177 if(!b && !b2){ 178 write_name(""); 179 write_type(""); 180 ln->setText(""); 181 lt->setText(""); 182 write_comment(""); 183 comment->hide(); 184 } 160 string comm; 161 162 if(paint && !component_clicked){ 163 if(p.getArchitecture() != NULL){ 164 165 compo = p.getComponent(); 166 167 QMouseEvent *mouseEvent = (QMouseEvent *) e; 168 169 mouseX = mouseEvent->x(); 170 mouseY = mouseEvent->y(); 171 172 /*display the component under the mouse focus*/ 173 for(QList<Component>::iterator it=compo->begin();it!=compo->end();++it){ 174 Coord *co = it->get_Position(); 175 px = co->get_hg_x(); 176 py = co->get_hg_y(); 177 taillex = co->get_size_x(); 178 tailley = co->get_size_y(); 179 QString t=QString::fromStdString(it->getType()).toLower(); 180 QList<PortMap> *pm=it->getPortMap(); 181 182 if(e->type() == QMouseEvent::MouseMove){ 183 if(mouseX >= px + MARGEX && mouseY >= py +MARGEY && mouseX <= px+taillex + MARGEX && mouseY <= py+tailley + MARGEY) { 184 b = true; 185 s = it->getName(); 186 type = it->getType(); 187 BaseP tp=base->get_BasePos(t.toStdString()); 188 if(&tp!=NULL) 189 c=tp.getComment(); 190 ppx = px; 191 ppy = py; 192 break; 193 } 194 else{ 195 for (QList<PortMap>::iterator it3=pm->begin();it3!=pm->end();++it3) { 196 Signal *sig=base->getSignal(&p,it->getName(),new PortMap(*it3)); 197 if(mouseX >= sig->get_src_x() - 15 + MARGEX && mouseY >= sig->get_src_y() - 15 + MARGEY && mouseX <= sig->get_src_x() + 15 + MARGEX && mouseY <= sig->get_src_y() + 15 +MARGEY){ 198 b2 = true; 199 s = it3->getName(); 200 break; 201 } 202 } 203 } 204 } 205 } 206 207 if(b){ 208 write_name("component",s); 209 write_type(type); 210 write_comment(c); 211 b3 = false; 212 b2 = false; 213 } 214 215 if(b2){ 216 write_name("signal",s); 217 erase_line(lt,ltype); 218 erase_comment(); 219 b3 = false; 220 b = false; 221 } 222 223 if(!b && !b2){ 224 erase_line(lt,ltype); 225 erase_line(ln,lname); 226 erase_comment(); 227 } 228 } 229 230 p=base->get_BasePos(current.toStdString()); 231 Entity *ent = p.getEntity(); 232 Coord *c = new Coord(250,250,250,250); 233 port_east = ent->getPortEast(c); 234 port_west = ent->getPortWest(c); 235 port_north = ent->getPortNorth(c); 236 port_south = ent->getPortSouth(c); 237 238 /*display the signal under the mouse focus*/ 239 for(QList<Port>::iterator it=port_east.begin(); it!=port_east.end(); ++it){ 240 portX = it->get_x(); 241 portY = it->get_y(); 242 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){ 243 b3 = true; 244 s2 = it->getName(); 245 comm = it->getComment(); 246 type = it->getDirection(); 247 } 248 } 249 250 for(QList<Port>::iterator it=port_west.begin(); it!=port_west.end(); ++it){ 251 portX = it->get_x() ; 252 portY = it->get_y() ; 253 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 + MARGEY){ 254 b3 = true; 255 s2 = it->getName(); 256 comm = it->getComment(); 257 type = it->getDirection(); 258 } 259 } 260 261 for(QList<Port>::iterator it=port_north.begin(); it!=port_north.end(); ++it){ 262 portX = it->get_x() ; 263 portY = it->get_y() ; 264 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 +MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 +MARGEY){ 265 b3 = true; 266 s2 = it->getName(); 267 comm = it->getComment(); 268 type = it->getDirection(); 269 } 270 } 271 272 for(QList<Port>::iterator it=port_south.begin(); it!=port_south.end(); ++it){ 273 portX = it->get_x() ; 274 portY = it->get_y() ; 275 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){ 276 b3 = true; 277 s2 = it->getName(); 278 comm = it->getComment(); 279 type = it->getDirection(); 280 } 281 } 282 if(b3){ 283 b = false; 284 erase_line(ln,lname); 285 write_type(type); 286 erase_comment(); 287 write_comment(comm); 288 write_name("signal",s2); 289 } 185 290 } 186 187 188 for(QList<Port>::iterator it=port_east.begin(); it!=port_east.end(); ++it){189 portX = it->get_x();190 portY = it->get_y();191 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){192 b3 = true;193 s2 = it->getName();194 }195 }196 197 for(QList<Port>::iterator it=port_west.begin(); it!=port_west.end(); ++it){198 portX = it->get_x() ;199 portY = it->get_y() ;200 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 + MARGEY){201 b3 = true;202 s2 = it->getName();203 }204 }205 206 for(QList<Port>::iterator it=port_north.begin(); it!=port_north.end(); ++it){207 portX = it->get_x() ;208 portY = it->get_y() ;209 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 +MARGEY && mouseX <= portX + 15 + MARGEX && mouseY <= portY + 15 +MARGEY){210 b3 = true;211 s2 = it->getName();212 }213 }214 215 for(QList<Port>::iterator it=port_south.begin(); it!=port_south.end(); ++it){216 portX = it->get_x() ;217 portY = it->get_y() ;218 if(mouseX >= portX - 15 + MARGEX && mouseY >= portY - 15 + MARGEY && mouseX <= portX + 15 +MARGEX && mouseY <= portY + 15 + MARGEY){219 b3 = true;220 s2 = it->getName();221 }222 }223 if(b3){224 b = false;225 write_name("");226 write_name(s2);227 write_type(type);228 ln->setText("signal");229 lt->setText("");230 write_comment("");231 comment->hide();232 }233 291 } 234 292 235 293 236 237 294 /*return to the previous level if back button has been clicked*/ 238 295 void Window::_back(){ 239 296 if(cpt_level==0){ -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_parameters_window.cpp
r30 r32 7 7 using namespace morpheo::tools::viewer::graphics; 8 8 9 /*parameters window constructor*/ 9 10 void Window::wparameters() 10 11 { 11 wparam = new QWidget(); 12 wparam = new QMainWindow(); 13 // wparam = new QWidget(); 12 14 parameters = new QBoxLayout(QBoxLayout::TopToBottom,0); 13 15 wparam->setWindowTitle("parameters"); 14 wparam->setFixedSize(350,300); 15 wparam->move(628,370); 16 17 18 QPushButton *apply = new QPushButton("apply",wparam); 19 connect(apply,SIGNAL(clicked()),this,SLOT(_apply())); 20 21 parameters->addWidget(apply); 22 16 wparam->setFixedSize(370,415); 17 wparam->move(628,255); 23 18 wparam->setLayout(parameters); 19 sc = new QScrollArea(wparam); 20 wscroll = new QWidget(); 21 sc->setWidgetResizable(false); 22 sc->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); 23 sc->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); 24 sc->setGeometry(2,2,365,410); 24 25 wparam->show(); 25 26 } 26 27 27 28 /*display the parameters*/ 29 void Window::display_param(){ 30 31 pbox = new QBoxLayout(QBoxLayout::TopToBottom,0); 32 33 string scpu; 34 string lgroup; 35 string sparam; 36 string ecart; 37 38 if(!apply_display){ 39 QPushButton *apply = new QPushButton("apply",wparam); 40 connect(apply,SIGNAL(clicked()),this,SLOT(_apply())); 41 apply->setFixedSize(310,25); 42 pbox->addWidget(apply); 43 apply_display = true; 44 } 45 46 /*top level name display*/ 47 QLabel *cpu = new QLabel(); 48 scpu.append("CPU : "); 49 scpu.append(parse->getTopLevelName()); 50 scpu.append(" \n"); 51 cpu ->setText(QString::fromStdString(scpu)); 52 cpu->setFixedSize(300,50); 53 pbox->addWidget(cpu); 54 55 /*architecture in tree view display*/ 56 group = base->getGroups(); 57 for(QList<Group>::iterator it=group->begin();it!=group->end();++it){ 58 QLabel *lg = new QLabel(); 59 lgroup = ""; 60 lg->setFixedSize(200,30); 61 ecart = ""; 62 if(it->getLevel() == 1) 63 ecart.append(" "); 64 if(it->getLevel() == 2) 65 ecart.append(" "); 66 if(it->getLevel() == 3) 67 ecart.append(" "); 68 if(it->getLevel() == 4) 69 ecart.append(" "); 70 if(it->getLevel() == 5) 71 ecart.append(" "); 72 lgroup.append(ecart); 73 lgroup.append("<"); 74 lgroup.append(it->getName()); 75 lgroup.append(">"); 76 lg->setText(QString::fromStdString(lgroup)); 77 pbox->addWidget(lg); 78 param = it->getParam(); 79 for(QList<Param>::iterator it2=param.begin();it2!=param.end();++it2){ 80 81 if(it2->getName() == "id"){ 82 QBoxLayout *b = new QBoxLayout(QBoxLayout::LeftToRight,0); 83 QLabel *l = new QLabel(); 84 QString st2 = " "; 85 QString st; 86 st2.append(QString::fromStdString(ecart)); 87 st2.append("nb_"); 88 st2.append(QString::fromStdString(it->getName())); 89 90 st.append("nb_"); 91 st.append(QString::fromStdString(it->getName())); 92 LimitParam lp = base->searchLimitParam(st.toStdString()); 93 94 QLabel *lab = new QLabel(); 95 QString s = " "; 96 s.append(QString::fromStdString(ecart)); 97 s.append(QString::fromStdString(it2->getName())); 98 s.append(" : "); 99 stringstream out; 100 string str; 101 out << it2->getValue(); 102 str = out.str(); 103 s.append(QString::fromStdString(str)); 104 lab->setText(s); 105 pbox->addWidget(lab); 106 l->setText(st2); 107 QSpinBox *spin = new QSpinBox(); 108 int min = lp.getMin(); 109 int max = lp.getMax(); 110 QString step = QString::fromStdString(lp.getStep()); 111 112 spin->setValue(base->nbGroup(it->getName())); 113 114 if(step.contains("+")){ 115 step = step.right(step.length()-1); 116 int pas = step.toInt(0,10); 117 spin->setMinimum(min); 118 spin->setMaximum(max); 119 spin->setSingleStep(pas); 120 } 121 122 if(step.contains("*")){ 123 step = step.right(step.length()-1); 124 int pas = step.toInt(0,10); 125 spin->setMinimum(min); 126 spin->setMaximum(max); 127 spin->setSingleStep(pas); 128 } 129 spin->setFixedSize(60,30); 130 131 QString name_obj = (QString::fromStdString(it->getName())); 132 spin->setObjectName(name_obj); 133 134 b->addWidget(l); 135 b->addWidget(spin); 136 pbox->addLayout(b); 137 138 connect(spin,SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int))); 139 140 } 141 else{ 142 QBoxLayout *b = new QBoxLayout(QBoxLayout::LeftToRight,0); 143 QLabel *l = new QLabel(); 144 sparam =" "; 145 sparam.append(ecart); 146 sparam.append(it2->getName()); 147 sparam.append(" : "); 148 stringstream out; 149 string str; 150 out << it2->getValue(); 151 str = out.str(); 152 sparam.append(str); 153 l->setText(QString::fromStdString(sparam)); 154 l->setFixedSize(200,30); 155 parameters->addWidget(l); 156 QComboBox *cb = new QComboBox(); 157 LimitParam lp = base->searchLimitParam(it2->getName()); 158 int min = lp.getMin(); 159 int max = lp.getMax(); 160 QString step = QString::fromStdString(lp.getStep()); 161 int value = min; 162 if(step.contains("+")){ 163 step = step.right(step.length()-1); 164 int pas = step.toInt(0,10); 165 while(value!=max+pas){ 166 stringstream out2; 167 string str2; 168 out2 << value; 169 str2 = out2.str(); 170 cb->addItem(QString::fromStdString(str2)); 171 value = value+pas; 172 } 173 } 174 if(step.contains("*")){ 175 step = step.right(step.length()-1); 176 int pas = step.toInt(0,10); 177 while(value!=max*pas){ 178 stringstream out2; 179 string str2; 180 out2 << value; 181 str2 = out2.str(); 182 cb->addItem(QString::fromStdString(str2)); 183 value = value*pas; 184 } 185 } 186 stringstream out3; 187 string str3; 188 out3 << it2->getValue(); 189 str3 = out3.str(); 190 int index = cb->findText(QString::fromStdString(str3)); 191 cb->setCurrentIndex(index); 192 cb->setFixedSize(60,30); 193 //QPushButton *pb = new QPushButton(); 194 //pb->setText("change"); 195 QString name_obj = (QString::fromStdString(it->getName())); 196 name_obj.append(":"); 197 name_obj.append( QString::fromStdString(it2->getName())); 198 name_obj.append(":"); 199 name_obj.append(cb->currentText()); 200 cb->setObjectName(name_obj); 201 //cb->setFixedSize(60,30); 202 QString new_value = cb->currentText(); 203 connect(cb,SIGNAL(currentIndexChanged(QString)),this,SLOT(currentIndexChanged(QString))); 204 //connect(pb,SIGNAL(clicked()),this,SLOT(_change_value())); 205 b->addWidget(l); 206 b->addWidget(cb); 207 //b->addWidget(pb); 208 pbox->addLayout(b); 209 } 210 } 211 } 212 213 wscroll->setLayout(pbox); 214 parameters->addWidget(wscroll); 215 sc->setWidget(wscroll); 216 if(scroll_hide){ 217 scroll_hide = false; 218 wscroll->show(); 219 } 220 } 221 222 void Window::currentIndexChanged(QString value2){ 223 //cout << QObject::sender()->objectName().toStdString() << endl; 224 225 QString obj = QObject::sender()->objectName(); 226 227 int i,j,v; 228 QString param,group,value; 229 i = obj.indexOf(":"); 230 group = obj.left(i); 231 //cout << "group : " << group.toStdString() << endl; 232 j = obj.indexOf(":",i+1); 233 value = obj.right(obj.size() - j - 1); 234 v = value2.toInt(0,10); 235 cout << "value : " << v << endl; 236 param = obj.section(":",1,1); 237 //cout << "param : " << param.toStdString() << endl; 238 239 base->modifyValue(group.toStdString(),param.toStdString(),v); 240 wparam->close(); 241 apply_display = false; 242 wparameters(); 243 display_param(); 244 parameter_modify = true; 245 } 246 247 248 void Window::valueChanged(int i){ 249 250 //cout << QObject::sender()->objectName().toStdString() << endl; 251 252 QString obj = QObject::sender()->objectName(); 253 int v,j; 254 //cout << "name : " << obj.toStdString() << endl; 255 v = i; 256 //cout << "value : " << v << endl; 257 258 j = base->nbGroup(obj.toStdString()); 259 v = v - j; 260 cout << "value : " << v << " " << j<< endl; 261 if(base->modifyGroup(obj.toStdString(),v)==-1){ 262 cout << "error" << endl; 263 exit(1); 264 } 265 wparam->close(); 266 apply_display = false; 267 wparameters(); 268 parameter_modify = true; 269 display_param(); 270 // base->afficheParamConsole(); 271 } 272 273 /*apply the parameters changes*/ 28 274 void Window::_apply(){ 29 cout << "apply\n"; 30 } 275 if(!parameter_modify){ 276 QMessageBox *m = new QMessageBox(wparam); 277 m->setText("no parameter changed"); 278 m->addButton("ok",QMessageBox::YesRole); 279 m->show(); 280 } 281 else{ 282 parameter_modify = false; 283 cout << "apply\n"; 284 } 285 } -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_tools_actions.cpp
r21 r32 6 6 using namespace morpheo::tools::viewer::graphics; 7 7 8 /*zoom functions*/ 8 9 void Window::_zoomIn(){ 9 10 cout << "zoom in" << endl; … … 22 23 } 23 24 25 /*open or close the informations window*/ 24 26 void Window::_informations(){ 25 27 if(!info_open){//if the informations window is not open, open it,else close it … … 33 35 } 34 36 37 /*open or close the parameters window*/ 35 38 void Window::_parameters(){//if the parameteres window is not open, open it,else close it 36 39 if(!param_open){ 37 40 this->wparameters(); 38 41 param_open = true; 42 if(info_open){ 43 apply_display = false; 44 display_param(); 45 } 39 46 } 40 47 else{ … … 44 51 } 45 52 53 /*display or hide the components name*/ 46 54 void Window::_component_name(){ 47 55 … … 54 62 } 55 63 64 /*display or hide the signals name*/ 56 65 void Window::_signal_name(){ 57 66 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Makefile
r26 r32 1 1 ############################################################################# 2 2 # Makefile for building: bin/Viewer 3 # Generated by qmake (2.01a) (Qt 4.2.2) on: Sun May 20 18:09:0820073 # Generated by qmake (2.01a) (Qt 4.2.2) on: Wed May 30 11:19:29 2007 4 4 # Project: Viewer.pro 5 5 # Template: app app … … 56 56 Bdd/src/BaseV_accessors.cpp \ 57 57 Bdd/src/BaseV_addBaseP.cpp \ 58 Bdd/src/BaseV_addParam.cpp \59 58 Bdd/src/BaseV_afficheBaseConsole.cpp \ 59 Bdd/src/BaseV_afficheParamConsole.cpp \ 60 Bdd/src/BaseV_afficheLimitParamConsole.cpp \ 60 61 Bdd/src/BaseV_alloc.cpp \ 61 62 Bdd/src/BaseV_searchComponent.cpp \ … … 92 93 Bdd/src/ListePorts_accessors.cpp \ 93 94 Bdd/src/ListePorts_searchPort.cpp \ 95 Bdd/src/LimitParam_accessors.cpp \ 96 Bdd/src/LimitParam_unalloc.cpp \ 97 Bdd/src/LimitParam_alloc.cpp \ 98 Bdd/src/BaseV_searchGroup.cpp \ 99 Bdd/src/BaseV_addGroup.cpp \ 100 Bdd/src/BaseV_addLink.cpp \ 101 Bdd/src/BaseV_searchLimitParam.cpp \ 102 Bdd/src/BaseV_addLimitParam.cpp \ 103 Bdd/src/BaseV_modify.cpp \ 104 Bdd/src/Group_accessors.cpp \ 105 Bdd/src/Group_alloc.cpp \ 106 Bdd/src/Group_addParam.cpp \ 107 Bdd/src/Group_unalloc.cpp \ 108 Bdd/src/Param_accessors.cpp \ 109 Bdd/src/Param_alloc.cpp \ 110 Bdd/src/Param_unalloc.cpp \ 111 Parser/src/Parse_createParam.cpp \ 94 112 Parser/src/Parse_alloc.cpp \ 113 Parser/src/Parse_save.cpp \ 95 114 Parser/src/Parse_closeBaseV.cpp \ 96 115 Parser/src/Parse_accessors.cpp \ … … 99 118 Parser/src/Parse_unalloc.cpp \ 100 119 Parser/src/Parse_open_file.cpp \ 120 Parser/src/Parse_open_file_param.cpp \ 121 Parser/src/Parse_parser_param.cpp \ 122 Parser/src/Parse_parser_limitparam.cpp \ 101 123 Graphics/src/Graphics_main.cpp \ 102 124 Graphics/src/Graphics_file_actions.cpp \ … … 120 142 obj/BaseV_accessors.o \ 121 143 obj/BaseV_addBaseP.o \ 122 obj/BaseV_addParam.o \123 144 obj/BaseV_afficheBaseConsole.o \ 145 obj/BaseV_afficheParamConsole.o \ 146 obj/BaseV_afficheLimitParamConsole.o \ 124 147 obj/BaseV_alloc.o \ 125 148 obj/BaseV_searchComponent.o \ … … 156 179 obj/ListePorts_accessors.o \ 157 180 obj/ListePorts_searchPort.o \ 181 obj/LimitParam_accessors.o \ 182 obj/LimitParam_unalloc.o \ 183 obj/LimitParam_alloc.o \ 184 obj/BaseV_searchGroup.o \ 185 obj/BaseV_addGroup.o \ 186 obj/BaseV_addLink.o \ 187 obj/BaseV_searchLimitParam.o \ 188 obj/BaseV_addLimitParam.o \ 189 obj/BaseV_modify.o \ 190 obj/Group_accessors.o \ 191 obj/Group_alloc.o \ 192 obj/Group_addParam.o \ 193 obj/Group_unalloc.o \ 194 obj/Param_accessors.o \ 195 obj/Param_alloc.o \ 196 obj/Param_unalloc.o \ 197 obj/Parse_createParam.o \ 158 198 obj/Parse_alloc.o \ 199 obj/Parse_save.o \ 159 200 obj/Parse_closeBaseV.o \ 160 201 obj/Parse_accessors.o \ … … 163 204 obj/Parse_unalloc.o \ 164 205 obj/Parse_open_file.o \ 206 obj/Parse_open_file_param.o \ 207 obj/Parse_parser_param.o \ 208 obj/Parse_parser_limitparam.o \ 165 209 obj/Graphics_main.o \ 166 210 obj/Graphics_file_actions.o \ … … 268 312 dist: 269 313 @$(CHK_DIR_EXISTS) obj/Viewer1.0.0 || $(MKDIR) obj/Viewer1.0.0 270 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/Viewer1.0.0/ && $(COPY_FILE) --parents Bdd/include/Architecture.h Bdd/include/BaseP.h Bdd/include/BaseV.h Bdd/include/Component.h Bdd/include/Coord.h Bdd/include/Entity.h Bdd/include/ ListePorts.h Bdd/include/Port.h Bdd/include/PortMap.h Bdd/include/Signal.h Graphics/include/window.h Parser/include/parser.h obj/Viewer1.0.0/ && $(COPY_FILE) --parents Bdd/src/Architecture_accessors.cpp Bdd/src/BaseP_accessors.cpp Bdd/src/Architecture_addComponent.cpp Bdd/src/Architecture_alloc.cpp Bdd/src/Architecture_searchComponent.cpp Bdd/src/Architecture_unalloc.cpp Bdd/src/BaseP_alloc.cpp Bdd/src/BaseP_unalloc.cpp Bdd/src/BaseV_accessors.cpp Bdd/src/BaseV_addBaseP.cpp Bdd/src/BaseV_addParam.cpp Bdd/src/BaseV_afficheBaseConsole.cpp Bdd/src/BaseV_alloc.cpp Bdd/src/BaseV_searchComponent.cpp Bdd/src/BaseV_unalloc.cpp Bdd/src/Component_accessors.cpp Bdd/src/Component_addPortMap.cpp Bdd/src/Component_alloc.cpp Bdd/src/Component_getPosition.cpp Bdd/src/Component_unalloc.cpp Bdd/src/Coord_alloc.cpp Bdd/src/Coord_unalloc.cpp Bdd/src/Signal_unalloc.cpp Bdd/src/ListePorts_getPortSouth.cpp Bdd/src/Port_accessors.cpp Bdd/src/Signal_alloc.cpp Bdd/src/Port_alloc.cpp Bdd/src/Signal_accessors.cpp Bdd/src/Coord_accessors.cpp Bdd/src/Port_unalloc.cpp Bdd/src/ListePorts_getPortEast.cpp Bdd/src/BaseV_getSignal.cpp Bdd/src/PortMap_alloc.cpp Bdd/src/Entity_alloc.cpp Bdd/src/PortMap_unalloc.cpp Bdd/src/ListePorts_alloc.cpp Bdd/src/PortMap_accessors.cpp Bdd/src/ListePorts_unalloc.cpp Bdd/src/ListePorts_countPort.cpp Bdd/src/ListePorts_getPortWest.cpp Bdd/src/Entity_unalloc.cpp Bdd/src/ListePorts_getPortNorth.cpp Bdd/src/Entity_accessors.cpp Bdd/src/ListePorts_addPort.cpp Bdd/src/ListePorts_accessors.cpp Bdd/src/ListePorts_searchPort.cpp Parser/src/Parse_alloc.cpp Parser/src/Parse_closeBaseV.cpp Parser/src/Parse_accessors.cpp Parser/src/Parse_parser_pos.cpp Parser/src/Parse_getBaseV.cpp Parser/src/Parse_unalloc.cpp Parser/src/Parse_open_file.cpp Graphics/src/Graphics_main.cpp Graphics/src/Graphics_file_actions.cpp Graphics/src/Graphics_tools_actions.cpp Graphics/src/Graphics_about_actions.cpp Graphics/src/Graphics_main_window.cpp Graphics/src/Graphics_informations_window.cpp Graphics/src/Graphics_drawPort.cpp Graphics/src/Graphics_parameters_window.cpp Graphics/src/Graphics_setParse.cpp Graphics/src/Graphics_drawAll.cpp Graphics/src/Graphics_mouseEvent.cpp obj/Viewer1.0.0/ && (cd `dirname obj/Viewer1.0.0` && $(TAR) Viewer1.0.0.tar Viewer1.0.0 && $(COMPRESS) Viewer1.0.0.tar) && $(MOVE) `dirname obj/Viewer1.0.0`/Viewer1.0.0.tar.gz . && $(DEL_FILE) -r obj/Viewer1.0.0314 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/Viewer1.0.0/ && $(COPY_FILE) --parents Bdd/include/Architecture.h Bdd/include/BaseP.h Bdd/include/BaseV.h Bdd/include/Component.h Bdd/include/Coord.h Bdd/include/Entity.h Bdd/include/Group.h Bdd/include/LimitParam.h Bdd/include/ListePorts.h Bdd/include/Param.h Bdd/include/Port.h Bdd/include/PortMap.h Bdd/include/Signal.h Graphics/include/window.h Parser/include/parser.h obj/Viewer1.0.0/ && $(COPY_FILE) --parents Bdd/src/Architecture_accessors.cpp Bdd/src/BaseP_accessors.cpp Bdd/src/Architecture_addComponent.cpp Bdd/src/Architecture_alloc.cpp Bdd/src/Architecture_searchComponent.cpp Bdd/src/Architecture_unalloc.cpp Bdd/src/BaseP_alloc.cpp Bdd/src/BaseP_unalloc.cpp Bdd/src/BaseV_accessors.cpp Bdd/src/BaseV_addBaseP.cpp Bdd/src/BaseV_afficheBaseConsole.cpp Bdd/src/BaseV_afficheParamConsole.cpp Bdd/src/BaseV_afficheLimitParamConsole.cpp Bdd/src/BaseV_alloc.cpp Bdd/src/BaseV_searchComponent.cpp Bdd/src/BaseV_unalloc.cpp Bdd/src/Component_accessors.cpp Bdd/src/Component_addPortMap.cpp Bdd/src/Component_alloc.cpp Bdd/src/Component_getPosition.cpp Bdd/src/Component_unalloc.cpp Bdd/src/Coord_alloc.cpp Bdd/src/Coord_unalloc.cpp Bdd/src/Signal_unalloc.cpp Bdd/src/ListePorts_getPortSouth.cpp Bdd/src/Port_accessors.cpp Bdd/src/Signal_alloc.cpp Bdd/src/Port_alloc.cpp Bdd/src/Signal_accessors.cpp Bdd/src/Coord_accessors.cpp Bdd/src/Port_unalloc.cpp Bdd/src/ListePorts_getPortEast.cpp Bdd/src/BaseV_getSignal.cpp Bdd/src/PortMap_alloc.cpp Bdd/src/Entity_alloc.cpp Bdd/src/PortMap_unalloc.cpp Bdd/src/ListePorts_alloc.cpp Bdd/src/PortMap_accessors.cpp Bdd/src/ListePorts_unalloc.cpp Bdd/src/ListePorts_countPort.cpp Bdd/src/ListePorts_getPortWest.cpp Bdd/src/Entity_unalloc.cpp Bdd/src/ListePorts_getPortNorth.cpp Bdd/src/Entity_accessors.cpp Bdd/src/ListePorts_addPort.cpp Bdd/src/ListePorts_accessors.cpp Bdd/src/ListePorts_searchPort.cpp Bdd/src/LimitParam_accessors.cpp Bdd/src/LimitParam_unalloc.cpp Bdd/src/LimitParam_alloc.cpp Bdd/src/BaseV_searchGroup.cpp Bdd/src/BaseV_addGroup.cpp Bdd/src/BaseV_addLink.cpp Bdd/src/BaseV_searchLimitParam.cpp Bdd/src/BaseV_addLimitParam.cpp Bdd/src/BaseV_modify.cpp Bdd/src/Group_accessors.cpp Bdd/src/Group_alloc.cpp Bdd/src/Group_addParam.cpp Bdd/src/Group_unalloc.cpp Bdd/src/Param_accessors.cpp Bdd/src/Param_alloc.cpp Bdd/src/Param_unalloc.cpp Parser/src/Parse_createParam.cpp Parser/src/Parse_alloc.cpp Parser/src/Parse_save.cpp Parser/src/Parse_closeBaseV.cpp Parser/src/Parse_accessors.cpp Parser/src/Parse_parser_pos.cpp Parser/src/Parse_getBaseV.cpp Parser/src/Parse_unalloc.cpp Parser/src/Parse_open_file.cpp Parser/src/Parse_open_file_param.cpp Parser/src/Parse_parser_param.cpp Parser/src/Parse_parser_limitparam.cpp Graphics/src/Graphics_main.cpp Graphics/src/Graphics_file_actions.cpp Graphics/src/Graphics_tools_actions.cpp Graphics/src/Graphics_about_actions.cpp Graphics/src/Graphics_main_window.cpp Graphics/src/Graphics_informations_window.cpp Graphics/src/Graphics_drawPort.cpp Graphics/src/Graphics_parameters_window.cpp Graphics/src/Graphics_setParse.cpp Graphics/src/Graphics_drawAll.cpp Graphics/src/Graphics_mouseEvent.cpp obj/Viewer1.0.0/ && (cd `dirname obj/Viewer1.0.0` && $(TAR) Viewer1.0.0.tar Viewer1.0.0 && $(COMPRESS) Viewer1.0.0.tar) && $(MOVE) `dirname obj/Viewer1.0.0`/Viewer1.0.0.tar.gz . && $(DEL_FILE) -r obj/Viewer1.0.0 271 315 272 316 … … 342 386 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_addBaseP.o Bdd/src/BaseV_addBaseP.cpp 343 387 344 obj/BaseV_addParam.o: Bdd/src/BaseV_addParam.cpp345 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_addParam.o Bdd/src/BaseV_addParam.cpp346 347 388 obj/BaseV_afficheBaseConsole.o: Bdd/src/BaseV_afficheBaseConsole.cpp 348 389 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_afficheBaseConsole.o Bdd/src/BaseV_afficheBaseConsole.cpp 349 390 391 obj/BaseV_afficheParamConsole.o: Bdd/src/BaseV_afficheParamConsole.cpp 392 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_afficheParamConsole.o Bdd/src/BaseV_afficheParamConsole.cpp 393 394 obj/BaseV_afficheLimitParamConsole.o: Bdd/src/BaseV_afficheLimitParamConsole.cpp 395 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_afficheLimitParamConsole.o Bdd/src/BaseV_afficheLimitParamConsole.cpp 396 350 397 obj/BaseV_alloc.o: Bdd/src/BaseV_alloc.cpp 351 398 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_alloc.o Bdd/src/BaseV_alloc.cpp … … 450 497 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ListePorts_searchPort.o Bdd/src/ListePorts_searchPort.cpp 451 498 499 obj/LimitParam_accessors.o: Bdd/src/LimitParam_accessors.cpp 500 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/LimitParam_accessors.o Bdd/src/LimitParam_accessors.cpp 501 502 obj/LimitParam_unalloc.o: Bdd/src/LimitParam_unalloc.cpp 503 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/LimitParam_unalloc.o Bdd/src/LimitParam_unalloc.cpp 504 505 obj/LimitParam_alloc.o: Bdd/src/LimitParam_alloc.cpp 506 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/LimitParam_alloc.o Bdd/src/LimitParam_alloc.cpp 507 508 obj/BaseV_searchGroup.o: Bdd/src/BaseV_searchGroup.cpp 509 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_searchGroup.o Bdd/src/BaseV_searchGroup.cpp 510 511 obj/BaseV_addGroup.o: Bdd/src/BaseV_addGroup.cpp 512 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_addGroup.o Bdd/src/BaseV_addGroup.cpp 513 514 obj/BaseV_addLink.o: Bdd/src/BaseV_addLink.cpp 515 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_addLink.o Bdd/src/BaseV_addLink.cpp 516 517 obj/BaseV_searchLimitParam.o: Bdd/src/BaseV_searchLimitParam.cpp 518 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_searchLimitParam.o Bdd/src/BaseV_searchLimitParam.cpp 519 520 obj/BaseV_addLimitParam.o: Bdd/src/BaseV_addLimitParam.cpp 521 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_addLimitParam.o Bdd/src/BaseV_addLimitParam.cpp 522 523 obj/BaseV_modify.o: Bdd/src/BaseV_modify.cpp 524 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/BaseV_modify.o Bdd/src/BaseV_modify.cpp 525 526 obj/Group_accessors.o: Bdd/src/Group_accessors.cpp 527 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Group_accessors.o Bdd/src/Group_accessors.cpp 528 529 obj/Group_alloc.o: Bdd/src/Group_alloc.cpp 530 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Group_alloc.o Bdd/src/Group_alloc.cpp 531 532 obj/Group_addParam.o: Bdd/src/Group_addParam.cpp 533 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Group_addParam.o Bdd/src/Group_addParam.cpp 534 535 obj/Group_unalloc.o: Bdd/src/Group_unalloc.cpp 536 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Group_unalloc.o Bdd/src/Group_unalloc.cpp 537 538 obj/Param_accessors.o: Bdd/src/Param_accessors.cpp 539 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Param_accessors.o Bdd/src/Param_accessors.cpp 540 541 obj/Param_alloc.o: Bdd/src/Param_alloc.cpp 542 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Param_alloc.o Bdd/src/Param_alloc.cpp 543 544 obj/Param_unalloc.o: Bdd/src/Param_unalloc.cpp 545 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Param_unalloc.o Bdd/src/Param_unalloc.cpp 546 547 obj/Parse_createParam.o: Parser/src/Parse_createParam.cpp 548 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_createParam.o Parser/src/Parse_createParam.cpp 549 452 550 obj/Parse_alloc.o: Parser/src/Parse_alloc.cpp 453 551 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_alloc.o Parser/src/Parse_alloc.cpp 454 552 553 obj/Parse_save.o: Parser/src/Parse_save.cpp 554 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_save.o Parser/src/Parse_save.cpp 555 455 556 obj/Parse_closeBaseV.o: Parser/src/Parse_closeBaseV.cpp 456 557 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_closeBaseV.o Parser/src/Parse_closeBaseV.cpp … … 471 572 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_open_file.o Parser/src/Parse_open_file.cpp 472 573 574 obj/Parse_open_file_param.o: Parser/src/Parse_open_file_param.cpp 575 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_open_file_param.o Parser/src/Parse_open_file_param.cpp 576 577 obj/Parse_parser_param.o: Parser/src/Parse_parser_param.cpp 578 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_parser_param.o Parser/src/Parse_parser_param.cpp 579 580 obj/Parse_parser_limitparam.o: Parser/src/Parse_parser_limitparam.cpp 581 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Parse_parser_limitparam.o Parser/src/Parse_parser_limitparam.cpp 582 473 583 obj/Graphics_main.o: Graphics/src/Graphics_main.cpp Graphics/include/window.h 474 584 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/Graphics_main.o Graphics/src/Graphics_main.cpp -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/include/parser.h
r26 r32 17 17 #include "Tools/Viewer/Bdd/include/PortMap.h" 18 18 19 20 #include "Tools/Viewer/Bdd/include/Param.h" 21 #include "Tools/Viewer/Bdd/include/LimitParam.h" 22 #include "Tools/Viewer/Bdd/include/Group.h" 23 19 24 #define LEVEL_MAX 8 20 25 21 26 using namespace std; 22 23 27 24 28 namespace morpheo{ … … 39 43 morpheo::tools::viewer::bdd::Architecture *arch[LEVEL_MAX]; 40 44 morpheo::tools::viewer::bdd::Component *ctemp[LEVEL_MAX]; 41 42 protected: 45 morpheo::tools::viewer::bdd::Param *param; 46 morpheo::tools::viewer::bdd::Group *group; 47 48 morpheo::tools::viewer::bdd::LimitParam *limit; 49 50 void parser_pos(QDomNode n,int level); 51 void parser_limitparam(QDomNode n); 52 void parser_param(QDomNode n,int level); 53 morpheo::tools::viewer::bdd::Param *createAddP(string namegrp,string nameparam); 54 void createParam(); 43 55 44 56 public: … … 46 58 Parse(void); 47 59 ~Parse(void); 48 void parser_pos(QDomNode n,int level); 49 60 int open_file_param(string name); 50 61 int open_file(string name,int level); 51 //void saveFile(string name); 62 /*save configuration file 63 * name: file name 64 * type: 0 ->user save a file 65 * 1 ->function apply() temporary save 66 */ 67 int save_file(string name,int type); 52 68 morpheo::tools::viewer::bdd::BaseV *getBaseV(); 53 69 string getTopLevelName(); 54 70 string getAbsolutePath(); 71 void refresh(); 55 72 /*Close and erase baseV*/ 56 73 void closeBaseV(); 57 //void refresh();74 58 75 59 76 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/src/Parse_closeBaseV.cpp
r30 r32 11 11 12 12 void Parse::closeBaseV(){ 13 int i;14 for(i==0;i<LEVEL_MAX;i++)15 {16 delete ctemp[i];17 delete arch[i];18 delete ent[i];19 }20 delete pos;21 13 delete base; 22 14 toplevel.clear(); 23 15 absolutePath.clear(); 24 16 base=NULL; 25 26 17 } 27 18 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/src/Parse_open_file.cpp
r26 r32 4 4 */ 5 5 #include "Tools/Viewer/Parser/include/parser.h" 6 6 #include "qfileinfo.h" 7 7 namespace morpheo{ 8 8 namespace tools{ … … 11 11 12 12 int Parse::open_file(string name,int level){ 13 13 bool pere=false; 14 14 QFile file(QString::fromStdString(name)); 15 QString testname,testname2; 16 QString tmppath=QString::fromStdString(name); 17 QString path=tmppath.left(tmppath.lastIndexOf('/',-1,Qt::CaseSensitive)+1); 18 absolutePath=path.toStdString(); 19 testname=tmppath.right(tmppath.lastIndexOf('.',-1,Qt::CaseSensitive)-1); 20 testname2=testname.left(testname.lastIndexOf('.',-1,Qt::CaseSensitive)); 21 22 if(tmppath.contains('-') && level==0) //file not top level (first open file) 15 QFileInfo info(file); 16 QString testname; 17 absolutePath=info.absolutePath().toStdString(); 18 absolutePath.append("/"); 19 testname=info.baseName(); 20 if(testname.contains('-') && level==0) //file not top level (first open file) 23 21 { 24 testname 2=testname2.left(testname2.lastIndexOf('-',-1,Qt::CaseSensitive));22 testname=testname.left(testname.lastIndexOf('-',-1,Qt::CaseSensitive)); 25 23 } 24 else 25 pere=true; 26 26 27 27 28 28 if( !file.open( QIODevice::ReadOnly ) ) 29 29 { 30 c out << "Failed to load file. 1\n";30 cerr << "Position File :: Failed to load file. \n"; 31 31 return -1; 32 32 } … … 35 35 if( !doc.setContent( &file ) ) 36 36 { 37 c out << "Failed to load file.2\n";37 cerr << "Failed XML parse file.\n"; 38 38 file.close(); 39 39 return -1; … … 43 43 if( root.tagName() != "description" ) 44 44 { 45 c out<<"Invalid file.\n";45 cerr <<"Invalid file.\n"; 46 46 return -1; 47 47 } … … 54 54 if(!base){ 55 55 base=new morpheo::tools::viewer::bdd::BaseV(); 56 toplevel=testname2.toStdString(); 56 toplevel=info.baseName().toStdString(); 57 if(pere==true) 58 { 59 string op=""; 60 op.append(absolutePath); 61 op.append(toplevel); 62 open_file_param(op); 63 } 57 64 } 58 65 pos=new morpheo::tools::viewer::bdd::BaseP(); 59 //base->addBaseP(pos);60 66 parser_pos(root.firstChild(),level); 67 61 68 62 69 } 63 64 // delete pos;65 //delete ctemp;66 70 return 0; 67 71 } -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/src/Parse_parser_pos.cpp
r26 r32 51 51 #endif 52 52 base->addBaseP(pos,s); 53 53 delete pos; 54 54 } 55 55 } … … 76 76 77 77 base->addBaseP(pos,s); 78 79 parser_pos(n.firstChild(),level); 78 delete pos; 79 parser_pos(n.firstChild(),level); 80 80 } 81 81 if (e.tagName() == "component" ) … … 114 114 ctemp[level]->addport(new Port(*it)); 115 115 116 116 117 } 117 118 if (e.tagName() == "port_map" ) … … 127 128 128 129 ctemp[level]->addPortMap(p); 129 130 delete p; 130 131 } 131 132 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Viewer.pro
r26 r32 39 39 Bdd/include/Coord.h \ 40 40 Bdd/include/Entity.h \ 41 Bdd/include/Group.h \ 42 Bdd/include/LimitParam.h \ 41 43 Bdd/include/ListePorts.h \ 44 Bdd/include/Param.h \ 42 45 Bdd/include/Port.h \ 43 46 Bdd/include/PortMap.h \ … … 56 59 Bdd/src/BaseV_accessors.cpp \ 57 60 Bdd/src/BaseV_addBaseP.cpp \ 58 Bdd/src/BaseV_addParam.cpp \59 61 Bdd/src/BaseV_afficheBaseConsole.cpp \ 60 Bdd/src/BaseV_alloc.cpp \ 62 Bdd/src/BaseV_afficheParamConsole.cpp \ 63 Bdd/src/BaseV_afficheLimitParamConsole.cpp \ 64 Bdd/src/BaseV_alloc.cpp \ 61 65 Bdd/src/BaseV_searchComponent.cpp \ 62 66 Bdd/src/BaseV_unalloc.cpp \ … … 92 96 Bdd/src/ListePorts_accessors.cpp \ 93 97 Bdd/src/ListePorts_searchPort.cpp \ 94 Parser/src/Parse_alloc.cpp \ 98 Bdd/src/LimitParam_accessors.cpp \ 99 Bdd/src/LimitParam_unalloc.cpp \ 100 Bdd/src/LimitParam_alloc.cpp \ 101 Bdd/src/BaseV_searchGroup.cpp \ 102 Bdd/src/BaseV_addGroup.cpp \ 103 Bdd/src/BaseV_addLink.cpp \ 104 Bdd/src/BaseV_searchLimitParam.cpp \ 105 Bdd/src/BaseV_addLimitParam.cpp \ 106 Bdd/src/BaseV_modify.cpp \ 107 Bdd/src/Group_accessors.cpp \ 108 Bdd/src/Group_alloc.cpp\ 109 Bdd/src/Group_addParam.cpp \ 110 Bdd/src/Group_unalloc.cpp\ 111 Bdd/src/Param_accessors.cpp \ 112 Bdd/src/Param_alloc.cpp \ 113 Bdd/src/Param_unalloc.cpp\ 114 Parser/src/Parse_createParam.cpp\ 115 Parser/src/Parse_alloc.cpp \ 116 Parser/src/Parse_save.cpp \ 95 117 Parser/src/Parse_closeBaseV.cpp \ 96 118 Parser/src/Parse_accessors.cpp \ … … 99 121 Parser/src/Parse_unalloc.cpp \ 100 122 Parser/src/Parse_open_file.cpp \ 123 Parser/src/Parse_open_file_param.cpp \ 124 Parser/src/Parse_parser_param.cpp \ 125 Parser/src/Parse_parser_limitparam.cpp \ 101 126 Graphics/src/Graphics_main.cpp \ 102 127 Graphics/src/Graphics_file_actions.cpp \ -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/data/meta_predictor-meta_register.pos
r27 r32 21 21 <port name="branch_complete" 22 22 localisation="east" 23 direction="in ">23 direction="inout"> 24 24 Interface de mise à jour des branchement 25 25 </port> -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/data/two_level_branch_predictor-branch_history_table.pos
r30 r32 21 21 Interface de prediction : demande de la direction pour une adresse 22 22 </port> 23 24 <port name="interne" 25 localisation="south" 26 direction="out"> 27 blabla ............. 28 </port> 29 23 30 <port name="branch_complete" 24 31 localisation="east" … … 49 56 50 57 </component> 51 <!--52 <component name="meta_predictor"53 type="Meta_Predictor"54 size_x="10"55 pos_x="50"56 size_y="10"57 pos_y="20" >58 59 <port_map name="clock"60 component="branch_history_table"61 port="clock" />62 <port_map name="predict"63 component="branch_history_table"64 port="predict"/>65 <port_map name="branch_complete"66 component="branch_history_table"67 port="branch_complete" />68 69 </component>70 -->71 58 </architecture> 72 59 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/data/two_level_branch_predictor-two_level_branch_predictor_glue.pos
r27 r32 22 22 </port> 23 23 24 <port name="interne" 25 localisation="north" 26 direction="in"> 27 blabla ............. 28 </port> 29 24 30 </entity> 25 31 -
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/data/two_level_branch_predictor.pos
r27 r32 23 23 <port name="branch_complete" 24 24 localisation="east" 25 direction=" in">25 direction="out"> 26 26 Interface de mise à jour des branchement 27 27 </port> … … 43 43 component="two_level_branch_predictor" 44 44 port="predict"/> 45 46 <port_map name="interne" 47 component="two_level_branch_predictor_glue" 48 port="interne"/> 49 45 50 <port_map name="branch_complete" 46 51 component="two_level_branch_predictor" … … 75 80 pos_y="50" > 76 81 82 <port_map name="interne" 83 component="branch_history_table" 84 port="interne"/> 77 85 <port_map name="predict" 78 86 component="two_level_branch_predictor"
Note: See TracChangeset
for help on using the changeset viewer.