Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths Namrata Shekhar, Priyank Kalla, Florian Enescu, Sivaram.

Slides:



Advertisements
Similar presentations
Cryptography and Network Security, Finite Fields From Third Edition by William Stallings Lecture slides by Mustafa Sakalli so much modified..
Advertisements

Cryptography and Network Security
ECE Synthesis & Verification 1 ECE 667 Synthesis and Verification of Digital Systems Formal Verification Combinational Equivalence Checking.
More about Polynomials
FPGA Latency Optimization Using System-level Transformations and DFG Restructuring Daniel Gomez-Prado, Maciej Ciesielski, and Russell Tessier Department.
1 Don´t Care Minimization of *BMDs: Complexity and Algorithms Christoph Scholl Marc Herbstritt Bernd Becker Institute of Computer Science Albert-Ludwigs-University.
Richard Fateman CS 282 Lecture 21 Basic Domains of Interest used in Computer Algebra Systems Lecture 2.
Class Presentation on Binary Moment Diagrams by Krishna Chillara Base Paper: “Verification of Arithmetic Circuits using Binary Moment Diagrams” by.
Department of Electrical and Computer Engineering M.A. Basith, T. Ahmad, A. Rossi *, M. Ciesielski ECE Dept. Univ. Massachusetts, Amherst * Univ. Bretagne.
Cryptography and Network Security Chapter 4
DATE-2002TED1 Taylor Expansion Diagrams: A Compact Canonical Representation for Symbolic Verification M. Ciesielski, P. Kalla, Z. Zeng B. Rouzeyre Electrical.
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
Interpolants [Craig 1957] G(y,z) F(x,y)
Research Interests, Projects, Collaborations & Opportunities Priyank Kalla Electrical & Computer Engineering University of Utah.
ECE Synthesis & Verification - Lecture 18 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Word-level.
Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann.
Introduction Polynomials
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
Taylor Expansion Diagrams (TED): Verification EC667: Synthesis and Verification of Digital Systems Spring 2011 Presented by: Sudhan.
Equivalence Verification of Polynomial Datapaths with Fixed-Size Bit-Vectors using Finite Ring Algebra Namrata Shekhar, Priyank Kalla, Florian Enescu,
1 High-Level Design Verification using Taylor Expansion Diagrams: First Results Priyank Kalla ECE Department University of Utah Maciej Ciesielski ECE Department.
Using secret sharing for searching in encrypted data.
By Tariq Bashir Ahmad Taylor Expansion Diagrams (TED) Adapted from the paper M. Ciesielski, P. Kalla, Z. Zeng, B. Rouzeyre,”Taylor Expansion Diagrams:
Gröbner Bases Bernd Sturmfels Mathematics and Computer Science University of California at Berkeley.
Manindra Agrawal NUS / IITK
Division Algorithm Let (x) and g(x) be polynomials with g(x) of lower degree than (x) and g(x) of degree one or more. There exists unique polynomials.
FINITE FIELDS 7/30 陳柏誠.
CPSC 3730 Cryptography and Network Security
Polynomial Datapaths Optimization Using Finite Abstract Algebra(I) Presenter: 陳炳元 Graduate Institute of Electronics Engineering Graduate Institute of Electronics.
Information Security and Management 4. Finite Fields 8
Cryptography and Network Security Introduction to Finite Fields.
By: Hector L Contreras SSGT / USMC
Copyright © 2014, 2010 Pearson Education, Inc. Chapter 2 Polynomials and Rational Functions Copyright © 2014, 2010 Pearson Education, Inc.
Cyclic Codes for Error Detection W. W. Peterson and D. T. Brown by Maheshwar R Geereddy.
Do Now: Factor the following polynomial:. By the end of this chapter, you will be able to: - Identify all possible rational zeroes - Identify all actual.
SIMULATING THE CONSTRUCTIONS OF FINITE FIELDS USING MAPLETS L OEKY H ARYANTO Mathematics Department, Hasanuddin University,
Session 1 Stream ciphers 1.
Algebraic Techniques To Enhance Common Sub-expression Extraction for Polynomial System Synthesis Sivaram Gopalakrishnan Synopsys Inc., Hillsboro, OR –
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Verification & Synthesis of Arithmetic Datapaths using Finite Ring Algebra Priyank Kalla Priyank Kalla Electrical and Computer Engineering University of.
SIMULATION BOUNDS FOR EQUIVALENCE VERIFICATION OF ARITHMETIC DATAPATHS WITH FINITE WORD-LENGTH OPERANDS Namrata Shekhar, Priyank Kalla, M. Brandon Meredith.
Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths GIEE, NTU ALCom Lab Presenter: 陳炳元.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths GIEE, NTU ALCom Lab Presenter: 陳炳元.
Tallinn University of Technology, Department of Computer Engineering, November 2006 Digitaalsüsteemide verifitseerimine Arvutitehnika erikursus II, IAY0110,
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Date: 2.4 Real Zeros of Polynomial Functions
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Verifying Programs with BDDs Topics Representing Boolean functions with Binary Decision Diagrams Application to program verification class-bdd.ppt
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
1 Class Presentation on Binary Moment Diagrams by Krishna Chillara Base Paper: “Verification of Arithmetic Circuits with Binary Moment Diagrams” by Randal.
Test complexity of TED operations Use canonical property of TED for - Software Verification - Algorithm Equivalence check - High Level Synthesis M ac iej.
Real Zeros of Polynomial Functions
Finding Zeros of Polynomial Functions Taylor Johnson Elizabethtown Community & Technical College.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
The Relation Induced by a Partition
3.3 Dividing Polynomials.
LIAL HORNSBY SCHNEIDER
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
Mathematical Background: Extension Fields
Gröbner Bases Bernd Sturmfels Mathematics and Computer Science
The Fundamental Theorem of Algebra and Complete Factorization
3.3 Dividing Polynomials.
ECE 667 Synthesis and Verification of Digital Systems
LPSAT: A Unified Approach to RTL Satisfiability
Cryptology Design Fundamentals
Mathematical Background: Extension Finite Fields
Presentation transcript:

Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths Namrata Shekhar, Priyank Kalla, Florian Enescu, Sivaram Gopalakrishnan Namrata Shekhar 1, Priyank Kalla 1, Florian Enescu 2, Sivaram Gopalakrishnan 1 1 Department of Electrical and Computer Engineering, University of Utah, Salt Lake City, UT Department of Mathematics and Statistics, Georgia State University, Atlanta, GA-30303

Outline  Overall Verification Problem Our Focus: Equivalence Verification of Fixed-size Arithmetic DatapathsOur Focus: Equivalence Verification of Fixed-size Arithmetic Datapaths Applications: Polynomial Signal Processing, etc.Applications: Polynomial Signal Processing, etc.  Problem Modeling and Approach Polynomials over Finite Integer RingsPolynomials over Finite Integer Rings  Limitations of Previous Work  Our Contributions Exploiting Vanishing Polynomials for Equivalence TestExploiting Vanishing Polynomials for Equivalence Test Related to Ideal Membership TestingRelated to Ideal Membership Testing  Algorithm Design and Experimental Verification Runs  Results  Conclusions & Future Work

The Equivalence Verification Problem

Fixed-Size (m) Data-path: Modeling   Control the datapath size: Fixed size bit-vectors ( m ) * * 8-bit 16-bit 32-bit * * 8-bit  Bit-vector of size m : integer values in 0,…, 2 m -1 Fixed-size (m) bit-vector arithmetic Polynomials reduced %2 m Algebra over the ring Z 2 m

Fixed-Size Data-path: Implementation   Signal Truncation Keep lower order m-bits, ignore higher bits f % 2 m ≡ g % 2 m   Fractional Arithmetic with rounding Keep higher order m-bits, round lower order bits f - f %2 m ≡ g - g%2 m 2 m 2 m   Saturation Arithmetic Saturate at overflow Used in image-processing applications

Example: Anti-Aliasing Function   F = 1 = 1 = 2√a 2 + b 2 2√x [ Peymandoust et al, TCAD‘03 ]   Expand into Taylor series F ≈ 1 x 6 – 9 x x – 75 x x 2 – 81 x   Scale coefficients; Implement as bit-vectors MAC x = a 2 + b 2 coefficients ab x F DFF

Example: Anti-Aliasing Function   F 1 [15:0], F 2 [15:0], x[15:0]   F 1 = 156x x x x x x   F 2 = 156x x x x x x   F 1 ≠ F 2 ; F 1 [15:0] = F 2 [15:0]   Transform the problem F 1 - F 2 = 57344x x x x x ≡ 0 % 2 16   F 1 - F 2 : Vanishing polynomial

Previous Work: Function Representations   Boolean Representations ( f: B → B ) BDDs, MTBDDs, ADDs etc.   Moment Diagrams ( f: B → Z ) BMDs, K*BMDs, HDDs etc.   Canonical DAGs for Polynomials ( f: Z → Z ) Taylor Expansion Diagrams (TEDs)   Required: Representation for f: Z 2 m → Z 2 m

Previous Work: Others   SAT and MILP-based techniques Suitable for linear/multi-linear forms   Word-level ATPG, congruence closure based techniques, co-operative decision procedures Solve linear congruences under modulo arithmetic   Theorem-Proving (HOL), term-rewriting Works when datapath size can be abstracted using data dependence, symmetry, and other abstractions Here, datapath size ( m ) defines ring cardinality ( Z 2 m )

Previous Work: Symbolic Algebra   MODDs: Based on finite fields [Pradhan et al, DATE ‘04] Literal based decomposition   Symbolic Algebra Tools: Singular, Macaulay, Maple, Mathematica, Zen, etc. Polynomial equivalence over R, Q, C, Z p Unique Factorization Domains (UFDs) : Uniquely factorize into irreducibles Match corresponding coefficients to prove equivalence

Why is the Problem Difficult?   Z 2 m is a non-UFD f = x 2 + x in Z 6 can be factorized as  Atypical approach required to prove equivalence f xx+1 f x+3x+4

Proposed Solution   Equivalence can be proved by f (x) - g(x) ≡ 0 % 2 m : Zero Equivalence   Exploit Vanishing polynomials   An instance of Ideal Membership Testing   Proposed solution based on: Niven & Warren’s work [Proc. Amer. Math.Soc, 1957] Singmaster’s work [J. Num. Th, 1974]

Ideal Membership Testing   h:P →Q defined by % 2 m x in P maps to x %2 m in Q Ideal members map to 0   Derive Ideal of Vanishing Polynomials in Z 2 m   Grobner's basis? Buchberger's algorithm?   Known for UFDs, but for Z 2 m ? P Q Ideal x x % 2 m h: % 2 m 0 f g f – g ?

Ideal Membership Testing in Z p   Fermat’s Little Theorem: x p ≡ x (mod p) or x p – x ≡ 0 (mod p) x p –x generates the vanishing ideal in Z p [x]   f(x) = 0 % p iff f(x) = (x p -x)g(x)   Z p : Principal Ideal Domain   This does not follow in Z 2 m

Ideal Membership Testing   Generate the ideal of vanishing polynomials % 2 m ? Vanishing Ideal is finitely generated [Niven et al, Am. Math. Soc., ‘57]   Need an algorithm for membership testing Representative expression for members of this ideal [ Singmaster, J. Num. Th ‘74] P Q Ideal x x % 2 m h: % 2 m 0 f g f – g ?

Results From Number Theory   n! divides a product of n consecutive numbers. 4! divides 99 X 100 X 101 X 102   Find least n such that 2 m |n! Smarandache Function (SF). SF(2 3 ) = 4, since 2 3 |4!   2 m divides the product of n = SF(2 m ) consecutive numbers

Results From Number Theory   f ≡ g in Z 2 3 or (f - g) ≡ 0 % |(f - g) in Z |4! 4! divides the product of 4 consecutive numbers  A polynomial as a product of 4 consecutive numbers? (x+1) Write (f-g) as a product of SF(2 3 ) = 4 consecutive numbers

Results From Number Theory   f ≡ g in Z 2 3 or (f - g) ≡ 0 % |(f - g) in Z |4! 4! divides the product of 4 consecutive numbers  A polynomial as a product of 4 consecutive numbers? (x+1)(x+2) Write (f-g) as a product of SF(2 3 ) = 4 consecutive numbers

Results From Number Theory   f ≡ g in Z 2 3 or (f - g) ≡ 0 % |(f - g) in Z |4! 4! divides the product of 4 consecutive numbers  A polynomial as a product of 4 consecutive numbers? (x+1)(x+2)(x+3) Write (f-g) as a product of SF(2 3 ) = 4 consecutive numbers

Results From Number Theory   f ≡ g in Z 2 3 or (f - g) ≡ 0 % |(f - g) in Z |4! 4! divides the product of 4 consecutive numbers  A polynomial as a product of 4 consecutive numbers? (x+1)(x+2)(x+3)(x+4) Write (f-g) as a product of SF(2 3 ) = 4 consecutive numbers

Basis for factorization   S 0 (x) = 1   S 1 (x) = (x + 1)   S 2 (x) = (x + 1)(x + 2) = Product of 2 consecutive numbers   S 3 (x) = (x + 1)(x + 2)(x + 3) = Product of 3 consecutive numbers   …   S n (x) = (x + n) S n-1 (x) = Product of n consecutive numbers Rule 1: Factorize into atleast S n (x) to vanish, where n = SF(2 m ).

Example 1: Vanishing polynomial   4 th degree polynomial p in Z 2 3 ; SF(2 3 ) = 4   p = x 4 +2x 3 + 3x 2 + 2x   p can be written as a product of 4 consecutive numbers. or p = (x+1)(x+2)(x+3)(x+4) = S 4 (x) in Z 2 3.   p is a vanishing polynomial.

Example 2: Vanishing polynomial module fixed_bit_width (x, f, g); input [2:0] x; output [2:0] f, g; assign f[2:0] = x 2 + 6x – 3; assign g[2:0] = 5x 2 + 2x + 5;  h(x) = f(x) – g(x) = 4x 2 + 4x  h(x) ≡ 0 for all values of x in {0,…,7}  4x 2 +4x not equal to (x+1)(x+2)(x+3)(x+4)  Required: To show that h(x) is a vanishing polynomial in Z 2 3

Constraints on the Coefficient   h(x) = 4x 2 + 4x = 4(x+1)(x+2)   In Z 2 3, SF(2 3 ) = 4. Product of 4 consecutive numbers: S 4 (x) = (x+1) (x+2) (x+3) (x+4) Rule 2: Coefficient has to be a multiple of b k = 2 m /gcd(k!, 2 m )  Here, Coefficient of h(x) = 4, Degree of h(x) = 2  b 2 = 2 3 /gcd(2!, 2 3 ) = 4 is a multiple of the coefficient

Constraints on the Coefficient   h(x) = 4x 2 + 4x = 4(x+1)(x+2) compensated by constant   In Z 2 3, SF(2 3 ) = 4. Product of 4 consecutive numbers: S 4 (x) = (x+1) (x+2) (x+3) (x+4) missing factors Rule 2: Coefficient has to be a multiple of b k = 2 m /gcd(k!, 2 m )  Here, Coefficient of h(x) = 4, Degree of h(x) = k = 2  b 2 = 2 3 /gcd(2!, 2 3 ) = 4 is a multiple of the coefficient

Deciding Vanishing Polynomials   n = SF(2 m ), i.e. the least n such that 2 m |n!   F n is an arbitrary polynomial in Z 2 m [x]   a k is an arbitrary integer   b k = 2 m /gcd(k!,2 m )  Polynomial F in Z 2 m vanishes if F = F n S n + Σ n-1 a k b k S k k=0 Rule 1 Rule 2

