.\" $Id: addlores.3,v 1.1 2002/08/14 20:05:38 pnt Exp $ .\" @(#)addlores.2 2.11 91/08/22 ; Labo ASIM cao-vlsi; Author : Pierre Nguyen Tuong .if t \{\ .XS \n% .ti 0.2i addlores .XE .XS2 \n% .ti 0.2i addlores .XE2 \} .TH ADDLORES 3 "August 14, 2002" "ASIM/LIP6" "MBK LOGICAL FUNCTIONS" .SH NAME addlores \- create a logical resistor .so jessie/alliance/alc_origin.1.en.gz .SH SYNOPSYS .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} .ta 3n 23n #include "mlo.h" lores_list \(**addlores(ptfig,type,resi,rcon1,rcon2,name) lofig_list \(**ptfig ; char type ; double resi ; losig_list \(**rcon1, \(**rcon2 ; const char \(**name ; .ft R .fi .SH PARAMETERS .TP 20 \fIptfig\fP Pointer to the figure in which the resistor should be added .TP \fItype\fP Resistor type .TP \fIresi\fP Resistor value in Ohms .TP \fIrcon1\fP Pointer to the signal to be connected on the resistor top plate .TP \fIrcon2\fP Pointer to the signal to be connected on the resistor bottom plate .TP \fIname\fP Resistor instance name .SH DESCRIPTION \fBaddlores\fP creates a new resistor, and adds it to the list of resistors pointed to by \fIptfig \-> LORES\fP. The new resistor is added in front of the list, and becomes itself the list head. .br The \fItype\fP parameter can take one value : .RS .TP 20 \fBRESMIM\fP for a metal resistor .RE .LP The \fIresi\fP\ argument is the resistor value in Ohms. .br Two connectors are created each time a resistor is added, and the \fIrcon1\fP and \fIrcon2\fP \fBlosigs\fP are attached to the \fISIG\fP field of the \fBlocon\fP of the appropriate connector. The connectors names are \fIrcon1 \fP and \fIrcon2\fP; their direction, \fIDIR\fP, are set to \fB'R'\fP, and their \fITYPE\fP \fBINTERNAL\fP. For details on the structures, see \fBlocon\fP(3) and \fBlores\fR(3). .SH RETURN VALUE \fBaddlores\fP returns a pointer to the newly created resistor. .SH ERRORS .if n \{\ .ft B \} .if t \{\ .ft CR \} "\(**\(**\(** mbk error \(**\(**\(** illegal resistor type : \fItype\fP" .ft R .RS The \fItype\fP is not a legal resistor type. .RE .SH EXAMPLE .ta 3n 6n 9n 12n 15n 18n 21n .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mlo.h" void parallel_resistors(void) /\(** netlist of two parallel resistors \(**/ { lofig_list \(**pt = NULL ; losig_list \(**in = NULL ; losig_list \(**out = NULL ; pt = addlofig("parallel_resistors") ; addlocon(pt,"in",in = givelosig(pt,0),IN) ; addlocon(pt,"out",out = givelosig(pt,1),OUT) ; addlores(pt,RESMIM,0.2e-6,in,out,"res1") ; addlores(pt,RESMIM,0.2e-6,in,out,"res2") ; } .ft R .fi .SH SEE ALSO .BR mbk (1), .BR lofig (3), .BR lores (3), .BR locon (3), .BR dellores (3). .so jessie/alliance/alc_bug_report.1.en.gz