Table of Contents

Name

addrdsrecwindow - adds a rectangle in the windowing of rds structure.

Origin

This software belongs to the ALLIANCE CAD system from the CAO-VLSI team at ASIM/LIP6/UPMC laboratory.
LIP6/ASIM
University P. et M. Curie 4, place Jussieu 75252 PARIS Cedex 05 FRANCE
Fax : {33/0} 1.44.27.62.86
E-mail support : alliance-support@asim.lip6.fr

Synopsys

#include rwinnn.h"
void addrdsrecwindow( Rectangle, RdsWindow ) rdsrec_list *Rectangle;
rdswindow *RdsWindow;

Parameter

Rectangle
The rectangle to add to the windowing.
RdsWindow
The head of the windowing which has to contain the rectangle.

Description

The addrdsrecwindow function inserts a rdsrec_list rectangle structure in the windowing of the rds structure. The rectangle is added in one or many windows of the table (it depends on his dimensions). The field `USER' of the rectangle is used to point to the list of windows which contains the rectangle. So, the field `USER' has to be saved in an added structure to the rdsrec_list structure if librfm functions are used because somes use the field `USER' to link rectangles (see librds about field `USER').

Note If the rectangle is contained in only one window, then the field `USER' points to a rdswin_list window structure. If the rectangle is contained in many windows, the field `USER' points to a rdsrecwin_list structure which is a list which contains windows.

To know if a rectangle belongs to one or many windows, use the macro IsRd_sOneWindow defined in librwi.

Return Value

none

Errors

Rds202: rdsalloc error, can't continue !" it's impossible to allocate the memory size desired

Example

#include mutnnn.h"
#include rdsnnn.h"
#include rwinnn.h"
#include rtlnnn.h"

# define POINTER_LINKREC(R)
\ \ (((UserStruct *)((char *)(R)+sizeof(rdsrec_list)))->LINKREC ) typedef struct UserStruct { void *LINKREC; } UserStruct; main() { rdsfig_list *Figure; rdsrec_list *Rectangle; rdswindow *RdsWindow; rdswin_list *ScanWin; rdsrecwin_list *ScanRecWin; mbkenv(); rdsenv(); loadrdsparam(); Figure = addrdsfig( core",sizeof ( UserStruct ) ); Rectangle = addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1); /* Using the field `USER' */ Rectangle->USER = Rectangle; . . . . RdsWindow = allocrdswindow(); RdsWindow->XMIN = -200; RdsWindow->YMIN = -200; RdsWindow->XMAX = 200; RdsWindow->YMAX = 200; RdsWindow->DX = 4; RdsWindow->DY = 4; RdsWindow->SIDE = 100; RdsWindow->SIZE = RdsWindow->DX * RdsWindow->DY ; RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); /* Save the field `USER' of the rectangle */ POINTER_LINKREC(Rectangle) = Rectangle->USER; /* */ addrdsrecwindow( Rectangle, RdsWindow ); /* windows associated to a rectangle are pointed by the field `USER' of the rectangle */ /* getting windows (pointer *ScanWin) of a rectangle */ if ( IsRdsOneWindow(Rectangle) ) { ScanWin = (rdswin_list *) Rectangle->USER; } else { ScanRecWin = Rectangle->USER; while ( ScanRecWin != NULL ) { ScanWin = (rdswin_list *) (ScanRecWin)->WINDOW;

ScanRecWin = ScanRecWin->NEXT; }
}
. . .
}

See Also

librwi, delrdsrecwindow

Bug Report

This tool is under development at the ASIM/LIP6/UPMC laboratory, cao-vlsi research team.
We need your feedbak to improve documentation and tools. If you find bugs, please fill-in the form at http://asim.lip6.fr/alliance/support/bug-report/ Thanks for doing this.


Table of Contents

 



Alliance Web Site © 1997, 2002 ASIM/LIP6/UPMC, page maintained by Czo [Olivier Sirol] , last updated on 26 May 2000.