47static void Psr_ManWriteVerilogConcat( FILE * pFile,
Psr_Ntk_t *
p,
int Con )
51 fprintf( pFile,
"{" );
53 fprintf( pFile,
"}" );
55static void Psr_ManWriteVerilogSignal( FILE * pFile,
Psr_Ntk_t *
p,
int Sig )
57 int Value = Abc_Lit2Var2( Sig );
60 fprintf( pFile,
"%s", Psr_NtkStr(
p, Value) );
62 fprintf( pFile,
"%s%s", Psr_NtkStr(
p, Psr_SliceName(
p, Value)), Psr_NtkStr(
p, Psr_SliceRange(
p, Value)) );
64 Psr_ManWriteVerilogConcat( pFile,
p, Value );
70 assert( Vec_IntSize(vSigs) > 0 );
73 if ( fOdd && !(i & 1) )
75 Psr_ManWriteVerilogSignal( pFile,
p, Sig );
76 fprintf( pFile,
"%s", i == Stop - 1 ?
"" :
", " );
81 int i, FormId, ActSig;
82 assert( Vec_IntSize(vSigs) % 2 == 0 );
85 fprintf( pFile,
"." );
86 fprintf( pFile,
"%s", Psr_NtkStr(
p, FormId) );
87 fprintf( pFile,
"(" );
88 Psr_ManWriteVerilogSignal( pFile,
p, ActSig );
89 fprintf( pFile,
")%s", (i == Vec_IntSize(vSigs) - 2) ?
"" :
", " );
94 int i, FormId, ActSig;
95 char * pStrs[4] = {
" = ",
" ? ",
" : ",
";\n" };
96 assert( Vec_IntSize(vSigs) == 8 );
97 fprintf( pFile,
" assign " );
98 Psr_ManWriteVerilogSignal( pFile,
p, Vec_IntEntryLast(vSigs) );
99 fprintf( pFile,
"%s", pStrs[0] );
102 Psr_ManWriteVerilogSignal( pFile,
p, ActSig );
103 fprintf( pFile,
"%s", pStrs[1+i/2] );
108static void Psr_ManWriteVerilogBoxes( FILE * pFile,
Psr_Ntk_t *
p )
115 Psr_ManWriteVerilogMux( pFile,
p, vBox );
116 else if ( Psr_BoxIsNode(
p, i) )
118 fprintf( pFile,
" %s (", Ptr_TypeToName(NtkId) );
119 Psr_ManWriteVerilogSignal( pFile,
p, Vec_IntEntryLast(vBox) );
120 if ( Psr_BoxIONum(
p, i) > 1 )
121 fprintf( pFile,
", " );
123 fprintf( pFile,
");\n" );
128 fprintf( pFile,
" %s %s (", Psr_NtkStr(
p, NtkId), Psr_BoxName(
p, i) ? Psr_NtkStr(
p, Psr_BoxName(
p, i)) :
"" );
129 Psr_ManWriteVerilogArray2( pFile,
p, vBox );
130 fprintf( pFile,
");\n" );
134static void Psr_ManWriteVerilogIos( FILE * pFile,
Psr_Ntk_t *
p,
int SigType )
136 int NameId, RangeId, i;
137 char * pSigNames[4] = {
"inout",
"input",
"output",
"wire" };
138 Vec_Int_t * vSigs[4] = { &
p->vInouts, &
p->vInputs, &
p->vOutputs, &
p->vWires };
139 Vec_Int_t * vSigsR[4] = { &
p->vInoutsR, &
p->vInputsR, &
p->vOutputsR, &
p->vWiresR };
141 fprintf( pFile,
"\n" );
143 fprintf( pFile,
" %s %s%s;\n", pSigNames[SigType], RangeId ? Psr_NtkStr(
p, RangeId) :
"", Psr_NtkStr(
p, NameId) );
149 fprintf( pFile,
"%s%s", Psr_NtkStr(
p, NameId), i == Vec_IntSize(vOrder) - 1 ?
"" :
", " );
151static void Psr_ManWriteVerilogNtk( FILE * pFile,
Psr_Ntk_t *
p )
155 fprintf( pFile,
"module %s (\n ", Psr_NtkStr(
p,
p->iModuleName) );
156 Psr_ManWriteVerilogIoOrder( pFile,
p, &
p->vOrder );
157 fprintf( pFile,
"\n );\n" );
159 for ( s = 0; s < 4; s++ )
160 Psr_ManWriteVerilogIos( pFile,
p, s );
161 fprintf( pFile,
"\n" );
163 Psr_ManWriteVerilogBoxes( pFile,
p );
164 fprintf( pFile,
"endmodule\n\n" );
168 Psr_Ntk_t * pNtk = Psr_ManRoot(vPrs);
int i;
169 FILE * pFile = fopen( pFileName,
"wb" );
172 printf(
"Cannot open output file \"%s\".\n", pFileName );
177 Psr_ManWriteVerilogNtk( pFile, pNtk );
195static inline int Bac_ObjGetRange(
Bac_Ntk_t *
p,
int iObj )
197 int i, NameId = Bac_ObjName(
p, iObj);
198 assert( Bac_ObjIsCi(
p, iObj) );
202 for ( i = iObj + 1; i < Bac_NtkObjNum(
p); i++ )
208static inline void Bac_ManWriteVar(
Bac_Ntk_t *
p,
int RealName )
210 Vec_StrPrintStr(
p->pDesign->vOut, Bac_NtkStr(
p, RealName) );
212static inline void Bac_ManWriteRange(
Bac_Ntk_t *
p,
int Beg,
int End )
215 Vec_StrPrintStr( vStr,
"[" );
218 Vec_StrPrintNum( vStr, End );
219 Vec_StrPrintStr( vStr,
":" );
221 Vec_StrPrintNum( vStr, Beg );
222 Vec_StrPrintStr( vStr,
"]" );
224static inline void Bac_ManWriteConstBit(
Bac_Ntk_t *
p,
int iObj,
int fHead )
227 int Const = Bac_ObjGetConst(
p, iObj);
230 Vec_StrPrintStr( vStr,
"1\'b" );
232 Vec_StrPush( vStr,
'0' );
234 Vec_StrPush( vStr,
'1' );
236 Vec_StrPush( vStr,
'x' );
238 Vec_StrPush( vStr,
'z' );
241static inline int Bac_ManFindRealNameId(
Bac_Ntk_t *
p,
int iObj )
243 int NameId = Bac_ObjName(
p, iObj);
244 assert( Bac_ObjIsCi(
p, iObj) );
246 NameId = Bac_ObjName(
p, iObj - Abc_Lit2Var2(NameId));
248 return Bac_NtkInfoName(
p, Abc_Lit2Var2(NameId));
250 return Abc_Lit2Var2(NameId);
252static inline int Bac_ManFindRealIndex(
Bac_Ntk_t *
p,
int iObj )
254 int iBit = 0, NameId = Bac_ObjName(
p, iObj);
255 assert( Bac_ObjIsCi(
p, iObj) );
258 NameId = Bac_ObjName(
p, iObj - (iBit = Abc_Lit2Var2(NameId)));
260 return Bac_NtkInfoIndex(
p, Abc_Lit2Var2(NameId), iBit);
264static inline void Bac_ManWriteSig(
Bac_Ntk_t *
p,
int iObj )
266 if ( Bac_ObjIsCo(
p, iObj) )
267 iObj = Bac_ObjFanin(
p, iObj);
268 assert( Bac_ObjIsCi(
p, iObj) );
269 if ( Bac_ObjGetConst(
p, iObj) )
270 Bac_ManWriteConstBit(
p, iObj, 1 );
273 int NameId = Bac_ObjName(
p, iObj);
275 Bac_ManWriteVar(
p, Abc_Lit2Var2(NameId) );
278 Bac_ManWriteVar(
p, Bac_ManFindRealNameId(
p, iObj) );
279 Bac_ManWriteRange(
p, Bac_ManFindRealIndex(
p, iObj), -1 );
283static inline void Bac_ManWriteConcat(
Bac_Ntk_t *
p,
int iStart,
int nObjs )
289 Bac_ManWriteSig(
p, iStart );
292 Vec_StrPrintStr( vStr,
"{" );
293 if ( Bac_ObjIsBo(
p, iStart) )
296 for ( i = iStart + nObjs - 1; i >= iStart; i-- )
300 if ( Vec_StrEntryLast(vStr) !=
'{' )
301 Vec_StrPrintStr( vStr,
", " );
302 Bac_ManWriteVar(
p, Bac_ManFindRealNameId(
p, i) );
305 else if ( Bac_ObjIsBi(
p, iStart) )
308 for ( e = iStart - nObjs + 1; e <= iStart; )
310 if ( Vec_StrEntryLast(vStr) !=
'{' )
311 Vec_StrPrintStr( vStr,
", " );
313 if ( Bac_ObjGetConst(
p, Bac_ObjFanin(
p, e)) )
315 int fBinary = Bac_ObjIsConstBin(
p, Bac_ObjFanin(
p, e)-1);
316 for ( b = e + 1; b <= iStart; b++ )
318 if ( !Bac_ObjGetConst(
p, Bac_ObjFanin(
p, b)) )
320 if ( !Bac_ObjIsConstBin(
p, Bac_ObjFanin(
p, b)-1) )
323 Vec_StrPrintNum( vStr, b - e );
324 if ( fBinary && b - e > 8 )
326 int Digit = 0, nBits = ((b - e) & 3) ? (b - e) & 3 : 4;
327 Vec_StrPrintStr( vStr,
"\'h" );
328 for ( k = e; k < b; k++ )
330 Digit = 2*Digit + Bac_ObjGetConst(
p, Bac_ObjFanin(
p, k)) -
BAC_BOX_CF;
334 Vec_StrPush( vStr, (
char)(Digit < 10 ?
'0' + Digit :
'a' + Digit - 10) );
344 Vec_StrPrintStr( vStr,
"\'b" );
345 for ( k = e; k < b; k++ )
346 Bac_ManWriteConstBit(
p, Bac_ObjFanin(
p, k), 0 );
352 for ( b = e + 1; b <= iStart; b++ )
353 if ( Bac_ObjFanin(
p, b) != Bac_ObjFanin(
p, e) )
357 Vec_StrPrintNum( vStr, b - e );
358 Vec_StrPrintStr( vStr,
"{" );
359 Bac_ManWriteSig(
p, e );
360 Vec_StrPrintStr( vStr,
"}" );
364 NameId = Bac_ObjName(
p, Bac_ObjFanin(
p, e));
367 Bac_ManWriteVar(
p, Abc_Lit2Var2(NameId) );
372 for ( b = e + 1; b <= iStart; b++ )
373 if ( Bac_ObjFanin(
p, e) - Bac_ObjFanin(
p, b) != b - e )
376 Bac_ManWriteVar(
p, Bac_ManFindRealNameId(
p, Bac_ObjFanin(
p, e)) );
378 Bac_ManWriteRange(
p, Bac_ManFindRealIndex(
p, Bac_ObjFanin(
p, e)), -1 );
382 int f = Bac_ObjFanin(
p, b-1 );
384 if ( Bac_ObjNameType(
p, f) ==
BAC_NAME_INDEX || Bac_ObjGetRange(
p, f) != b - e )
385 Bac_ManWriteRange(
p, Bac_ManFindRealIndex(
p, f), Bac_ManFindRealIndex(
p, Bac_ObjFanin(
p, e)) );
392 Vec_StrPrintStr( vStr,
"}" );
394static inline void Bac_ManWriteGate(
Bac_Ntk_t *
p,
int iObj )
396 Vec_Str_t * vStr =
p->pDesign->vOut;
int iTerm, k;
397 char * pGateName =
Abc_NamStr(
p->pDesign->pMods, Bac_BoxNtkId(
p, iObj));
400 Vec_StrPrintStr( vStr,
" " );
401 Vec_StrPrintStr( vStr, pGateName );
402 Vec_StrPrintStr( vStr,
" " );
403 Vec_StrPrintStr( vStr, Bac_ObjName(
p, iObj) ? Bac_ObjNameStr(
p, iObj) :
"" );
404 Vec_StrPrintStr( vStr,
" (" );
407 Vec_StrPrintStr( vStr, k ?
", ." :
"." );
409 Vec_StrPrintStr( vStr,
"(" );
410 Bac_ManWriteSig(
p, iTerm );
411 Vec_StrPrintStr( vStr,
")" );
415 Vec_StrPrintStr( vStr, Bac_BoxBiNum(
p, iObj) ?
", ." :
"." );
417 Vec_StrPrintStr( vStr,
"(" );
418 Bac_ManWriteSig(
p, iTerm );
419 Vec_StrPrintStr( vStr,
")" );
421 Vec_StrPrintStr( vStr,
");\n" );
423static inline void Bac_ManWriteAssign(
Bac_Ntk_t *
p,
int iObj )
427 int nInputs = Bac_BoxBiNum(
p, iObj);
428 int nOutputs = Bac_BoxBoNum(
p, iObj);
430 Vec_StrPrintStr( vStr,
" assign " );
431 Bac_ManWriteSig(
p, iObj + 1 );
432 Vec_StrPrintStr( vStr,
" = " );
436 Vec_StrPrintStr( vStr,
"1\'b0" );
438 Vec_StrPrintStr( vStr,
"1\'b1" );
440 Vec_StrPrintStr( vStr,
"1\'bx" );
442 Vec_StrPrintStr( vStr,
"1\'bz" );
445 else if ( nInputs == 1 )
448 Vec_StrPrintStr( vStr,
"~" );
450 Bac_ManWriteSig(
p, iObj - 1 );
452 else if ( nInputs == 2 )
455 Vec_StrPrintStr( vStr,
"~" );
456 Bac_ManWriteSig(
p, iObj - 1 );
458 Vec_StrPrintStr( vStr,
" & " );
460 Vec_StrPrintStr( vStr,
" & ~" );
462 Vec_StrPrintStr( vStr,
" | " );
464 Vec_StrPrintStr( vStr,
" | ~" );
466 Vec_StrPrintStr( vStr,
" ^ " );
468 Bac_ManWriteSig(
p, iObj - 2 );
470 Vec_StrPrintStr( vStr,
";\n" );
475 int iObj, k, i, o, StartPos;
479 if ( Bac_ObjIsConst(
p, iObj) )
482 if ( Bac_ObjIsGate(
p, iObj) )
484 Bac_ManWriteGate(
p, iObj );
488 if ( !Bac_ObjIsBoxUser(
p, iObj) && fUseAssign )
490 Bac_ManWriteAssign(
p, iObj );
494 StartPos = Vec_StrSize(vStr);
495 if ( Bac_ObjIsBoxUser(
p, iObj) )
497 int Value, Beg, End, Range;
499 Vec_StrPrintStr( vStr,
" " );
500 Vec_StrPrintStr( vStr, Bac_NtkName(pModel) );
501 Vec_StrPrintStr( vStr,
" " );
502 Vec_StrPrintStr( vStr, Bac_ObjName(
p, iObj) ? Bac_ObjNameStr(
p, iObj) :
"" );
503 Vec_StrPrintStr( vStr,
" (" );
506 assert( Bac_NtkInfoNum(pModel) );
509 int NameId = Abc_Lit2Var2( Value );
510 int Type = Abc_Lit2Att2( Value );
511 Vec_StrPrintStr( vStr, k ?
", " :
"" );
512 if ( Vec_StrSize(vStr) > StartPos + 70 )
514 StartPos = Vec_StrSize(vStr);
515 Vec_StrPrintStr( vStr,
"\n " );
517 Vec_StrPrintStr( vStr,
"." );
518 Vec_StrPrintStr( vStr, Bac_NtkStr(
p, NameId) );
519 Vec_StrPrintStr( vStr,
"(" );
520 Range = Bac_InfoRange( Beg, End );
523 Bac_ManWriteConcat(
p, Bac_BoxBi(
p, iObj, i), Range ), i += Range;
524 else if ( Type == 2 )
525 Bac_ManWriteConcat(
p, Bac_BoxBo(
p, iObj, o), Range ), o += Range;
527 Vec_StrPrintStr( vStr,
")" );
529 assert( i == Bac_BoxBiNum(
p, iObj) );
530 assert( o == Bac_BoxBoNum(
p, iObj) );
534 int iTerm, k, Range, iSig = 0;
535 Vec_Int_t * vBits = Bac_BoxCollectRanges(
p, iObj );
537 char * pSymbs = Bac_ManPrimSymb(
p->pDesign, Bac_ObjType(
p, iObj) );
538 Vec_StrPrintStr( vStr,
" " );
539 Vec_StrPrintStr( vStr, pName );
540 Vec_StrPrintStr( vStr,
" " );
541 Vec_StrPrintStr( vStr, Bac_ObjName(
p, iObj) ? Bac_ObjNameStr(
p, iObj) :
"" );
542 Vec_StrPrintStr( vStr,
" (" );
546 Range = Vec_IntEntry( vBits, iSig );
547 Vec_StrPrintStr( vStr, iSig ?
", " :
"" );
548 if ( Vec_StrSize(vStr) > StartPos + 70 )
550 StartPos = Vec_StrSize(vStr);
551 Vec_StrPrintStr( vStr,
"\n " );
553 Vec_StrPrintStr( vStr,
"." );
554 Vec_StrPush( vStr, pSymbs[iSig] );
555 Vec_StrPrintStr( vStr,
"(" );
556 Bac_ManWriteConcat(
p, iTerm, Range );
557 Vec_StrPrintStr( vStr,
")" );
562 Range = Vec_IntEntry( vBits, iSig );
563 Vec_StrPrintStr( vStr, iSig ?
", " :
"" );
564 if ( Vec_StrSize(vStr) > StartPos + 70 )
566 StartPos = Vec_StrSize(vStr);
567 Vec_StrPrintStr( vStr,
"\n " );
569 Vec_StrPrintStr( vStr,
"." );
570 Vec_StrPush( vStr, pSymbs[iSig] );
571 Vec_StrPrintStr( vStr,
"(" );
572 Bac_ManWriteConcat(
p, iTerm, Range );
573 Vec_StrPrintStr( vStr,
")" );
576 assert( iSig == Vec_IntSize(vBits) );
578 Vec_StrPrintStr( vStr,
");\n" );
583 char * pKeyword[4] = {
"wire ",
"input ",
"output ",
"inout " };
585 int k, iObj, iTerm, Value, Beg, End, Length, fHaveWires, StartPos;
587 assert( Vec_IntSize(&
p->vFanin) == Bac_NtkObjNum(
p) );
590 Vec_StrPrintStr( vStr,
"module " );
591 Vec_StrPrintStr( vStr, Bac_NtkName(
p) );
592 Vec_StrPrintStr( vStr,
" (\n " );
593 StartPos = Vec_StrSize(vStr);
595 if ( Abc_Lit2Att2(Value) != 0 )
597 Vec_StrPrintStr( vStr, k ?
", " :
"" );
598 if ( Vec_StrSize(vStr) > StartPos + 70 )
600 StartPos = Vec_StrSize(vStr);
601 Vec_StrPrintStr( vStr,
"\n " );
603 Bac_ManWriteVar(
p, Abc_Lit2Var2(Value) );
605 Vec_StrPrintStr( vStr,
"\n );\n" );
608 if ( Abc_Lit2Att2(Value) != 0 )
610 Vec_StrPrintStr( vStr,
" " );
611 Vec_StrPrintStr( vStr, pKeyword[Abc_Lit2Att2(Value)] );
613 Bac_ManWriteRange(
p, Beg, End );
614 Bac_ManWriteVar(
p, Abc_Lit2Var2(Value) );
615 Vec_StrPrintStr( vStr,
";\n" );
617 Vec_StrPrintStr( vStr,
"\n" );
620 if ( !Bac_ObjIsConst(
p, iObj) )
624 Vec_StrPrintStr( vStr,
" wire " );
625 Bac_ManWriteRange(
p, Bac_ManFindRealIndex(
p, iTerm), Bac_ManFindRealIndex(
p, iTerm + Bac_ObjGetRange(
p, iTerm) - 1) );
626 Bac_ManWriteVar(
p, Bac_ManFindRealNameId(
p, iTerm) );
627 Vec_StrPrintStr( vStr,
";\n" );
632 if ( !Bac_ObjIsConst(
p, iObj) )
635 { fHaveWires = 1; iObj = Bac_NtkObjNum(
p);
break; }
640 Vec_StrPrintStr( vStr,
"\n wire " );
642 if ( !Bac_ObjIsConst(
p, iObj) )
647 Vec_StrPrintStr( vStr,
";\n wire " ), Length = 7;
649 Vec_StrPrintStr( vStr,
", " );
650 Vec_StrPrintStr( vStr, Bac_ObjNameStr(
p, iTerm) );
651 Length +=
strlen(Bac_ObjNameStr(
p, iTerm));
653 Vec_StrPrintStr( vStr,
";\n" );
655 Vec_StrPrintStr( vStr,
"\n" );
658 Vec_StrPrintStr( vStr,
"endmodule\n\n" );
666 printf(
"Genlib library used in the mapped design is not longer a current library.\n" );
670 p->vOut = Vec_StrAlloc( 10000 );
671 p->vOut2 = Vec_StrAlloc( 1000 );
672 Vec_StrPrintStr(
p->vOut,
"// Design \"" );
673 Vec_StrPrintStr(
p->vOut, Bac_ManName(
p) );
674 Vec_StrPrintStr(
p->vOut,
"\" written via CBA package in ABC on " );
676 Vec_StrPrintStr(
p->vOut,
"\n\n" );
681 if (
p->vOut && Vec_StrSize(
p->vOut) > 0 )
683 FILE * pFile = fopen( pFileName,
"wb" );
685 printf(
"Cannot open file \"%s\" for writing.\n", pFileName );
688 fwrite( Vec_StrArray(
p->vOut), 1, Vec_StrSize(
p->vOut), pFile );
692 Vec_StrFreeP( &
p->vOut );
693 Vec_StrFreeP( &
p->vOut2 );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
struct Psr_Ntk_t_ Psr_Ntk_t
BASIC TYPES ///.
Psr_ManType_t
INCLUDES ///.
#define Psr_NtkForEachBox(p, vVec, i)
void Psr_ManWriteVerilog(char *pFileName, Vec_Ptr_t *vPrs)
void Bac_ManWriteVerilogBoxes(Bac_Ntk_t *p, int fUseAssign)
void Psr_ManWriteVerilogArray(FILE *pFile, Psr_Ntk_t *p, Vec_Int_t *vSigs, int Start, int Stop, int fOdd)
void Bac_ManWriteVerilogNtk(Bac_Ntk_t *p, int fUseAssign)
void Bac_ManWriteVerilog(char *pFileName, Bac_Man_t *p, int fUseAssign)
struct Bac_Man_t_ Bac_Man_t
struct Bac_Ntk_t_ Bac_Ntk_t
#define Bac_BoxForEachBo(p, iBox, iTerm, i)
char * Bac_NtkGenerateName(Bac_Ntk_t *p, Bac_ObjType_t Type, Vec_Int_t *vBits)
#define Bac_BoxForEachBoMain(p, iBox, iTerm, i)
void Bac_ManAssignInternWordNames(Bac_Man_t *p)
#define Bac_BoxForEachBi(p, iBox, iTerm, i)
#define Bac_ManForEachNtk(p, pNtk, i)
MACRO DEFINITIONS ///.
#define Bac_NtkForEachBox(p, i)
#define Bac_BoxForEachBiMain(p, iBox, iTerm, i)
Bac_ObjType_t
INCLUDES ///.
ABC_DLL void * Abc_FrameReadLibGen()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Vec_Str_t_ Vec_Str_t
struct Mio_LibraryStruct_t_ Mio_Library_t
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
char * Mio_GateReadPinName(Mio_Gate_t *pGate, int iPin)
char * Mio_GateReadOutName(Mio_Gate_t *pGate)
struct Mio_GateStruct_t_ Mio_Gate_t
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntryTwo(vVec1, vVec2, Entry1, Entry2, i)
#define Vec_IntForEachEntryStartStop(vVec, Entry, i, Start, Stop)
#define Vec_IntForEachEntryTriple(vVec, Entry1, Entry2, Entry3, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.