ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
bacReadVer.c File Reference
#include "bac.h"
#include "bacPrs.h"
Include dependency graph for bacReadVer.c:

Go to the source code of this file.

Enumerations

enum  Bac_VerType_t {
  PRS_VER_NONE = 0 , PRS_VER_INPUT , PRS_VER_OUTPUT , PRS_VER_INOUT ,
  PRS_VER_WIRE , PRS_VER_MODULE , PRS_VER_ASSIGN , PRS_VER_REG ,
  PRS_VER_ALWAYS , PRS_VER_DEFPARAM , PRS_VER_BEGIN , PRS_VER_END ,
  PRS_VER_ENDMODULE , PRS_VER_UNKNOWN
}
 DECLARATIONS ///. More...
 

Functions

int Psr_ManReadSignalList (Psr_Man_t *p, Vec_Int_t *vTemp, char LastSymb, int fAddForm)
 
void Psr_ManPrintModules (Psr_Man_t *p)
 
Vec_Ptr_tPsr_ManReadVerilog (char *pFileName)
 
void Psr_ManReadVerilogTest (char *pFileName)
 

Enumeration Type Documentation

◆ Bac_VerType_t

DECLARATIONS ///.

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

FileName [bacReadVer.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Hierarchical word-level netlist.]

Synopsis [BLIF writer.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - November 29, 2014.]

Revision [

Id
bacReadVer.c,v 1.00 2014/11/29 00:00:00 alanmi Exp

]

Enumerator
PRS_VER_NONE 
PRS_VER_INPUT 
PRS_VER_OUTPUT 
PRS_VER_INOUT 
PRS_VER_WIRE 
PRS_VER_MODULE 
PRS_VER_ASSIGN 
PRS_VER_REG 
PRS_VER_ALWAYS 
PRS_VER_DEFPARAM 
PRS_VER_BEGIN 
PRS_VER_END 
PRS_VER_ENDMODULE 
PRS_VER_UNKNOWN 

Definition at line 31 of file bacReadVer.c.

31 {
32 PRS_VER_NONE = 0, // 0: unused
33 PRS_VER_INPUT, // 1: input
34 PRS_VER_OUTPUT, // 2: output
35 PRS_VER_INOUT, // 3: inout
36 PRS_VER_WIRE, // 4: wire
37 PRS_VER_MODULE, // 5: module
38 PRS_VER_ASSIGN, // 6: assign
39 PRS_VER_REG, // 7: reg
40 PRS_VER_ALWAYS, // 8: always
41 PRS_VER_DEFPARAM, // 9: always
42 PRS_VER_BEGIN, // 10: begin
43 PRS_VER_END, // 11: end
44 PRS_VER_ENDMODULE, // 12: endmodule
45 PRS_VER_UNKNOWN // 13: unknown
Bac_VerType_t
DECLARATIONS ///.
Definition bacReadVer.c:31
@ PRS_VER_INPUT
Definition bacReadVer.c:33
@ PRS_VER_ENDMODULE
Definition bacReadVer.c:44
@ PRS_VER_UNKNOWN
Definition bacReadVer.c:45
@ PRS_VER_END
Definition bacReadVer.c:43
@ PRS_VER_ASSIGN
Definition bacReadVer.c:38
@ PRS_VER_OUTPUT
Definition bacReadVer.c:34
@ PRS_VER_DEFPARAM
Definition bacReadVer.c:41
@ PRS_VER_INOUT
Definition bacReadVer.c:35
@ PRS_VER_REG
Definition bacReadVer.c:39
@ PRS_VER_BEGIN
Definition bacReadVer.c:42
@ PRS_VER_WIRE
Definition bacReadVer.c:36
@ PRS_VER_MODULE
Definition bacReadVer.c:37
@ PRS_VER_ALWAYS
Definition bacReadVer.c:40
@ PRS_VER_NONE
Definition bacReadVer.c:32

Function Documentation

◆ Psr_ManPrintModules()

void Psr_ManPrintModules ( Psr_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 806 of file bacReadVer.c.

807{
808 char * pName; int i;
809 printf( "Succeeded parsing %d models:\n", Vec_IntSize(&p->vSucceeded) );
810 Psr_ManForEachNameVec( &p->vSucceeded, p, pName, i )
811 printf( " %s", pName );
812 printf( "\n" );
813 printf( "Skipped %d known models:\n", Vec_IntSize(&p->vKnown) );
814 Psr_ManForEachNameVec( &p->vKnown, p, pName, i )
815 printf( " %s", pName );
816 printf( "\n" );
817 printf( "Skipped %d failed models:\n", Vec_IntSize(&p->vFailed) );
818 Psr_ManForEachNameVec( &p->vFailed, p, pName, i )
819 printf( " %s", pName );
820 printf( "\n" );
821}
#define Psr_ManForEachNameVec(vVec, p, pName, i)
Definition bacPrs.h:138
Cube * p
Definition exorList.c:222

◆ Psr_ManReadSignalList()

int Psr_ManReadSignalList ( Psr_Man_t * p,
Vec_Int_t * vTemp,
char LastSymb,
int fAddForm )

Definition at line 450 of file bacReadVer.c.

451{
452 Vec_IntClear( vTemp );
453 while ( 1 )
454 {
455 int Item = Psr_ManReadSignal(p);
456 if ( Item == 0 ) return Psr_ManErrorSet(p, "Cannot read signal in the list.", 0);
457 if ( fAddForm )
458 Vec_IntPush( vTemp, 0 );
459 Vec_IntPush( vTemp, Item );
460 if ( Psr_ManIsChar(p, LastSymb) ) break;
461 if ( !Psr_ManIsChar(p, ',') ) return Psr_ManErrorSet(p, "Expecting comma in the list.", 0);
462 p->pCur++;
463 }
464 return 1;
465}

◆ Psr_ManReadVerilog()

Vec_Ptr_t * Psr_ManReadVerilog ( char * pFileName)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 834 of file bacReadVer.c.

835{
836 Vec_Ptr_t * vPrs = NULL;
837 Psr_Man_t * p = Psr_ManAlloc( pFileName );
838 if ( p == NULL )
839 return NULL;
840 Psr_NtkAddVerilogDirectives( p );
841 Psr_ManReadDesign( p );
842 //Psr_ManPrintModules( p );
843 if ( Psr_ManErrorPrint(p) )
844 ABC_SWAP( Vec_Ptr_t *, vPrs, p->vNtks );
845 Psr_ManFree( p );
846 return vPrs;
847}
#define ABC_SWAP(Type, a, b)
Definition abc_global.h:253
struct Psr_Man_t_ Psr_Man_t
Definition bacPrs.h:83
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
Here is the caller graph for this function:

◆ Psr_ManReadVerilogTest()

void Psr_ManReadVerilogTest ( char * pFileName)

Definition at line 849 of file bacReadVer.c.

850{
851 abctime clk = Abc_Clock();
852 extern void Psr_ManWriteVerilog( char * pFileName, Vec_Ptr_t * p );
853 Vec_Ptr_t * vPrs = Psr_ManReadVerilog( "c/hie/dump/1/netlist_1.v" );
854// Vec_Ptr_t * vPrs = Psr_ManReadVerilog( "aga/me/me_wide.v" );
855// Vec_Ptr_t * vPrs = Psr_ManReadVerilog( "aga/ray/ray_wide.v" );
856 if ( !vPrs ) return;
857 printf( "Finished reading %d networks. ", Vec_PtrSize(vPrs) );
858 printf( "NameIDs = %d. ", Abc_NamObjNumMax(Psr_ManNameMan(vPrs)) );
859 printf( "Memory = %.2f MB. ", 1.0*Psr_ManMemory(vPrs)/(1<<20) );
860 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
861 Psr_ManWriteVerilog( "c/hie/dump/1/netlist_1_out_new.v", vPrs );
862// Psr_ManWriteVerilog( "aga/me/me_wide_out.v", vPrs );
863// Psr_ManWriteVerilog( "aga/ray/ray_wide_out.v", vPrs );
864// Abc_NamPrint( p->pStrs );
865 Psr_ManVecFree( vPrs );
866}
ABC_INT64_T abctime
Definition abc_global.h:332
Vec_Ptr_t * Psr_ManReadVerilog(char *pFileName)
Definition bacReadVer.c:834
void Psr_ManWriteVerilog(char *pFileName, Vec_Ptr_t *p)
int Abc_NamObjNumMax(Abc_Nam_t *p)
Definition utilNam.c:231
Here is the call graph for this function: