diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index d53dcde2..718b7418 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -156,7 +156,7 @@ PPlacement::Init(lofig* fig, int NbRows) } for (locon* con = fig->LOCON; con; con = con->NEXT) - ploconmap[con->NAME] = con; + ploconmap[con->NAME] = con; // traitement de l'emplacement des connecteurs // creation des PCon si fichier ioc @@ -718,43 +718,48 @@ PPlacement::SetPosIocFile(PConMap& pconmap) void PPlacement::ParseIocFile(PLoconMap& ploconmap) { - PPos position; - - _PtList = iocparse(_iocFileName); - - char orientation; - - for(con_list* tmpcon = _PtList ; tmpcon ; tmpcon = tmpcon->NEXT) - { - if (strcmp(tmpcon->NAME,"SPACE") != 0) + PPos position; + + _PtList = iocparse(_iocFileName); + + char orientation; + + for(con_list* tmpcon = _PtList ; tmpcon ; tmpcon = tmpcon->NEXT) { - if (ploconmap.find(tmpcon->NAME) == ploconmap.end()) + if (strcmp(tmpcon->NAME,"SPACE") != 0) { - cerr << " o Error in ioc file ...." << endl - << " The connector " << tmpcon->NAME - << " doesn't exist in your figure ...." - << endl; - exit(1); + if (ploconmap.find(tmpcon->NAME) == ploconmap.end()) + { + cerr << " o Error in ioc file ...." << endl + << " The connector " << tmpcon->NAME + << " doesn't exist in your figure ...." + << endl; + exit(1); + } + switch (tmpcon->ORIENT) + { + case 'T': + orientation = NORTH; + break; + case 'B': + orientation = SOUTH; + break; + case 'L': + orientation = WEST; + break; + case 'R': + orientation = EAST; + break; + default: + cerr << "Unknown Orientation for connector: " + << tmpcon->NAME << endl; + exit(1); + } + position.SetX(0); + position.SetY(0); + InsertCon(ploconmap[tmpcon->NAME], position, orientation); } - switch (tmpcon->ORIENT) - { - case 'T' : orientation = NORTH; - break; - case 'B' : orientation = SOUTH; - break; - case 'L' : orientation = WEST; - break; - case 'R' : orientation = EAST; - break; - default: cerr << "Unknown Orientation for connector: " - << tmpcon->NAME << endl; - exit(1); - } - position.SetX(0); - position.SetY(0); - InsertCon(ploconmap[tmpcon->NAME], position, orientation); } - } } // ====================================================================== diff --git a/alliance/src/ocp/src/placer/iocgram.y b/alliance/src/ocp/src/placer/iocgram.y index 64f54f9a..615f3302 100644 --- a/alliance/src/ocp/src/placer/iocgram.y +++ b/alliance/src/ocp/src/placer/iocgram.y @@ -63,7 +63,7 @@ orientation : TOP { expr : | iopin expr; - | iopin space expr; + | space expr; iopin : PAROUV IOPIN iopin1 PARFER PTVIRG; @@ -112,6 +112,7 @@ con_list* add_con(con_list* ptlist, char orient, char* name) return ptcon; } + con_list* add_space(con_list* ptlist, char orient, char *value) { con_list* ptcon; @@ -124,6 +125,7 @@ con_list* add_space(con_list* ptlist, char orient, char *value) return ptcon; } + con_list* iocparse(char *file) { extern FILE *yyin;