Algorithm Input: poly, 2 m Calculate n = SF(2 m ) k = n: Reduce according to Rule 1 Divide by S n If remainder is zero, F = F n S n, else Continue poly = 4x 2 + 4x in Z n = SF(2 3 ) = k = 4: Divide by S 4 Degree (poly) = 2 < degree(S 4 ) = 4 quo = 0, rem = 4x 2 + 4x F 4 = 0; Continue Example 1 F = F n S n + Σ n-1 a k b k S k k=0

Algorithm Input: poly, 2 m Calculate n = SF(2 m ) k = n: Reduce according to Rule 1 Divide by S n If remainder is zero, F = F n S n, else Continue poly = 4x 2 + 4x in Z n = SF(2 3 ) = k = 4: Divide by S 4 Degree (poly) = 2 < degree(S 4 ) = 4 quo = 0, rem = 4x 2 + 4x F 4 = 0; Continue Example 1 F = F n S n + Σ n-1 a k b k S k k=0

Algorithm Reduce according to Rule 2. Divide by S n-1 to S 0 Check if quotient is a multiple of b k = 2 m /gcd(k!,2 m ) If remainder is zero, stop. Else, continue k = 3: Divide by S 3 degree (poly) = 2 < degree(S 3 ) = 3 quo= 0, rem = 4x 2 + 4x continue k = 2: Divide by S 2 quo = 4; rem = 0 b 2 = 2 3 /gcd(2!,2 3 ) = 4 a 2 = quo/ b 2 = 1 Є Z Example 1 poly = a 2.b 2.S 2 = 1.4.(x+1)(x+2) ≡ 0 in Z 2 3 F = F n S n + Σ n-1 a k b k S k k=0

Algorithm Reduce according to Rule 2. Divide by S n-1 to S 0 Check if quotient is a multiple of b k = 2 m /gcd(k!,2 m ) If remainder is zero, stop. Else, continue k = 3: Divide by S 3 degree (poly) = 2 < degree(S 3 ) = 3 quo= 0, rem = 4x 2 + 4x continue k = 2: Divide by S 2 quo = 4; rem = 0 b 2 = 2 3 /gcd(2!,2 3 ) = 4 a 2 = quo/ b 2 = 1 Є Z Example 1 poly = a 2.b 2.S 2 = 1.4.(x+1)(x+2) ≡ 0 in Z 2 3 F = F n S n + Σ n-1 a k b k S k k=0

Example 2   poly = 5x 2 + 3x + 7 in Z 2 3   n = SF(2 3 ) = 4   degree (poly) = 2 < n. Skip Rule 1 and goto Rule 2   Divide by S 2 quo = 5; rem = 5 + 4x b 2 = 2 3 /gcd(2!,2 3 ) = 4 a 2 = quo/ b 2 is not in Z   poly does not satisfy Rule 2   poly is not a vanishing polynomial in Z 2 3

Experimental Setup   Distinct RTL designs are input to GAUT [ U. de LESTER, 2004]   Extract data-flow graphs for RTL designs   Construct the corresponding polynomial representations ( f, g ) Extract bit-vector size   Find the difference ( f-g ) and invoke the algorithm   Algorithm implemented in MAPLE   Compare with BMD, SAT and MILP   Complexity: O(n+1), n = SF(Z 2 m )

Results

Applications to Synthesis  Datapath size ( m ): 8 bits  SF(2 8 ) = 10  Polynomial can be factorized into S 10 (x)

Conclusions   Technique to verify equivalence of univariate polynomial RTL computations   Fixed-size bit-vector arithmetic is polynomial algebra over finite integer rings   f(x) % 2 m ≡ g(x) % 2 m is transformed into f(x) - g(x) ≡ 0 % 2 m   Efficient algorithm to determine vanishing polynomials

Future Work   Future Work involves extensions for - Multivariate datapaths with fixed bit-widths [To Appear, ICCAD ‘05] Multiple Word-length Implementations [In Review, DATE ‘06]   Verification of Rounding and Saturation Arithmetic   Formal Error Analysis   Applications to Synthesis – Need cost models for low power, area, delay

Questions?