New version with user provided connectors

This commit is contained in:
Christophe Alexandre 2006-03-30 19:07:47 +00:00
parent 1b519c1142
commit 90aeb41c1e
5 changed files with 70 additions and 24 deletions

View File

@ -1,4 +1,4 @@
.\" $Id: ocp.1,v 1.6 2003/10/07 14:03:05 fred Exp $
.\" $Id: ocp.1,v 1.7 2006/03/30 19:07:45 xtof Exp $
.\" @(#)Labo.l 0.0 92/09/24 UPMC; Author: Christophe ALEXANDRE
.pl -.4
.TH OCP 1 "September 27, 2001" "ASIM/LIP6" "CAO\-VLSI Reference Manual"
@ -35,7 +35,7 @@ The file containing the placed block will have the name \fIoutputname\fP. This n
.br
\fB-partial <NAME>\fP
.br
A user defined placement can be specified, thanks to a placement file.
A user defined pre-placement can be specified, thanks to a placement file.
.br
The optional placement file must be given by the user. It must have an extension that denotes the format defined by the environment variable \fBMBK_IN_PH\fP.
.br
@ -44,12 +44,14 @@ The optional placement file must be given by the user. It must have an extension
.br
The placement of connectors can be also specified.
.br
There are three ways to place connectors in a physical view :
There are four ways to place connectors in a physical view :
.br
.br
\fB-partial <NAME>\fP pre-placed connectors defined by the user can be provided through the pre-placement file. In that case, automatic connector placement is impossible.
.br
\fB-c\fP option will automatically place the connectors randomly. The auto placement will set connectors on each side of the abutment box.
.br
\fB-ring\fP option will automatically place the connectors for the ring pad placement tool. The placement is random but only on the north and south side unless the \fB-ioc <NAME>\fP option is given, in which case the constraints given in the <NAME>.ioc file will be respected, but with layers suitable for ring. This option is temporary and is provided for the ring pad placement tool.
\fB-ring\fP option will automatically place the connectors for the ring pad placement tool. The placement is random but only on the north and south side unless the \fB-ioc <NAME>\fP option is given, in which case the constraints given in the <NAME>.ioc file will be respected, but with layers suitable for ring.
.br
\fB-ioc <NAME>\fP option will place connectors as specified by the <NAME>.ioc given file.
.br

View File

@ -31,9 +31,17 @@
#include "PCon.h"
PCon::PCon(const locon* con):
PElem(), _con(con), _pos()
{}
PCon::PCon(const locon* con, phcon* pcon, int dx, int dy)
: PElem()
, _con(con)
, _phcon(pcon)
, _pos()
{
if (_phcon)
{
_pos = PPos((_phcon->XCON - dx)/PITCH, (_phcon->YCON - dy)/PITCH);
}
}
PCon::PCon(const locon* con, PPos pos, char orient):
PElem(), _con(con), _pos(pos), _orient(orient)
@ -42,14 +50,26 @@ PCon::PCon(const locon* con, PPos pos, char orient):
void
PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const
{
if (!_phcon)
addphcon(physicalfig
, _orient
, _con->NAME
, (int)(GetPosX() * PITCH + dx)
, (int)(GetPosY() * PITCH + dy)
, _orient==NORTH || _orient == SOUTH ? ALU2 : ALU3
, (_orient==NORTH || _orient == SOUTH ? 2 : 1) * (PITCH/5));
else
addphcon(physicalfig
, _phcon->ORIENT
, _phcon->NAME
, _phcon->XCON
, _phcon->YCON
, _phcon->LAYER
, _phcon->WIDTH
);
addphcon(physicalfig,
_orient,
_con->NAME,
(int)(GetPosX() * PITCH + dx),
(int)(GetPosY() * PITCH + dy),
_orient==NORTH || _orient == SOUTH ? ALU2 : ALU3,
(_orient==NORTH || _orient == SOUTH ? 2 : 1) * (PITCH/5));
}
void

View File

@ -34,11 +34,12 @@
class PCon: public PElem {
private:
const locon* _con;
phcon* _phcon; //can be NULL
PPos _pos;
char _orient;
public:
PCon(const locon* con);
PCon(const locon* con, phcon* pcon=NULL, int dx=0, int dy=0);
PCon(const locon* con, PPos pos, char orient);
PPos GetPos() const { return _pos; }
const locon* GetLocon() const { return _con; }

View File

@ -145,6 +145,23 @@ PPlacement::Init(lofig* fig, int NbRows)
PFixedIns* fixedins = InsertFixedIns(ins, pins, _dx, _dy);
pinsmap[ins->INSNAME] = fixedins;
}
if (_prePlaceFig->PHCON &&
(_placeCons || _ringPlaceCons || _iocFile))
{
cerr << " o ERROR: impossible to have simultaneously preplaced connectors" << endl
<< " and automatically placed connectors" << endl;
exit(1);
}
for (phcon* pcon = _prePlaceFig->PHCON; pcon; pcon = pcon->NEXT)
{
locon* lCon = getlocon(_fig, pcon->NAME);
//generates an error if no locon
PCon* pCon = InsertCon(lCon, pcon, _dx, _dy);
pconmap[pcon->NAME] = pCon;
}
}
@ -209,11 +226,14 @@ PPlacement::Init(lofig* fig, int NbRows)
locon_list* con = (locon_list*)(it->DATA);
if (con->TYPE == EXTERNAL)
{
if (_placeCons || _ringPlaceCons || _iocFile)
if ( (_prePlaceFig && _prePlaceFig->PHCON)
|| _placeCons || _ringPlaceCons || _iocFile)
{
PConMap::iterator cit = pconmap.find(con->NAME);
if (cit != pconmap.end())
++totreatinscpt;
PConMap::iterator cit = pconmap.find(con->NAME);
if (cit != pconmap.end())
{
++totreatinscpt;
}
}
}
else
@ -297,7 +317,8 @@ PPlacement::Init(lofig* fig, int NbRows)
}
}
if (_placeCons || _ringPlaceCons || _iocFile)
if ( (_prePlaceFig && _prePlaceFig->PHCON)
|| _placeCons || _ringPlaceCons || _iocFile)
{
for (locon* con = fig->LOCON; con; con = con->NEXT)
{
@ -354,8 +375,10 @@ PPlacement::Init(lofig* fig, int NbRows)
siginsset.insert(ins);
}
}
else if (_placeCons || _ringPlaceCons || _iocFile)
else if ( (_prePlaceFig && _prePlaceFig->PHCON)
|| _placeCons || _ringPlaceCons || _iocFile)
{
PConMap::iterator cit = pconmap.find(con->NAME);
if (cit != pconmap.end())
{
@ -860,9 +883,9 @@ PPlacement::InsertToPlaceIns(const loins* ins)
}
PCon*
PPlacement::InsertCon(const locon* con)
PPlacement::InsertCon(const locon* con, phcon* phycon, int dx, int dy)
{
PCon* pcon = new PCon(con);
PCon* pcon = new PCon(con, phycon);
_cons.push_back(pcon);
return pcon;
}

View File

@ -249,7 +249,7 @@ class PPlacement {
private:
PFixedIns* InsertFixedIns(const loins* ins, const phins* pins, const int dx, const int dy);
PToPlaceIns* InsertToPlaceIns(const loins* ins);
PCon* InsertCon(const locon* con);
PCon* InsertCon(const locon* con, phcon* pcon=NULL, int dx=0, int dy=0);
PCon* InsertCon(const locon* con, PPos position, const char orientation);
PONet* InsertNet(const losig* sig);
int AddRowend(struct phfig* physicalfig);