📄 svf2loopsvf.h
字号:
/************************************************************************
* SVF2LOOPSVF.H *
* *
* This header file contains the module to compress an SVF file *
* by constructing loops in the SVF. If successful, it writes a *
* temporary LOP file, which is similar to SVF but has the *
* looping constructs. The .LOP file will be converted into VME. *
* If the looping is not successful, the partially created LOP file *
* is removed and the original SVF will be converted into VME. *
* *
*************************************************************************/
/* Global Variables */
#include <math.h>
#define MAXSIZE 8000
#define SIZE 1024
FILE *fp; /*file pointer to loop SVF */
char* Pattern[SIZE]; /*holds the patterns*/
int numOfOccurrences[SIZE]; /*tracks the number of times a pattern occurs*/
long int startPositions[SIZE]; /*tracks the starting positions of each pattern */
char globalTemplate[MAXSIZE];/*matching template set */
char **globalValues;
char **tokenList1;
char **tokenList2;
int newTokenCounter;
int oldTokenCounter;
int numOccur;
int globalCounter;
int globalSDR;
int getGRA;
char globalRepeatAddress[MAXSIZE];
char tempGlobalRepeatAddress[MAXSIZE];
int SDRValues[SIZE];
int RepeatArray[SIZE];
char shiftdirection[4];
FILE * loopfptr;
int CreateLoopFile( char * a_pSVFFilename );
void DetermineLoops( char * a_pSVFFilename );
void BuildSDRTable( char * a_pSVFFilename );
long int GetNextSIRPos( long int a_liPosition, char * a_pSVFFilename );
void GetNextSIRLine( char * a_pszSIRLine, FILE * a_fptr );
void GetSIRCode( char * a_pszSIRCode, const char * a_pszSIRLine );
long int GetNextSetPos( const char * a_pszBegPattern, const char * a_pszSVFFilename, long int a_liStartPosition );
int CompareData( const char * a_pszSVFFilename );
int IsLineComplete( const char * a_pszSVFLine );
void GetCompleteLine( FILE * a_fptrRead, char * a_pszSVFLine );
int DetermineTemplateLine(char *string1, char *string2);
/* parses two strings to find common
elements */
void WriteToGlobalValues(int offset); /* writes data that is not repeatable */
int IsAllZeros(char *a_string); /* determines if the string contains all zeros*/
int SetGlobalSDRValue(char *array[], int size);
void FormatGlobalTemplate(char* patternTemplate);
int DetermineShiftStatus(char *address1, char *address2, int *size); /* determines if
address is right shifted or left shifted and size of shift*/
void FreeMem();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -