Introduction to ABC Presenter: Shuo-Ren Lin Instructor: Jie-Hong Roland Jiang 2013/6/7 1.

Slides:



Advertisements
Similar presentations
FRAIGs - A Unifying Representation for Logic Synthesis and Verification - Alan Mishchenko, Satrajit Chatterjee, Roland Jiang, Robert Brayton ERL Technical.
Advertisements

Synchronous Sequential Logic
Figure 4.1. The function f (x1, x2, x3) =  m(0, 2, 4, 5, 6).
ECE 3110: Introduction to Digital Systems
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
Combining Technology Mapping and Retiming EECS 290A Sequential Logic Synthesis and Verification.
Going Places with ABC Berkeley Logic Synthesis and Verification Group.
ELEN 468 Lecture 121 ELEN 468 Advanced Logic Design Lecture 12 Synthesis of Combinational Logic I.
Useful Things to Know Norm. Administrative Midterm Grading Finished –Stats on course homepage –Pickup after this lab lec. –Regrade requests within 1wk.
Introduction to Logic Synthesis Alan Mishchenko UC Berkeley.
EE290A 1 Retiming of AND- INVERTER graphs with latches Juliet Holwill 290A Project 10 May 2005.
Computation Engines: BDDs and SAT (part 2) 290N: The Unknown Component Problem Lecture 8.
1 FRAIGs: Functionally Reduced And-Inverter Graphs Adapted from the paper “FRAIGs: A Unifying Representation for Logic Synthesis and Verification”, by.
DAG-Aware AIG Rewriting Alan Mishchenko, Satrajit Chatterjee, Robert Brayton Department of EECS, University of California Berkeley Presented by Rozana.
Evaluation of Logic by Software Using BDDs Andrew Mihal EE219B Spring /16/2000.
Dynamic Logic Synthesis. Basic Domino CMOS Gate Clock  evaluate transistor precharge transistor inverting buffer N logic.
 2001 CiesielskiBDD Tutorial1 Decision Diagrams Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA
Logic Synthesis Primer
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
1 A Method for Fast Delay/Area Estimation EE219b Semester Project Mike Sheets May 16, 2000.
AOI Logic Implementation © 2014 Project Lead The Way, Inc.Digital Electronics.
Introduction to VHDL (part 2)
Electrical and Computer Engineering Archana Rengaraj ABC Logic Synthesis basics ECE 667 Synthesis and Verification of Digital Systems Spring 2011.
1 Alan Mishchenko UC Berkeley Implementation of Industrial FPGA Synthesis Flow Revisited.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Area and Speed Oriented Implementations of Asynchronous Logic Operating Under Strong Constraints.
ABC: A System for Sequential Synthesis and Verification BVSRC Berkeley Verification and Synthesis Research Center Robert Brayton, Niklas Een, Alan Mishchenko,
Logic Synthesis: Past and Future Alan Mishchenko UC Berkeley.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Cut-Based Inductive Invariant Computation Michael Case 1,2 Alan Mishchenko 1 Robert Brayton 1 Robert Brayton 1 1 UC Berkeley 2 IBM Systems and Technology.
Wenlong Yang Lingli Wang State Key Lab of ASIC and System Fudan University, Shanghai, China Alan Mishchenko Department of EECS University of California,
Logic Gates M. AL-Towaileb1. Introduction Boolean algebra is used to model the circuitry of electronic devices. Each input and each output of such a device.
1 Alan Mishchenko Research Update June-September 2008.
CEC 220 Digital Circuit Design Minterms and Maxterms Monday, January 26 CEC 220 Digital Circuit Design Slide 1 of 11.
Fast Synthesis of Clock Gating from Existing Logic Aaron P. Hurst Univ. of California, Berkeley Portions In Collaboration with… Artur Quiring and Andreas.
A Semi-Canonical Form for Sequential Circuits Alan Mishchenko Niklas Een Robert Brayton UC Berkeley Michael Case Pankaj Chauhan Nikhil Sharma Calypto Design.
Enhancing Model Checking Engines for Multi-Output Problem Solving Alan Mishchenko Robert Brayton Berkeley Verification and Synthesis Research Center Department.
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
Chih-Fan Lai1, J.-H. Roland Jiang1, and Kuo-Hua Wang2
Synthesis for Verification
Alan Mishchenko UC Berkeley
Delay Optimization using SOP Balancing
Robert Brayton Alan Mishchenko Niklas Een
New Directions in the Development of ABC
Alan Mishchenko Satrajit Chatterjee Robert Brayton UC Berkeley
Logic Synthesis Primer
Introduction to Logic Synthesis with ABC
Magic An Industrial-Strength Logic Optimization, Technology Mapping, and Formal Verification System Alan Mishchenko UC Berkeley.
Simple Circuit-Based SAT Solver
Versatile SAT-based Remapping for Standard Cells
SAT-based Methods: Logic Synthesis and Technology Mapping
Synthesis for Verification
SIS: A System for Sequential Circuit Synthesis
Alan Mishchenko University of California, Berkeley
Scalable and Scalably-Verifiable Sequential Synthesis
GLA: Gate-Level Abstraction Revisited
Research Status of Equivalence Checking at Zhejiang University
Resolution Proofs for Combinational Equivalence
Introduction to Logic Synthesis
Recording Synthesis History for Sequential Verification
Delay Optimization using SOP Balancing
Logic Synthesis: Past and Future
Magic An Industrial-Strength Logic Optimization, Technology Mapping, and Formal Verification System Alan Mishchenko UC Berkeley.
A Practical Approach to Arithmetic Circuit Verification
Robert Brayton Alan Mishchenko Niklas Een
SAT-based Methods: Logic Synthesis and Technology Mapping
Introduction to Logic Synthesis with ABC
Robert Brayton Alan Mishchenko Niklas Een
Alan Mishchenko Department of EECS UC Berkeley
Alan Mishchenko Robert Brayton UC Berkeley
Presentation transcript:

Introduction to ABC Presenter: Shuo-Ren Lin Instructor: Jie-Hong Roland Jiang 2013/6/7 1

Outline 0 Introduction 0 Basic data structure 0 Command summary 0 Customize ABC 0 Case study 2013/6/72

Introduction 0 A growing software system for synthesis and verification of binary sequential logic circuits appearing in synchronous hardware designs 2013/6/73

Growing? 2013/6/74

Basic Data Structure 2013/6/75 0 Type vs. functionality 0 mming.pdf mming.pdf Type/FunctionalitySOPBDDAND2Gates NetlistXXX Logic networkXXXX AIGX

Netlist 0 Nets, logic nodes, latches, PIs, and POs 0 A node can be represented using SOP or AIG, or gate from standard cell library 0 APIs (refer to abc.h) 0 Abc_NtkAlloc 0 Abc_NtkCreatePi, Abc_NtkCreatePo 0 Abc_NtkFindOrCreateNet 0 Abc_NtkCreateNode, Abc_NtkCreateLatch 0 Abc_ObjAddFanin 0 Abc_NtkFinalizeRead, Abc_NtkCheck 2013/6/76

Logic Network 0 A netlist, and the nets have been removed 0 Only PI/PO/latch/latch-input/latch-out names are saved (eliminate names of internal nodes) 0 APIs 0 Abc_NtkStartFrom 0 Abc_NtkForEachPi, Abc_NtkForEachCi, … 0 Abc_ObjPatchFanin, Abc_ObjTransferFanout 2013/6/77

AIG 0 Only contain 2-inputs AND and each fanin/fanout edge has an optional complemented attribute 0 APIs 0 Abc_AigAnd, Abc_AigOr, Abc_AigXor, … 0 Abc_AigReplace 2013/6/78

Logic Network vs. AIG 2013/6/79

Command Summary 2013/6/710

Command Summary -- Read 0 read_verilog 0 Support very limited subset of structural Verilog 0 read_blif 0 sis/blif/index.html sis/blif/index.html 0 read_aiger, read_bench, … 2013/6/711

Blif File Sample 2013/6/712

Command Summary -- Print 0 print_fanio 2013/6/713

Command Summary -- Print 0 print_level, print_supp 2013/6/714

Command Summary -- Print 0 print_io, print_stats 2013/6/715

Command Summary -- Comb. Synthesis 0 Combinational synthesis 0 AIGs 0 balance, refactor, rewrite, rr, renode, strash(structure hash) 0 BDDs 0 dsd, collapse 0 Logic network 0 cleanup, sweep 2013/6/716

Command Summary -- Comb. Synthesis 2013/6/717

Command Summary -- Verification 0 cec, sec, sat 2013/6/718

Command Summary -- Show 0 show 0 #node < Install other software 0 GSview 0 Program for opening PostScript files GhostScript 0 Necessary script for Gsview Graphvis 0 Program for generate PostScript files /6/719

Command Summary -- Show 2013/6/720

Command Summary -- Tech. Mapping 0 map 0 Need genlib file (use command read_library) 0 Format: /6/721

Command Summary -- Tech. Mapping 2013/6/722

Customize ABC 2013/6/723

Customize ABC 0 Three Steps 0 Declare command in abc.c 0 Implement command 0 Register command in function Abc_Init (in abc.c) 2013/6/724

Customize ABC: Step1 2013/6/725

Customize ABC: Step2 2013/6/726

Customize ABC: Step3 2013/6/727

Customize ABC: Finish 2013/6/728

Case Study: print_symmetry 0 Count symmetry input pair for each prime output 0 Use incremental SAT solving 0 Check the symmetry between x and y 2013/6/729 ≠ x y x y (ctrl + a + b) * (…

Basic Structure 2013/6/730 void Symmetry( Abc_Ntk_t * pNtk ) { Abc_Ntk_t * pNtk_temp; Abc_Obj_t * pCo; int i; Abc_NtkMakeComb( pNtk, 0); Abc_NtkForEachCo( pNtk, pCo, i) { pNtk_temp = Abc_NtkCreateCone( pNtk, Abc_ObjFanin0(pCo), Abc_ObjName(pCo), 0); pNtk_temp = Abc_NtkStrash( pNtk_temp, 0, 0, 0); //Compute Symm_CO nTotalSymm += Symm_CO; } printf("Total symmetry: %d\n",nTotalSymm); } pNtk pCo

Construct AIG Circuit 2013/6/731 pAig1 = (Aig_Man_t *) Abc_NtkToDar( pNtk_temp, 0, 0); pAig2 = (Aig_Man_t *) Abc_NtkToDar( pNtk_temp, 0, 0); pPi1 = ABC_ALLOC( Aig_Obj_t*, Aig_ManPiNum(pAig1)); pPi2 = ABC_ALLOC( Aig_Obj_t*, Aig_ManPiNum(pAig2)); pAig = Aig_ManStart( Aig_ManObjNumMax(pAig1) + Aig_ManObjNumMax(pAig2) ); // adding aig1 to aig Aig_ManConst1(pAig1)->pData = Aig_ManConst1(pAig); Aig_ManForEachPi( pAig1, pObj, j ) { pObj->pData = Aig_ObjCreatePi( pAig ); pPi1[j] = pObj->pData; } Aig_ManForEachNode( pAig1, pObj, j ) pObj->pData = Aig_And( pAig, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // adding aig2 to aig // same as previous part //building exor miter pObj = Aig_Exor( pAig, Aig_ObjChild0Copy(Aig_ManPo(pAig1,0)),Aig_ObjChild0Copy(Aig_ManPo(pAig2,0)) ); Aig_ObjCreatePo( pAig, pObj ); Aig_ManCleanup(pAig); xor pAig1pAig2

Initialize CNF Manager nProblem = (Aig_ManPiNum(pAig1) - 1) * Aig_ManPiNum(pAig1) / 2; nLiterals = * Aig_ManNodeNum(pAig) + Aig_ManPoNum(pAig) nProblem * ( 8 + (Aig_ManPiNum(pAig1) - 2) * 6); nClauses = * Aig_ManNodeNum(pAig) + Aig_ManPoNum(pAig) nProblem * ( 4 + (Aig_ManPiNum(pAig1) - 2) * 2); pCnf = ABC_ALLOC( Cnf_Dat_t, 1 ); memset( pCnf, 0, sizeof(Cnf_Dat_t) ); pCnf->pMan = pAig; pCnf->nLiterals = nLiterals; pCnf->nClauses = nClauses; pCnf->pClauses = ABC_ALLOC( int *, nClauses + 1 ); pCnf->pClauses[0] = ABC_ALLOC( int, nLiterals ); pCnf->pClauses[nClauses] = pCnf->pClauses[0] + nLiterals; pCnf->pVarNums = ABC_ALLOC( int, Aig_ManObjNumMax(pAig) + nProblem ); 2013/6/732

Assign Variable for( l = 0 ; l < Aig_ManObjNumMax(pAig) + nProblem ; l++ ) pCnf->pVarNums[l] = -1; Number = 1; Aig_ManForEachPo( pAig, pObj, m) pCnf->pVarNums[pObj->Id] = Number++; Aig_ManForEachNode( pAig, pObj, m) pCnf->pVarNums[pObj->Id] = Number++; Aig_ManForEachPi( pAig, pObj, m) pCnf->pVarNums[pObj->Id] = Number++; pCnf->pVarNums[Aig_ManConst1(pAig)->Id] = Number++; l = 0; CtrlVar = ABC_ALLOC( int, nProblem); for( m = 0 ; m < Aig_ManObjNumMax(pAig) + nProblem ; m++) { if(pCnf->pVarNums[m] == -1) { CtrlVar[l] = m; l++; pCnf->pVarNums[m] = Number++; } pCnf->nVars = Number; 2013/6/

Add Clauses of Nodes(ANDs) m = 0; Aig_ManForEachNode( pAig, pObj, m ) { OutVar = pCnf->pVarNums[ pObj->Id ]; pVars[0] = pCnf->pVarNums[ Aig_ObjFanin0(pObj)->Id ]; pVars[1] = pCnf->pVarNums[ Aig_ObjFanin1(pObj)->Id ]; // positive phase *pClas++ = pLits; *pLits++ = 2 * OutVar; *pLits++ = 2 * pVars[0] + !Aig_ObjFaninC0(pObj); *pLits++ = 2 * pVars[1] + !Aig_ObjFaninC1(pObj); // negative phase *pClas++ = pLits; *pLits++ = 2 * OutVar + 1; *pLits++ = 2 * pVars[0] + Aig_ObjFaninC0(pObj); *pClas++ = pLits; *pLits++ = 2 * OutVar + 1; *pLits++ = 2 * pVars[1] + Aig_ObjFaninC1(pObj); } 2013/6/734 sign Var. number

Incremental SAT-Solving pCtrl = ABC_ALLOC( lit, nProblem + 1); nTotalSymm_Po = 0; for( iProblem = 0 ; iProblem < nProblem ; iProblem++) { for( m = 0 ; m < nProblem ; m++ ) { if( m == iProblem ){ pCtrl[m] = lit_read((-1) * (pCnf->pVarNums[ CtrlVar[m] ] + 1)); } else { pCtrl[m] = lit_read((pCnf->pVarNums[ CtrlVar[m] ] + 1)); } pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 0); if( pSat == NULL ) printf("WARNING SAT SOLVER IS NULL!\n"); stats = sat_solver_solve(pSat, &pCtrl[0], &pCtrl[nProblem], , , 0, 0); if( stats == l_False ) nTotalSymm_Po++; } 2013/6/735