ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
extraUtilDsd.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "extra.h"
#include "misc/vec/vec.h"
#include "misc/vec/vecHsh.h"
#include "misc/util/utilTruth.h"
#include "bool/rsb/rsb.h"
Include dependency graph for extraUtilDsd.c:

Go to the source code of this file.

Classes

struct  Sdm_Dsd_t_
 
struct  Sdm_Man_t_
 

Macros

#define DSD_CLASS_NUM   595
 

Typedefs

typedef typedefABC_NAMESPACE_IMPL_START struct Sdm_Dsd_t_ Sdm_Dsd_t
 DECLARATIONS ///.
 

Functions

void Sdm_ManPrintDsdStats (Sdm_Man_t *p, int fVerbose)
 FUNCTION DEFINITIONS ///.
 
Hsh_IntMan_tSdm_ManBuildHashTable (Vec_Int_t **pvConfgRes)
 
void Sdm_ManPrecomputePerms (Sdm_Man_t *p)
 
void Sdm_ManPrintPerm (unsigned s)
 
int Sdm_ManCheckDsd6 (Sdm_Man_t *p, word t)
 
int Sdm_ManComputeFunc (Sdm_Man_t *p, int iDsdLit0, int iDsdLit1, int *pCut, int uMask, int fXor)
 
int Sdm_ManReadDsdVarNum (Sdm_Man_t *p, int iDsd)
 
int Sdm_ManReadDsdAndNum (Sdm_Man_t *p, int iDsd)
 
int Sdm_ManReadDsdClauseNum (Sdm_Man_t *p, int iDsd)
 
word Sdm_ManReadDsdTruth (Sdm_Man_t *p, int iDsd)
 
char * Sdm_ManReadDsdStr (Sdm_Man_t *p, int iDsd)
 
void Sdm_ManReadCnfCosts (Sdm_Man_t *p, int *pCosts, int nCosts)
 
Sdm_Man_tSdm_ManAlloc ()
 
void Sdm_ManFree (Sdm_Man_t *p)
 
Sdm_Man_tSdm_ManRead ()
 
void Sdm_ManQuit ()
 
int Sdm_ManCanRead ()
 
void Sdm_ManTest ()
 
void Sdm_ManDivCollect_rec (word t, Vec_Wrd_t **pvDivs)
 
void Sdm_ManDivTest ()
 

Macro Definition Documentation

◆ DSD_CLASS_NUM

#define DSD_CLASS_NUM   595

Definition at line 48 of file extraUtilDsd.c.

Typedef Documentation

◆ Sdm_Dsd_t

typedef typedefABC_NAMESPACE_IMPL_START struct Sdm_Dsd_t_ Sdm_Dsd_t

DECLARATIONS ///.

CFile****************************************************************

FileName [extraUtilDsd.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [extra]

Synopsis [File management utilities.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
extraUtilDsd.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 38 of file extraUtilDsd.c.

Function Documentation

◆ Sdm_ManAlloc()

Sdm_Man_t * Sdm_ManAlloc ( )

Function*************************************************************

Synopsis [Manager manipulation.]

Description []

SideEffects []

SeeAlso []

Definition at line 1038 of file extraUtilDsd.c.

1039{
1040 Sdm_Man_t * p;
1041 p = ABC_CALLOC( Sdm_Man_t, 1 );
1043 return p;
1044}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
Cube * p
Definition exorList.c:222
void Sdm_ManPrecomputePerms(Sdm_Man_t *p)
struct Sdm_Man_t_ Sdm_Man_t
Definition extra.h:225
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManBuildHashTable()

Hsh_IntMan_t * Sdm_ManBuildHashTable ( Vec_Int_t ** pvConfgRes)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 710 of file extraUtilDsd.c.

711{
712 FILE * pFile;
713 char * pFileName = "dsdfuncs6.dat";
714 int RetValue, size = Extra_FileSize( pFileName ) / 12; // 2866420
715 Vec_Wrd_t * vTruthRes = Vec_WrdAlloc( size );
716 Vec_Int_t * vConfgRes = Vec_IntAlloc( size );
717 Hsh_IntMan_t * pHash;
718
719 pFile = fopen( pFileName, "rb" );
720 RetValue = fread( Vec_WrdArray(vTruthRes), sizeof(word), size, pFile );
721 RetValue = fread( Vec_IntArray(vConfgRes), sizeof(int), size, pFile );
722 vTruthRes->nSize = size;
723 vConfgRes->nSize = size;
724 // create hash table
725 pHash = Hsh_WrdManHashArrayStart( vTruthRes, 1 );
726 // cleanup
727 if ( pvConfgRes )
728 *pvConfgRes = vConfgRes;
729 else
730 Vec_IntFree( vConfgRes );
731 Vec_WrdFree( vTruthRes );
732// Hsh_IntManStop( pHash );
733 return pHash;
734}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
int Extra_FileSize(char *pFileName)
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
unsigned long long size
Definition giaNewBdd.h:39
struct Hsh_IntMan_t_ Hsh_IntMan_t
Definition vecHsh.h:66
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition vecWrd.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManCanRead()

int Sdm_ManCanRead ( )

Definition at line 1080 of file extraUtilDsd.c.

1081{
1082 char * pFileName = "dsdfuncs6.dat";
1083 FILE * pFile = fopen( pFileName, "rb" );
1084 if ( pFile == NULL )
1085 return 0;
1086 fclose( pFile );
1087 return 1;
1088}

◆ Sdm_ManCheckDsd6()

int Sdm_ManCheckDsd6 ( Sdm_Man_t * p,
word t )

Function*************************************************************

Synopsis [Checks hash table for DSD class.]

Description []

SideEffects []

SeeAlso []

Definition at line 895 of file extraUtilDsd.c.

896{
897 int fCompl, Entry, Config;
898 if ( (fCompl = (t & 1)) )
899 t = ~t;
900 Entry = *Hsh_IntManLookup( p->pHash, (unsigned *)&t );
901 if ( Entry == -1 )
902 return -1;
903 Config = Vec_IntEntry( p->vConfgRes, Entry );
904 if ( fCompl )
905 Config ^= (1 << 16);
906 return Config;
907}
Here is the caller graph for this function:

◆ Sdm_ManComputeFunc()

int Sdm_ManComputeFunc ( Sdm_Man_t * p,
int iDsdLit0,
int iDsdLit1,
int * pCut,
int uMask,
int fXor )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 920 of file extraUtilDsd.c.

921{
922// int fVerbose = 0;
923 int i, Config, iClass, fCompl, Res;
924 int PermMask = uMask & 0x3FFFF;
925 int ComplMask = uMask >> 18;
926 word Truth0, Truth1p, t0, t1, t;
927 p->nAllDsd++;
928
929 assert( uMask > 1 );
930 assert( iDsdLit0 < DSD_CLASS_NUM * 2 );
931 assert( iDsdLit1 < DSD_CLASS_NUM * 2 );
932 Truth0 = p->pDsd6[Abc_Lit2Var(iDsdLit0)].uTruth;
933 Truth1p = Vec_WrdEntry( p->vPerm6, Abc_Lit2Var(iDsdLit1) * 720 + Vec_IntEntry(p->vMap2Perm, PermMask ) );
934 if ( ComplMask )
935 for ( i = 0; i < 6; i++ )
936 if ( (ComplMask >> i) & 1 )
937 Truth1p = Abc_Tt6Flip( Truth1p, i );
938 t0 = Abc_LitIsCompl(iDsdLit0) ? ~Truth0 : Truth0;
939 t1 = Abc_LitIsCompl(iDsdLit1) ? ~Truth1p : Truth1p;
940 t = fXor ? t0 ^ t1 : t0 & t1;
941/*
942if ( fVerbose )
943{
944Sdm_ManPrintPerm( PermMask ); printf( "\n" );
945Extra_PrintBinary( stdout, &ComplMask, 6 ); printf( "\n" );
946Kit_DsdPrintFromTruth( (unsigned *)&Truth0, 6 ); printf( "\n" );
947Kit_DsdPrintFromTruth( (unsigned *)&Truth1p, 6 ); printf( "\n" );
948Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
949}
950*/
951 // find configuration
952 Config = Sdm_ManCheckDsd6( p, t );
953 if ( Config == -1 )
954 {
955 p->nNonDsd++;
956 return -1;
957 }
958
959 // get the class
960 iClass = Config >> 17;
961 fCompl = (Config >> 16) & 1;
962 Config &= 0xFFFF;
963
964 // set the function
965 Res = Abc_Var2Lit( iClass, fCompl );
966
967 // update cut
968 assert( (Config >> 6) < 720 );
969 if ( pCut )
970 {
971 int pLeavesNew[6] = { -1, -1, -1, -1, -1, -1 };
972 assert( pCut[0] <= 6 );
973 for ( i = 0; i < pCut[0]; i++ )
974 pLeavesNew[(int)(p->Perm6[Config >> 6][i])] = Abc_LitNotCond( pCut[i+1], (Config >> i) & 1 );
975 pCut[0] = p->pDsd6[iClass].nVars;
976 for ( i = 0; i < pCut[0]; i++ )
977 assert( pLeavesNew[i] != -1 );
978 for ( i = 0; i < pCut[0]; i++ )
979 pCut[i+1] = pLeavesNew[i];
980 }
981 assert( iClass < DSD_CLASS_NUM );
982 p->nCountDsd[iClass]++;
983 return Res;
984}
#define DSD_CLASS_NUM
int Sdm_ManCheckDsd6(Sdm_Man_t *p, word t)
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManDivCollect_rec()

void Sdm_ManDivCollect_rec ( word t,
Vec_Wrd_t ** pvDivs )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso [] Function*************************************************************

Synopsis [Collect DSD divisors of the function.]

Description []

SideEffects []

SeeAlso []

Definition at line 1167 of file extraUtilDsd.c.

1168{
1169 int i, Config, Counter = 0;
1170 // check if function is decomposable
1171 Config = Sdm_ManCheckDsd6( s_SdmMan, t );
1172 if ( Config != -1 && (Config >> 17) < 2 )
1173 return;
1174 for ( i = 0; i < 6; i++ )
1175 {
1176 if ( !Abc_Tt6HasVar( t, i ) )
1177 continue;
1178 Sdm_ManDivCollect_rec( Abc_Tt6Cofactor0(t, i), pvDivs );
1179 Sdm_ManDivCollect_rec( Abc_Tt6Cofactor1(t, i), pvDivs );
1180 Counter++;
1181 }
1182 if ( Config != -1 && Counter >= 2 && Counter <= 4 )
1183 {
1184 Vec_WrdPush( pvDivs[Counter], (t & 1) ? ~t : t );
1185// Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
1186 }
1187}
void Sdm_ManDivCollect_rec(word t, Vec_Wrd_t **pvDivs)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManDivTest()

void Sdm_ManDivTest ( )

Definition at line 1188 of file extraUtilDsd.c.

1189{
1190// word u, t0, t1, t = ABC_CONST(0xB0F0BBFFB0F0BAFE);
1191// word u, t0, t1, t = ABC_CONST(0x3F1F3F13FFDFFFD3);
1192 word u, t0, t1, t = ABC_CONST(0x3F3FFFFF37003700);
1193 Rsb_Man_t * pManRsb = Rsb_ManAlloc( 6, 200, 3, 1 );
1194 Vec_Wrd_t * pvDivs[7] = { NULL };
1195 Vec_Wrd_t * vDivs = Vec_WrdAlloc( 100 );
1196 int i, RetValue;
1197
1198 // collect divisors
1199 for ( i = 2; i <= 4; i++ )
1200 pvDivs[i] = Vec_WrdAlloc( 100 );
1201 Sdm_ManDivCollect_rec( t, pvDivs );
1202 for ( i = 2; i <= 4; i++ )
1203 Vec_WrdUniqify( pvDivs[i] );
1204
1205 // prepare the set
1206 vDivs = Vec_WrdAlloc( 100 );
1207 for ( i = 0; i < 6; i++ )
1208 Vec_WrdPush( vDivs, s_Truths6[i] );
1209 for ( i = 2; i <= 4; i++ )
1210 Vec_WrdAppend( vDivs, pvDivs[i] );
1211 for ( i = 2; i <= 4; i++ )
1212 Vec_WrdFree( pvDivs[i] );
1213
1214 Vec_WrdForEachEntry( vDivs, u, i )
1215 {
1216 printf( "%2d : ", i );
1217// Kit_DsdPrintFromTruth( (unsigned *)&u, 6 );
1218 printf( "\n" );
1219 }
1220
1221 RetValue = Rsb_ManPerformResub6( pManRsb, 6, t, vDivs, &t0, &t1, 1 );
1222 if ( RetValue )
1223 {
1224// Kit_DsdPrintFromTruth( (unsigned *)&t0, 6 ); printf( "\n" );
1225// Kit_DsdPrintFromTruth( (unsigned *)&t1, 6 ); printf( "\n" );
1226 printf( "Decomposition exits.\n" );
1227 }
1228
1229
1230 Vec_WrdFree( vDivs );
1231 Rsb_ManFree( pManRsb );
1232}
#define ABC_CONST(number)
PARAMETERS ///.
Definition abc_global.h:240
Rsb_Man_t * Rsb_ManAlloc(int nLeafMax, int nDivMax, int nDecMax, int fVerbose)
MACRO DEFINITIONS ///.
Definition rsbMan.c:45
void Rsb_ManFree(Rsb_Man_t *p)
Definition rsbMan.c:63
int Rsb_ManPerformResub6(Rsb_Man_t *p, int nVars, word uTruth, Vec_Wrd_t *vDivTruths, word *puTruth0, word *puTruth1, int fVerbose)
Definition rsbDec6.c:694
typedefABC_NAMESPACE_HEADER_START struct Rsb_Man_t_ Rsb_Man_t
INCLUDES ///.
Definition rsb.h:39
#define Vec_WrdForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecWrd.h:54
Here is the call graph for this function:

◆ Sdm_ManFree()

void Sdm_ManFree ( Sdm_Man_t * p)

Definition at line 1045 of file extraUtilDsd.c.

1046{
1047 Vec_WrdFree( p->vPerm6 );
1048 Vec_IntFree( p->vMap2Perm );
1049 Vec_IntFree( p->vConfgRes );
1050 Vec_IntFree( p->pHash->vData );
1051 Hsh_IntManStop( p->pHash );
1052 ABC_FREE( p );
1053}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ Sdm_ManPrecomputePerms()

void Sdm_ManPrecomputePerms ( Sdm_Man_t * p)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 747 of file extraUtilDsd.c.

748{
749 int nVars = 6;
750 // 0(1:1) 1(2:1) 2(4:2) 3(10:6) 4(33:23) 5(131:98) 6(595:464)
751 int nClasses[7] = { 1, 2, 4, 10, 33, 131, 595 };
752 int nPerms = Extra_Factorial( nVars );
753// int nSwaps = (1 << nVars);
754 int * pComp, * pPerm;
755 int i, k, x, One, OneCopy, Num;
756 Vec_Int_t * vVars;
757 abctime clk = Abc_Clock();
758 assert( p->pDsd6 == NULL );
759 p->pDsd6 = s_DsdClass6;
760 // precompute schedules
761 pComp = Extra_GreyCodeSchedule( nVars );
762 pPerm = Extra_PermSchedule( nVars );
763 // map numbers into perms
764 p->vMap2Perm = Vec_IntStartFull( (1<<(3*nVars)) );
765 // store permutations
766 One = 0;
767 for ( x = 0; x < nVars; x++ )
768 {
769 p->Perm6[0][x] = (char)x;
770 One |= (x << (3*x));
771 }
772// Vec_IntWriteEntry( p->vMap2Perm, One, 0 );
773 OneCopy = One;
774 for ( k = 0; k < nPerms; k++ )
775 {
776 if ( k > 0 )
777 for ( x = 0; x < nVars; x++ )
778 p->Perm6[k][x] = p->Perm6[k-1][x];
779 ABC_SWAP( char, p->Perm6[k][pPerm[k]], p->Perm6[k][pPerm[k]+1] );
780
781 Num = ( (One >> (3*(pPerm[k] ))) ^ (One >> (3*(pPerm[k]+1))) ) & 7;
782 One ^= (Num << (3*(pPerm[k] )));
783 One ^= (Num << (3*(pPerm[k]+1)));
784
785 Vec_IntWriteEntry( p->vMap2Perm, One, k );
786
787// Sdm_ManPrintPerm( One );
788// for ( x = 0; x < nVars; x++ )
789// printf( "%d ", p->Perm6[k][x] );
790// printf( "\n" );
791 }
792 assert( OneCopy == One );
793 // fill in the gaps
794 vVars = Vec_IntAlloc( 6 );
795 Vec_IntForEachEntry( p->vMap2Perm, Num, i )
796 {
797 // mark used variables
798 int Count = 0;
799 One = i;
800 Vec_IntFill( vVars, 6, 0 );
801 for ( k = 0; k < nVars; k++ )
802 {
803 int iVar = ((One >> (3*k)) & 7);
804 if ( iVar >= nVars && iVar < 7 )
805 break;
806 if ( iVar != 7 )
807 {
808 if ( Vec_IntEntry( vVars, iVar ) == 1 )
809 break;
810 Vec_IntWriteEntry( vVars, iVar, 1 );
811 Count++;
812 }
813 }
814 // skip ones with dups and complete
815 if ( k < nVars || Count == nVars )
816 continue;
817 // find unused variables
818 for ( x = k = 0; k < 6; k++ )
819 if ( Vec_IntEntry(vVars, k) == 0 )
820 Vec_IntWriteEntry( vVars, x++, k );
821 Vec_IntShrink( vVars, x );
822 // fill in used variables
823 x = 0;
824 for ( k = 0; k < nVars; k++ )
825 {
826 int iVar = ((One >> (3*k)) & 7);
827 if ( iVar == 7 )
828 One ^= ((Vec_IntEntry(vVars, x++) ^ 7) << (3*k));
829 }
830 assert( x == Vec_IntSize(vVars) );
831 // save this one
832 assert( Vec_IntEntry( p->vMap2Perm, One ) != -1 );
833 Vec_IntWriteEntry( p->vMap2Perm, i, Vec_IntEntry(p->vMap2Perm, One) );
834/*
835 // mapping
836 Sdm_ManPrintPerm( i );
837 printf( "-> " );
838 Sdm_ManPrintPerm( One );
839 printf( "\n" );
840*/
841 }
842 Vec_IntFree( vVars );
843
844 // store permuted truth tables
845 assert( p->vPerm6 == NULL );
846 p->vPerm6 = Vec_WrdAlloc( nPerms * DSD_CLASS_NUM );
847 for ( i = 0; i < nClasses[nVars]; i++ )
848 {
849 word uTruth = s_DsdClass6[i].uTruth;
850 for ( k = 0; k < nPerms; k++ )
851 {
852 uTruth = Abc_Tt6SwapAdjacent( uTruth, pPerm[k] );
853 Vec_WrdPush( p->vPerm6, uTruth );
854 }
855 assert( uTruth == s_DsdClass6[i].uTruth );
856 }
857 ABC_FREE( pPerm );
858 ABC_FREE( pComp );
859 // build hash table
860 p->pHash = Sdm_ManBuildHashTable( &p->vConfgRes );
861 Abc_PrintTime( 1, "Setting up DSD information", Abc_Clock() - clk );
862}
#define ABC_SWAP(Type, a, b)
Definition abc_global.h:253
ABC_INT64_T abctime
Definition abc_global.h:332
Hsh_IntMan_t * Sdm_ManBuildHashTable(Vec_Int_t **pvConfgRes)
int * Extra_PermSchedule(int n)
int Extra_Factorial(int n)
int * Extra_GreyCodeSchedule(int n)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManPrintDsdStats()

void Sdm_ManPrintDsdStats ( Sdm_Man_t * p,
int fVerbose )

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 676 of file extraUtilDsd.c.

677{
678 int i, Absent = 0;
679 for ( i = 0; i < DSD_CLASS_NUM; i++ )
680 {
681 if ( p->nCountDsd[i] == 0 )
682 {
683 Absent++;
684 continue;
685 }
686 if ( fVerbose )
687 {
688 printf( "%5d : ", i );
689 printf( "%-20s ", p->pDsd6[i].pStr );
690 printf( "%8d ", p->nCountDsd[i] );
691 printf( "\n" );
692 }
693 }
694 printf( "Unused classes = %d (%.2f %%). ", Absent, 100.0 * Absent / DSD_CLASS_NUM );
695 printf( "Non-DSD cuts = %d (%.2f %%). ", p->nNonDsd, 100.0 * p->nNonDsd / Abc_MaxInt(1, p->nAllDsd) );
696 printf( "\n" );
697}
Here is the caller graph for this function:

◆ Sdm_ManPrintPerm()

void Sdm_ManPrintPerm ( unsigned s)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 876 of file extraUtilDsd.c.

877{
878 int i;
879 for ( i = 0; i < 6; i++ )
880 printf( "%d ", (s >> (3*i)) & 7 );
881 printf( " " );
882}

◆ Sdm_ManQuit()

void Sdm_ManQuit ( )

Definition at line 1074 of file extraUtilDsd.c.

1075{
1076 if ( s_SdmMan != NULL )
1077 Sdm_ManFree( s_SdmMan );
1078 s_SdmMan = NULL;
1079}
void Sdm_ManFree(Sdm_Man_t *p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManRead()

Sdm_Man_t * Sdm_ManRead ( )

Definition at line 1067 of file extraUtilDsd.c.

1068{
1069 if ( s_SdmMan == NULL )
1070 s_SdmMan = Sdm_ManAlloc();
1071 memset( s_SdmMan->nCountDsd, 0, sizeof(int) * DSD_CLASS_NUM );
1072 return s_SdmMan;
1073}
Sdm_Man_t * Sdm_ManAlloc()
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManReadCnfCosts()

void Sdm_ManReadCnfCosts ( Sdm_Man_t * p,
int * pCosts,
int nCosts )

Definition at line 1017 of file extraUtilDsd.c.

1018{
1019 int i;
1020 assert( nCosts == DSD_CLASS_NUM );
1021 pCosts[0] = pCosts[1] = 0;
1022 for ( i = 2; i < DSD_CLASS_NUM; i++ )
1023 pCosts[i] = Sdm_ManReadDsdClauseNum( p, i );
1024}
int Sdm_ManReadDsdClauseNum(Sdm_Man_t *p, int iDsd)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sdm_ManReadDsdAndNum()

int Sdm_ManReadDsdAndNum ( Sdm_Man_t * p,
int iDsd )

Definition at line 1001 of file extraUtilDsd.c.

1002{
1003 return p->pDsd6[iDsd].nAnds;
1004}

◆ Sdm_ManReadDsdClauseNum()

int Sdm_ManReadDsdClauseNum ( Sdm_Man_t * p,
int iDsd )

Definition at line 1005 of file extraUtilDsd.c.

1006{
1007 return p->pDsd6[iDsd].nClauses;
1008}
Here is the caller graph for this function:

◆ Sdm_ManReadDsdStr()

char * Sdm_ManReadDsdStr ( Sdm_Man_t * p,
int iDsd )

Definition at line 1013 of file extraUtilDsd.c.

1014{
1015 return p->pDsd6[iDsd].pStr;
1016}
Here is the caller graph for this function:

◆ Sdm_ManReadDsdTruth()

word Sdm_ManReadDsdTruth ( Sdm_Man_t * p,
int iDsd )

Definition at line 1009 of file extraUtilDsd.c.

1010{
1011 return p->pDsd6[iDsd].uTruth;
1012}
Here is the caller graph for this function:

◆ Sdm_ManReadDsdVarNum()

int Sdm_ManReadDsdVarNum ( Sdm_Man_t * p,
int iDsd )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 997 of file extraUtilDsd.c.

998{
999 return p->pDsd6[iDsd].nVars;
1000}
Here is the caller graph for this function:

◆ Sdm_ManTest()

void Sdm_ManTest ( )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 1101 of file extraUtilDsd.c.

1102{
1103 Sdm_Man_t * p;
1104 int iDsd0 = 4;
1105 int iDsd1 = 6;
1106 int iDsd;
1107 int uMask = 0x3FFFF ^ ((7 ^ 0) << 6) ^ ((7 ^ 1) << 9);
1108 int pCut[7] = { 4, 10, 20, 30, 40 };
1109// Sdm_ManPrintPerm( uMask );
1110 p = Sdm_ManAlloc();
1111 iDsd = Sdm_ManComputeFunc( p, iDsd0, iDsd1, pCut, uMask, 0 );
1112 Sdm_ManFree( p );
1113}
int Sdm_ManComputeFunc(Sdm_Man_t *p, int iDsdLit0, int iDsdLit1, int *pCut, int uMask, int fXor)
Here is the call graph for this function: