abcBridge-0.15: Bindings for ABC, A System for Sequential Synthesis and Verification

CopyrightGalois, Inc. 2010-2014
LicenseBSD3
Maintainerjhendrix@galois.com
Stabilityexperimental
Portabilitynon-portable (c2hs, language extensions)
Safe HaskellNone
LanguageHaskell98

Data.ABC.Internal.GIA

Contents

Description

Bindings to aig/gia/gia.h for manipulating and running algorithms on scalable and-inverter graphs (GIA), a representation that is optimized for memory-efficiency. These functions power the next-generation of ABC algorithms that have not been officially released yet, and can be identified by the prefix of an ampersand, as in &cec, in the interactive ABC interface.

Synopsis

Documentation

type Gia_Obj_t = Ptr Gia_Obj_t_ Source

A pointer to a GIA object. GIA objects are pointers to structs in ABC, and represent literals in the AIG. The low-order bit of the pointer is set to 1 if the literal has been complemented, and so care must be taken to only dereference positive pointers. The object is also a bitfield, so care must be taken when accessing fields.

Pointers to GIA objects may be invalidated when adding a new object.

newtype GiaVar Source

Also known as the node's id. No complement info.

Constructors

GiaVar 

Fields

unGiaVar :: CInt
 

newtype GiaLit Source

Literals store complement information.

Constructors

GiaLit 

Fields

unGiaLit :: CInt
 

giaVarLit :: GiaVar -> GiaLit Source

Returns positive literal associated to var.

Memory management

Base

Network getters

giaManCiVar :: Gia_Man_t -> CInt -> IO GiaVar Source

Get var index of combinational input at given index.

giaManCoVar :: Gia_Man_t -> CInt -> IO GiaVar Source

Get combinational output at given index.

giaManCi :: Gia_Man_t -> CInt -> IO Gia_Obj_t Source

Get combinational input at given index.

giaManCo :: Gia_Man_t -> CInt -> IO Gia_Obj_t Source

Get combinational output at given index.

giaManObj :: Gia_Man_t -> GiaVar -> IO Gia_Obj_t Source

Return object associated with gia var.

giaObjIsCo :: Gia_Obj_t -> IO Bool Source

Returns true if this is a combinational output (latch or primary output).

giaObjDiff0 :: Gia_Obj_t -> IO CUInt Source

Returns iDiff0 field of object Note: iDiff0 is a bitfield, so this may be more likely to break on unexpected compilers.

giaObjDiff1 :: Gia_Obj_t -> IO CUInt Source

Returns iDiff1 field of object Note: iDiff1 is a bitfield, so this may be more likely to break on unexpected compilers.

giaObjFaninC0 :: Gia_Obj_t -> IO Bool Source

Get the complement attribute of first fanin

giaObjMark0 :: Gia_Obj_t -> IO Bool Source

Get first user defined mark

giaObjMark1 :: Gia_Obj_t -> IO Bool Source

Get second user defined mark

giaObjId :: Gia_Man_t -> Gia_Obj_t -> IO GiaVar Source

Returns the variable index associated with the object.

Handling literals

giaRegular :: Gia_Obj_t -> Gia_Obj_t Source

Remove negation.

Iterators

Construction

giaManAppendAnd :: Gia_Man_t -> GiaLit -> GiaLit -> IO GiaLit Source

This directly appends the literal to the GIA bypassing any hash-consing.

Functions

giaAiger.c

giaDup.c

giaDupLit :: Gia_Man_t -> Gia_Man_t -> GiaLit -> IO GiaLit Source

giaManDupDfsLazyLit pNew p l copies a lit l in p to pNew and returns the lit in pNew.

giaHash.c

giaMan.c

misc