An Algebra of Switching Networks

Similar documents
1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Engr354: Digital Logic Circuits

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Unit 4. Combinational Circuits

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

6.5 Improper integrals

CS 573 Automata Theory and Formal Languages

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Symmetrical Components 1

System Validation (IN4387) November 2, 2012, 14:00-17:00

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

Linear Algebra Introduction

Introduction to Olympiad Inequalities

Chapter 4 State-Space Planning

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

Bisimulation, Games & Hennessy Milner logic

CS 491G Combinatorial Optimization Lecture Notes

THE PYTHAGOREAN THEOREM

Exercise 3 Logic Control

NON-DETERMINISTIC FSA

Hardware Verification 2IMF20

Dorf, R.C., Wan, Z. T- Equivalent Networks The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000

Electromagnetism Notes, NYU Spring 2018

Arrow s Impossibility Theorem

Lecture Notes No. 10

8 THREE PHASE A.C. CIRCUITS

Propositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.

#A42 INTEGERS 11 (2011) ON THE CONDITIONED BINOMIAL COEFFICIENTS

Arrow s Impossibility Theorem

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

A Study on the Properties of Rational Triangles

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

Alpha Algorithm: Limitations

The Word Problem in Quandles

Logic Synthesis and Verification

Behavior Composition in the Presence of Failure

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

PAIR OF LINEAR EQUATIONS IN TWO VARIABLES

Nondeterministic Finite Automata

Lecture 1 - Introduction and Basic Facts about PDEs

Part 4. Integration (with Proofs)

Nondeterministic Automata vs Deterministic Automata

12.4 Similarity in Right Triangles

Discrete Structures Lecture 11

ANALYSIS AND MODELLING OF RAINFALL EVENTS

Finite State Automata and Determinisation

Logic Synthesis and Verification

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

1.3 SCALARS AND VECTORS

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

Abstraction of Nondeterministic Automata Rong Su

TOPIC: LINEAR ALGEBRA MATRICES

ILLUSTRATING THE EXTENSION OF A SPECIAL PROPERTY OF CUBIC POLYNOMIALS TO NTH DEGREE POLYNOMIALS

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

Test Generation from Timed Input Output Automata

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Lecture Summaries for Multivariable Integral Calculus M52B

Lecture 6. CMOS Static & Dynamic Logic Gates. Static CMOS Circuit. PMOS Transistors in Series/Parallel Connection

Outline. Theory-based Bayesian framework for property induction Causal structure induction

Hybrid Systems Modeling, Analysis and Control

Math 32B Discussion Session Week 8 Notes February 28 and March 2, f(b) f(a) = f (t)dt (1)

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh

Lecture 2: Cayley Graphs

CHENG Chun Chor Litwin The Hong Kong Institute of Education

TIME AND STATE IN DISTRIBUTED SYSTEMS

Ling 3701H / Psych 3371H: Lecture Notes 9 Hierarchic Sequential Prediction

Polynomials. Polynomials. Curriculum Ready ACMNA:

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras

NEW CIRCUITS OF HIGH-VOLTAGE PULSE GENERATORS WITH INDUCTIVE-CAPACITIVE ENERGY STORAGE

Lesson 2: The Pythagorean Theorem and Similar Triangles. A Brief Review of the Pythagorean Theorem.

Lecture 6: Coding theory

Lecture 3: Equivalence Relations

MAT 403 NOTES 4. f + f =

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

Generalization of 2-Corner Frequency Source Models Used in SMSIM

SECTION A STUDENT MATERIAL. Part 1. What and Why.?

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

y1 y2 DEMUX a b x1 x2 x3 x4 NETWORK s1 s2 z1 z2

QUADRATIC EQUATION. Contents

University of Sioux Falls. MAT204/205 Calculus I/II

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

Maintaining Mathematical Proficiency

Robustness of Evolvable Hardware in the Case of Fault and Environmental Change

Lecture 8: Abstract Algebra

Chapter 8 Roots and Radicals

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

s the set of onsequenes. Skeptil onsequenes re more roust in the sense tht they hold in ll possile relities desried y defult theory. All its desirle p

A Differential Approach to Inference in Bayesian Networks

Learning Objectives of Module 2 (Algebra and Calculus) Notes:

Metodologie di progetto HW Technology Mapping. Last update: 19/03/09

Transition systems (motivation)

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Learning Partially Observable Markov Models from First Passage Times

Alpha Algorithm: A Process Discovery Algorithm

Probability. b a b. a b 32.

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

Transcription:

Miroeletronis System Design Reserh Group Shool of Eletril nd Eletroni Engineering An Alger of Swithing Networks Andrey Mokhov Tehnil Report Series NCL-EEE-MSD-TR-2012-178 April 2012 (revised Novemer 2014)

Contt: ndrey.mokhov@nl..uk Supported y EPSRC grnts EP/K001698/1 nd EP/K034448/1 NCL-EEE-MSD-TR-2012-178 Copyright 2012 Newstle University Miroeletronis System Design Reserh Group Shool of Eletril nd Eletroni Engineering Merz Court Newstle University Newstle upon Tyne, NE1 7RU, UK http://syn.org.uk/

Andrey Mokhov: An Alger of Swithing Networks An Alger of Swithing Networks Andrey Mokhov April 2012 (revised Novemer 2014) Is it right, tht regrdless of the existene of the lredy elorted lger of logi, the speifi lger of swithing networks should e onsidered s utopi? Pul Ehrenfest, 1910 Astrt A swith, mehnil or eletril, is fundmentl uilding element of digitl systems. The theory of swithing networks, or simply iruits, dtes k to Shnnon s thesis (1937), where he employed Boolen lger for resoning out the funtionlity of swithing networks, nd grph theory for desriing nd mnipulting their struture. Following this lssi pproh, one n dedue funtionlity from given struture vi nlysis, nd rete struture implementing speified funtionlity vi synthesis. The use of two mthemtil lnguges leds to lnguge rrier whenever iruit desription is hnged in one lnguge, it is neessry to trnslte the hnge into the other one to keep oth desriptions synhronised. For exmple, hving mended iruit struture one nnot e ertin tht the iruit funtionlity hs not een roken, nd vie vers. This work presents unified lger of swithing networks. Its elements re iruits rther thn just Boolen funtions (s in Boolen lger) or verties/edges (s in grph theory). This unified pproh llows one to express oth the funtionlity nd struture of swithing networks in the sme mthemtil lnguge, thus removing the lnguge rrier. It lso rings in new methods of iruit omposition tht re of high importne for modern system design nd development, whih hevily rely on the reuse of omponents nd interfes. In this pper we demonstrte how to use the lger to formlly trnsform iruits, reson out their properties, nd even solve equtions whose unknowns re iruits. 1 Introdution The dwn of omputer engineering ws mrked y mnul design t the level of si swithing elements, suh s eletromehnil relys. The elements were lrge nd expensive y tody s stndrds, thus eh one hd to e ounted for. Prior to the seminl work y Shnnon [34], the design of rely networks ws tril nd error proess on grphs nd required gret del of ingenuity. Shnnon demonstrted tht Boolen lger ould e used to reson out the funtionlity of rely networks nd desried the first nlysis nd NCL-EEE-MSD-TR-2012-178, Newstle University 1

Andrey Mokhov: An Alger of Swithing Networks synthesis methods [34][35] tht lierted designers from routine explortion of possile network strutures. Huffmn [18], Hohn nd Shissler [16], s well s mny other reserhers, ontriuted to the theory of swithing networks over the next dedes. Relys were very unrelile due to mehnil swithing, therefore the issue of network reliility ws very importnt t tht time. Swithing networks were uilt to mitigte the unertinty of individul relys y providing struturl redundny; it eme ler tht hving only the funtionl speifition of network in terms of system of Boolen equtions ws not enough nd other, non-funtionl, requirements hd to e onsidered. The dvent of more relile swithing elements, suh s vuum tues nd trnsistors, hnged the ourse of swithing theory, however. The reserh tivity shifted towrds the utomtion of very-lrge-sle integrted (VLSI) iruits [6][7][23][33]. As semiondutor tehnology mrhed forwrd, the ost of mnufturing single trnsistor rpidly dropped nd eme negligile. During tht time, mnul low-level design ws ndoned, nd engineers egn thinking nd designing systems in terms of higher-level omponents (first logi gtes, then rithmeti units, nd now even whole IP ores!) nd their onfigurtions rther thn in terms of trnsistors nd eletril iruits. Nowdys, swithing networks re hidden under multiple lyers of strtion nd re no longer synthesised diretly; insted, they re struturlly put together to llow s muh omponent reuse s possile nd to void extremely expensive re-design, verifition nd test. 1.1 Motivtion This work is motivted y the return of the unertinty relted hllenges nd new requirements to swithing networks imposed y emerging tehnologies nd design styles: Unertinty & energy. A onsequene of the shrinking size of trnsistor is the growing unertinty of its hrteristis, whih leds to lower reliility nd shorter life-spn of lrge trnsistor networks [5]. Individul reliility s well s olletive energy onsumption of trnsistors re dominnt prolems tht nnot e solved t the level of system omponents. One gin designers re fored to onsider non-funtionl spets of si swithing elements nd their networks [2]. In ddition to environmentl nd intrinsi unertinties, designers of seure eletronis often introdue intended unertinty in the systems in order to rndomise their timing nd power hrteristis therey reduing their vulnerility to Differentil Power Anlysis ttks [32]. New tehnologies. Novel swithing tehnologies ring new non-funtionl phenomen into onsidertion. For exmple, ron nnotues [37] n potentilly reple onventionl trnsistors for tehnologies eyond 10nm, ut nnotue networks re very sensitive to noise nd nnotue imperfetions, thus requiring synthesis of so-lled immune networks. Another exmple is nno-eletro-mehnil (NEM) relys [21][22] tht n hieve zero power lekge nd hve other unique hrteristis. However, in ddition to eletril delys, NEM relys exhiit (muh longer) mehnil delys nd lot of effort is urrently eing dedited to the synthesis of ustom swithing networks, where ll mehnil delys our onurrently [36]. Multimodlity. Modern miroeletroni systems re expeted to support numer of different operting modes in order to e dptive to dynmilly hnging environmentl onditions, suh s temperture, supply voltge [29], nd energy vilility [43][42]. The design of suh systems requires methods for omposing sets of modes (funtionlities) under ertin struturl onstrints on the resulting swithing network, e.g., its size. This is diffiult to hieve using stndrd design methodologies providing poor support for funtionl NCL-EEE-MSD-TR-2012-178, Newstle University 2

Andrey Mokhov: An Alger of Swithing Networks omposition. To sum up, there is need for methodologies for forml resoning out non-funtionl properties of swithing networks (reliility, timing, nd energy). Suh methodologies must support oth struturl nd funtionl omposition nd e slle enough to ope with the size of tody s swithing networks. 1.2 Stte-of-the-rt nd eyond Existing formlisms for modelling struturl nd funtionl spets of swithing networks n e divided into two groups. Struturl formlisms. Grphs re very nturl representtion for swithing networks. Hene, mny hrdwre desription lnguges (HDLs) were developed to desrie iruit struture y hierrhil grphs. The two most populr HDLs re Verilog [9] nd VHDL [20]; they re onvenient for struturl omposition of iruits nd provide support for strtion, enpsultion nd reuse. Unfortuntely, they lk preise forml semntis, thus most properties n only e heked through simultion. Bls [1] nd Tngrm [38] provide methodology for struturl omposition of hndshke omponents, omponent-level optimistion, nd ompiltion of the result into iruits. However, these lnguges seprte speifition of omponents nd their tul iruit implementtion, nd one nnot use them to reson out swith-level iruit properties. Funtionl formlisms. Mny high-level formlisms re trgeted t modelling funtionl (or ehviourl) system properties: Petri Nets [11][31], vrious proess lgers (CSP [14], π-lulus [24], DI lger [19]), Cusl Nets [39], Conurrent Kleene Alger [15], nd mny others. They exel t modelling high-level proesses, resoure llotion onflits, uslity nd onurreny; however, they re not well-suited for modelling low-level swithing networks of rel-life size. For exmple, prtilly importnt tsk of heking two iruits for equivlene my e very hrd or even undeidle if the networks re represented with Petri Nets [13]. For this reson, funtionlity of swithing networks is still modelled using Boolen onnetivity mtries, s first suggested y Shnnon [34] k in 1937 nd further eluidted y Hohn et l. [16] nd Brynt [6]. This pproh is inherently ineffiient, euse n n n Boolen mtrix is required to desrie the funtionlity of network with n nodes. Furthermore, Boolen onnetivity mtrix n only desrie iruit s funtionlity; ll its struturl properties re lost. There is ler seprtion etween the ove groups: the former is onerned with struturl or implementtion properties, while the ltter is trgeted t the speifition. One n trnslte etween the lnguges from different groups vi nlysis nd synthesis, ut these opertions re non-trivil nd time-onsuming. A key ojetive of this work is to remove this lnguge rrier. In this pper we present new lger of swithing networks tht provides mthemtil instrument for resoning out struturl nd funtionl properties of networks of interonneted Boolen swithes. A network is represented y n lgeri expression, nd the xioms of the lger ensure tht ny permissile rewriting of the expression preserves the network funtionlity; the network struture, however, n e hnged ritrrily, therey llowing explortion of the non-funtionl design spe. The prolem of nlysis therefore orresponds to rewriting given expression into ertin norml form, while the prolem of synthesis trnsltes to tht of simplifying n expression sujet to set of non-funtionl onstrints. We strt y giving kground on swithing networks nd Boolen lger in Setion 2. The lger of swithing networks is then defined xiomtilly in Setion 3. Algeri nlysis nd synthesis of swithing networks re illustrted y exmples in Setions 4 nd 5. NCL-EEE-MSD-TR-2012-178, Newstle University 3

Andrey Mokhov: An Alger of Swithing Networks 2 Swithing networks This setion introdues swithing networks, our grphil nottion, nd priniples of Shnnon s Boolen nlysis [34]. x x y x x () f = 1 () f = 0 () f = x (d) f d = x y y (e) f e = x y (f) Simplified () Figure 1: Swithing networks nd their onnetivity funtions Struturlly, swithing networks [34] onsist of nodes nd swithes tht estlish (resp., rek) n eletril onnetion etween two nodes when eing ON (resp., OFF). Fig. 1 shows severl networks nd their onnetivity funtions 1 tht evlute to 1 when the nodes re onneted. The first two networks orrespond to the si ses when swith is lwys ON (the onnetivity funtion f = 1) nd lwys OFF ( f = 0). The next se hs the simplest non-trivil onnetivity funtion f = x, where signl x ontrols the swith. A series onnetion of two swithes yields f d = x y, where the Boolen opertor x y represents the logil proposition x nd y : the nodes re onneted only when oth swithes re ON. The lst exmple is prllel onnetion of two swithes tht yields f e = x y, where the Boolen opertor x y represents the logil proposition x or y. We will further represent swithes y simple edges nnotted with onnetivity funtions, see Fig. 1(f). Using this nturl Boolen interprettion of swithing networks, one n write lgeri expressions orresponding to onnetivity funtions etween ny pir of nodes in given network, thus performing its Boolen nlysis. The inverse tsk of finding swithing network relising giving set of onnetivity funtions is lled synthesis. See [16] for n extensive review of these two fundmentl onepts. Seprtion of the struture (represented grphilly y swithing network itself) nd the funtionlity (ptured y systems of Boolen equtions) leds to n inility to formlly reson out the funtionl orretness of struturl trnsformtions. For exmple, onsider the two networks shown in Fig. 2(). The leftmost network is just swith with onnetivity funtion f = x. The rightmost network is n ingenious trnsformtion of the former imed t inresing its reliility. Assume tht ny swith n fil, i.e., eome permnently ON or OFF, with ertin proility p. Then, in order for the trnsformed network to fil, t lest two swithes must fil muh more rre event hppening with proility proportionl to p 2. The trnsformed network hs the sme onnetivity funtion f = (x x) (x x) = x, thus the networks re funtionlly equivlent. However, the only wy to prove the orretness of this simple struturl trnsformtion is to ompute the onnetivity funtions nd ompre them. This is time-onsuming tsk tht nnot e routinely performed for modern networks omprising illions of swithes. Moreover, there is no effiient proedure for proving tht the trnsformed network hs higher reliility. Figure 2() demonstrtes nother exmple of the sme prolem the fmous delt-wye trnsformtion [34], whih preserves the pirwise onnetivity funtions etween the nodes, nd, ut redues the overll struturl omplexity of the network. The im of this pper is to develop forml pproh for resoning out struturl trnsformtions tht preserve the funtionlity of swithing network. The next setion introdues the pproh, while Setion 4 demonstrtes its pplition to the exmples disussed ove. 1 The funtion of onnetivity is lso known under the nmes of hindrne funtion [35] nd trnsmission funtion [18]. NCL-EEE-MSD-TR-2012-178, Newstle University 4

Andrey Mokhov: An Alger of Swithing Networks x x x x x x y y z x z y x z () Inresing network reliility () Delt-wye trnsformtion Figure 2: Exmples of funtionlly equivlent trnsformtions 3 Alger In this setion we present new lger of swithing networks tht is uilt on the formlisms of Conditionl Prtil Order Grphs [25][30] nd Prmeterised Grphs [27] nd inherits their key priniple: it hieves ompt representtion of multiple grphs y overlying them in grph nnotted with Boolen onditions. Grphs with onditions were historilly used to represent swithing networks [6][34], ut struturl opertions on suh grphs were never xiomtised nd the funtionl orretness of eh struturl trnsformtion hd to e proved in n d ho mnner, not suitle for utomtion. 3.1 Undireted grphs The struture of swithing network n e nturlly represented y n undireted grph G = (V, E), where verties V orrespond to nodes of the network, nd edges E V V model the sttes of swithes onneting the nodes. For pir of nodes u,v V, n unordered pir of verties {u,v} elongs to the set of edges (denoted s uv E for short) if there is n ON swith etween them, i.e., the nodes re onneted. We ssume tht node is onneted to itself, hene vv E for ll v V. If there is n OFF swith etween nodes u,v V or no swith t ll then the orresponding edge is missing, tht is, uv / E. We denote the empty grph (/0, /0) y ε, nd the singleton grphs ({v},{{v,v}}) simply y v, for ny v V, where V is fixed universe of verties. Let G 1 = (V 1,E 1 ) nd G 2 = (V 2,E 2 ) e two grphs. Here V 1 nd V 2, s well s E 1 nd E 2, re not neessrily disjoint. The following two opertions on grphs re defined: Overly: G 1 + G 2 df = (V 1 V 2,E 1 E 2 ) Connetion: G 1 G 2 df = (V 1 V 2,E 1 E 2 V 1 V 2 ) An exmple in Fig. 3 illustrtes these opertions: G 1 + G 2 is grph otined y overlying grphs G 1 nd G 2, i.e., it ontins the union of their nodes nd edges; G 1 G 2 ontins the union plus the edges onneting every node in G 1 to every node in G 2. Connetion hs higher preedene thn overly +. By omining these opertions one n onstrut expressions using the empty grph ε nd the singleton grphs v s the si uilding elements. Any grph G = (V,E) n e onstruted in this wy, for exmple, y overlying ll of its edges: G = uv E u v. This is not the only wy, nor is it the est one with respet to the size of the expression. A nturl question rises: given two expressions, how n we deide if they represent grphs tht re equivlent in some sense? Semntilly, two swithing networks re funtionlly equivlent if they hve the sme set of nodes, nd the onnetivity funtion for eh pir of nodes in the first network equls tht of the orresponding pir in NCL-EEE-MSD-TR-2012-178, Newstle University 5

Andrey Mokhov: An Alger of Swithing Networks d d d () G 1 () G 2 () G 1 + G 2 (d) G 1 G 2 Figure 3: Opertions on grphs (self-loops re not shown) the seond network. A more onise definition is tht two networks represented y grphs G 1 = (V 1,E 1 ) nd G 2 = (V 2,E 2 ) re funtionlly equivlent if their trnsitive losures G 1 = (V 1,E1 ) nd G 2 = (V 2,E2 ) oinide. The networks in Fig. 3(,d) re equivlent s their nodes re onneted either diretly or vi intermedite nodes. We ll grphs with suh equivlene reltions trnsitive s in [27]. The equivlene reltion is given y the following set of xioms: + is ommuttive nd ssoitive: p + q = q + p, (p + q) + r = p + (q + r). is ommuttive: p q = q p. The empty grph ε is n identity of : p ε = p. distriutes over +: p (q + r) = p q + p r. Deomposition: (p q) r = p q + p r + q r. Closure: if q ε then (p q) r = p q + q r. Using the losure xiom in omintion with deomposition, one n expnd ny grph to its trnsitive losure, or redue it to its trnsitive redution (y removing ll trnsitive edges). This ensures tht grph equlity is defined modulo trnsitivity. Note tht the ondition q ε is neessry, s otherwise + = ε + ε = ( ε) =, whih is lerly undesirle. One n oserve tht if we drop the xioms of deomposition nd losure, the remining xioms re true in rithmeti, where + nd stnd for ddition nd multiplition, respetively. Hene, undireted trnsitive grphs n e viewed s numers equipped with two dditionl xioms. One n esily hek tht ll the xioms re stisfied t the semnti level of undireted grphs nd swithing networks, thus the lger is sound. Completeness follows from the existene of the nonil form introdued in the next setion. Minimlity of the set of xioms n e proved y enumerting the fixed-size models of the lger with the help of the ALG tool [3]: it turns out tht removing ny of the xioms leds to different numer of non-isomorphi models of prtiulr size, implying tht ll the xioms re neessry. Hene the following result holds. NCL-EEE-MSD-TR-2012-178, Newstle University 6

Andrey Mokhov: An Alger of Swithing Networks Proposition 1 (Soundness, Minimlity nd Completeness). The set of xioms of the lger of trnsitive undireted grphs is sound, miniml nd omplete. Severl useful theorems n e derived from the xioms through equtionl resoning. Proposition 2. The following theorems hold: is ssoitive: (p q) r = p (q r) ε is n identity of +: p + ε = p + is idempotent: p + p = p sorption: p + p q = p q Proof. We prove the first theorem nd leve the others s n exerise for the reder (see the Appendix): (p q) r = (deomposition) p q + p r + q r = (ommuttivity of +, ) q r + q p + r p = (deomposition) (q r) p = (ommuttivity of ) p (q r). Remrk 3. Sine ε is left nd right identity of + nd, there n e no other identities for these opertions. Interestingly, unlike mny other lgers, the two min opertions hve the sme identity. Now, equipped with the neessry mthemtil toolkit, we n ome k to the question of deiding equivlene of two given expressions L nd R. One possile wy would e to ompute the trnsitive losures of the grphs speified y the expressions nd diretly ompre them. However, this proedure hs qudrti time nd spe omplexity O( L 2 + R 2 ), where e denotes the size of n expression e in terms of the ount of singleton grphs tht pper in it. The qudrti ost rises euse grph speified y n expression e my hve O( e 2 ) edges, e.g., expression ( + + ) (d + e + f ) hs size 3 + 3 = 6, ut desries the grph with 3 3 = 9 edges. Below we propose more effiient solution. Proposition 4. Equlity of expressions L nd R n e deided in liner time nd spe O( L + R ). Proof. First, ll ourrenes of ε in oth expressions re eliminted y the identity rules (unless one of the expressions is equl to ε, in whih se we n immeditely deide the equlity). This preproessing hs liner omplexity O( L + R ). Then we use the following key oservtion: (p q) r = (ssoitivity, ommuttivity of ) (p r) q = (losure; here r ε) p r + r q = (ommuttivity of ) p r + q r = (distriutivity) (p + q) r. NCL-EEE-MSD-TR-2012-178, Newstle University 7

Andrey Mokhov: An Alger of Swithing Networks Tht is, the losure xiom llows us to reple ny nested ourrenes of onnetion with overly +. By suessively pplying this rule to ll the nested s we n eventully redue eh expression to n overly of the following terms ( 1 + 2 +...) ( 1 + 2 +...) ( 1 + 2 +...)... where i, i, i, et. re singleton grphs. Eh suh term represents onneted omponent within the speified grph. We further trnsform eh term into the following hin of singletons 1 2 + 2 3 +... + n 1 + 1 2 +... using the losure nd distriutivity xioms (here n stnds for the numer of singletons i in the first luse). Note tht fter the trnsformtions the size of the expression is t most douled. At this point one n use, for exmple, the depth-first serh (DFS) [10] to identify ll the onneted omponents of the grph represented y the resulting expression. As ll the rkets hve een removed, there is no qudrti low-up of the grph size the numer of its verties nd rs is ounded y the size of the originl expression V L + E L = O( L ) (similrly for R). Therefore, two DFS proedures omined will tke liner time nd spe O( L + R ). Comprison of the otined sets of omponents is trivilly liner. We n onlude tht the lger provides very ompt nd effiient wy of representing nd mnipulting grphs: y operting on lgeri expressions we impliitly operte on grphs of potentilly qudrti size. This llows us to void the disdvntges ssoited with onnetivity mtries. An lert reder my notie tht this is similr to representing Boolen funtion y Boolen formuls insted of truth tles: the former re muh more effiient in prtie thn the ltter [41]. Exmple 5. Let us prove tht the grphs in Figures 3(,d) re equivlent. The two expressions re: G 1 = ( + ) + ( + d) G 2 = ( + ) ( + d) By opening the rkets nd dropping the repeted term using the rule of idempotene we n simplify G 1 into: + + d. G 2 n e simplified y following the steps desried in the proof of Proposition 4: ( + ) ( + d) = (nested s) ( + + + ) ( + + + d) = (idemp., omm.) ( + + ) ( + + d) = (hining) + + + + d = (idemp., omm.) + + d. Now we n use DFS to hek tht oth expressions speify grphs with the sme onneted omponent NCL-EEE-MSD-TR-2012-178, Newstle University 8

Andrey Mokhov: An Alger of Swithing Networks {,,,d}. Alterntively, we n omplete the equtionl proof s follows: G 1 = + + d = (distriutivity) + ( + d) = (nested ) + ( d) = (sso., omm.) + ( d) = (nested ) + ( + d) = (distri., omm.) + + d = G 2. Performing ll these lgeri mnipultions y hnd is tedious nd error-prone proess. We re urrently implementing prototype domin-speifi lnguge (DSL) in Hskell [17] whih utomtes lgeri speifition, nlysis nd synthesis of swithing networks. 3.2 Fmilies of grphs Let us ome k to Fig. 1. Clerly, we n represent the first nd the seond networks y expressions nd +, resp., where nd orrespond to the two nodes. But how n we represent the other networks? An undireted grph n only desrie prtiulr stti rrngement of swithes. To pture the ility of swith to hnge its stte, we need wy to represent fmilies of grphs. The network shown in Fig. 1() n e onsidered fmily of two grphs: depending on the vlue of the ontrolling signl x the resulting network onnetivity is equivlent to either or +. To desrie grph fmilies we extend the lger of undireted grphs with dditionl ondition opertions: Condition: [1]G df = G nd [0]G df = ε The unry ondition opertions n either preserve grph (true ondition [1]) or nullify it (flse ondition [0]). These opertions re not prtiulrly useful until one onsiders repling Boolen onstnt 0 or 1 with Boolen vrile or predite, sy, x, resulting in n expression [x]g, whose vlue depends on the vlue of prmeter x. This sutle oneptul step (whih is kin going from rithmeti to lgeri expressions) rings up new lger with interesting properties, ple of desriing oth the funtionlity nd struture of swithing network. The lger of swithing networks 2 is N,+,,[0],[1], where N is set of swithing networks. To define the equivlene reltion we import the xioms from the lger of undireted grphs nd dd the ondition opertions xioms: ondition: [1]p = p nd [0]p = ε One n prove the following theorems (see Appendix) y se nlysis on the vlues of Boolen prmeters x nd y: onditionl ε: [x]ε = ε 2 Following [27], more preise term is the lger of prmeterised trnsitive undireted grphs, however, we find it overly verose. NCL-EEE-MSD-TR-2012-178, Newstle University 9

Andrey Mokhov: An Alger of Swithing Networks onditionl overly: [x](p + q) = [x]p + [x]q onditionl onnetion: [x](p q) = [x]p [x]q AND-ondition: [x y]p = [x][y]p OR-ondition: [x y]p = [x]p + [y]p Finlly, for the ske of onveniene ternry opertion lled swith is introdued s omintion of the three si opertions: p x q df = p + q + [x](p q) As the nme suggests, the opertion orresponds to swith onneting two networks p nd q, whih is ON when x = 1 nd OFF when x = 0. We n onsider p x q s fmily of two grphs: p x p + q + [0](p q) = p + q if x = 0 q = p + q + [1](p q) = p q if x = 1 The ove holds due to the ondition xioms nd the sorption rule p + p q = p q (see Prop. 2). Exmple 6. The following simple lgeri expressions represent the swithing networks shown in Fig. 1: N =, N = +, N = x, N d = x y, nd N e = x y. 4 Anlysis Any lgeri expression representing swithing network n e rewritten in the nonil form s stted y the following proposition. Two expressions re equivlent if their nonil forms oinide. This lso mens tht one n demonstrte the equivlene of two expressions y rewriting one of them into the other. Proposition 7 (Cnonil form). Any expression n e rewritten in the following nonil form 3 : where: ( ) [ f v ]v + [ f uv ](u v), v V u,v V u<v 1. V is suset of singleton grphs tht pper in the originl expression; 2. for ll v V, f v re nonil forms of Boolen expressions nd re distint from 0; 3. for ll u,v V, u < v, f uv re nonil forms of Boolen expressions suh tht f uv f u f v (this requirement ensures tht swith nnot pper without its nodes); we ssume tht nodes re totlly ordered y < nd f uv = f vu for simpliity; 4. for ll u,v,w V, f uv f vw f uw (the trnsitivity requirement, i.e., if nodes u nd v re onneted nd so re nodes v nd w then nodes u nd w must lso e onneted). 3 We ssume tht nodes re ordered y <. NCL-EEE-MSD-TR-2012-178, Newstle University 10

Andrey Mokhov: An Alger of Swithing Networks Proof. We refer the reder to [27] where very similr result is proved (in prtiulr, see Prop. 5.1). Note sutle differene tht in this pper node is lwys onsidered to e onneted to itself y self-loop, hene the use of < insted of in the nonil form. The proess of onstruting the nonil form of n expression mthes the proess of Boolen nlysis of the orresponding network, in prtiulr, the otined mtrix ( f uv ) is lled the swithing mtrix in lssi Boolen nlysis [6][16]. Therefore, we lim tht the lger of swithing networks llows one to perform nlysis of network s funtionlity in the sme lnguge tht ws used to desrie its struture. Before proeeding with n exmple of nlysis, we dd new instrument into our mthemtil toolkit. 4.1 Node ontrtion nd prtil equivlene In mny ses relxed notion of equivlene if useful; for exmple, to prove tht the networks in Fig. 2 re equivlent it is neessry to remove uxiliry nodes from one of the networks [8]. This susetion desries proedure, lled node ontrtion, tht performs suh removl nd therey estlishes relxed notion of equivlene, lled prtil equivlene. Consider n expression s nd node t tht my or my not pper in the expression. Node ontrtion produes new expression s whih is free from t ut preserves the onnetivity funtions for ll pirs of verties u t nd v t. This is formlly denoted s: s = s\t. Proposition 8 (Node ontrtion). Let s e n expression with the following nonil representtion: ( ) s = [ f v ]v + [ f uv ](u v), v V u,v V u<v nd t e node not neessrily ppering in the expression. Then the node ontrtion s\t hs the following nonil form: ( ) s\t = [ f v ]v + v V \{t} u,v V \{t} u<v [ f uv ](u v). In other words, ll the terms orresponding to node t re dropped in s\t. Proof. Let u t nd v t e two nodes ppering in the expression s. Due to the trnsitivity requirement of the nonil form, the onnetivity funtion f uv ptures ll the pths, inluding those pssing through node t. Sine f uv is preserved in the expression s\t, we n onlude tht the onnetivity etween nodes u nd v is not ffeted y the node ontrtion. Remrk 9. One n see tht node ontrtion is onfluent trnsformtion, i.e., the order of ontrtions does not mtter: s\t 1 \t 2 = s\t 2 \t 1. This llows one to generlise node ontrtion to sets of nodes. For exmple, s\{t 1,t 2 } = s\t 1 \t 2. Node ontrtion n e omputed from the nonil form, ut the following properties often provide onvenient shortuts. NCL-EEE-MSD-TR-2012-178, Newstle University 11

Andrey Mokhov: An Alger of Swithing Networks Proposition 10. Let T e non-empty set of nodes, nd t ε e n expression ontining only nodes from the set T. Let lso p e n expression tht is free from ourrenes of nodes from the set T. Then the following equlities hold: 1. t\t = ε 2. p\t = p 3. (p +t)\t = p 4. (p t)\t = p p 5. (p x t)\t = p x p Proof. (1) nd (2) trivilly follow from Prop. 8, sine in the first se V = T, hene the whole expression is ontrted, nd in the seond se T V = /0, hene p is not hnged. (3) holds euse t is disonneted from the rest of the network, therefore it nnot provide ny dditionl onnetivity. To prove (4) we rewrite its left prt s follows: Nodes in the suexpression p (p t)\t = (idempotene, ommuttivity) (p t +t p)\t = (losure, t ε) ((p t) p)\t = (ommuttivity, ssoitivity) ((p p) t)\t p form fully onneted grph regrdless of the uxiliry nodes T. Therefore, t n now e ontrted y simply dropping it from the resulting expression s it will not ontriute ny dditionl onnetivity in the nonil form of p p. Finlly, (5) n e proved y se nlysis on the vlue of Boolen prmeter x: when x = 0 the result follows from (3) nd from equlity p 0 p = p; when x = 1 the result follows from (4) nd from equlity p 1 p = p p. Given two networks p nd q with sets of nodes V p nd V q, resp., we sy tht p nd q re prtilly equivlent if nd only if: p\(v p \V q ) = q\(v q \V p ). In other words, networks re prtilly equivlent if they re equivlent fter ontrting ll ut ommon nodes V p V q. 4.2 Exmples First, onsider the swithing networks shown in Fig. 2(). The rightmost network is trnsformtion of the leftmost one imed t inresing reliility of single swith y repling it with four identil swithes onneted in ridge struture. The networks n e speified lgerilly y expressions x nd (+) x (t 1 +t 2 ), resp., where T = {t 1,t 2 } is the set of uxiliry nodes. The networks re lerly not equivlent, euse they hve different sets of nodes. Our intention is to hek tht the onnetivity funtion etween nodes nd is the sme in oth networks, whih n e hieved using the node ontrtion trnsformtion: NCL-EEE-MSD-TR-2012-178, Newstle University 12

Andrey Mokhov: An Alger of Swithing Networks (( + ) x (t 1 +t 2 ))\T = (Prop. 10) ( + ) x ( + ) = (distriutivity) x + x + x + x = (losure, ommuttivity) ( x ) x + ( x ) x = (ny node v V is onneted to itself: v x v = v) x + x = (idempotene, ommuttivity) x Therefore the networks re prtilly equivlent on the ommon set of nodes {,}. Now onsider the networks shown in Fig. 2(), whih represent the delt nd the wye Y in the wellknown delt-wye trnsformtion [34]. The rightmost network Y ontins n uxiliry node, whih will e denoted s t; the leftmost network hs no uxiliry nodes. Algeri representtions of the networks re given elow: The nonil forms of the expressions re: = x y + x z + y z Y = x t + y t + z t = + + + [x y]( ) + [x z]( ) + [y z]( ) Y = + + +t + [x]( t) + [y]( t) + [z]( t) + [x y]( ) + [x z]( ) + [y z]( ) As one n now see = Y \t, hene the networks re equivlent fter ontrting the uxiliry node t. Note tht the originl expressions = x y + x z + y z = nd Y = x t + y t + z t perfetly pture the struture of the networks despite hving the sme funtionlity, nd y using the lgeri trnsformtions one n trnsform one of them into nother for the purpose of optimising non-funtionl riteri, suh s, for exmple, the overll omplexity of the network in terms of the numer of swithes, therey performing form of synthesis. See Setion 5 for further disussions on this topi. 4.3 Verifition of non-funtionl properties In the previous susetion we hve verified tht the swithing networks in Fig. 2() re prtilly equivlent. This, however, is rther wek result. Indeed, one my demnd stronger verifition outome: n we prove tht the trnsformtion hieves the intended property of inresed network reliility? The nswer is positive. First, we need to express the required property in lgeri terms. In this exmple, y inresed reliility we men tht the network mintins the originl funtionlity even if one of the swithes fils. Sine the trnsformed network hs left-to-right nd top-to-ottom symmetry, it is suffiient to onsider only the se when the top-left swith hs filed: N filure = y t 1 +t 1 x + x t2 +t 2 x. The filed swith is modelled s swith tht is ontrolled y n unknown signl y, whih my e onstnt (0 if the swith hs eome permnently open, nd 1 if the swith hs eome permnently losed) or vrile tht is hnging unpreditly nd does not follow the proper ontrol signl x (perhps, due to strong interferene with other prts of the iruit). NCL-EEE-MSD-TR-2012-178, Newstle University 13

Andrey Mokhov: An Alger of Swithing Networks Vdd Vdd Vdd Vdd Vdd Gnd () Logi 0 Gnd () Logi 1 Gnd () Composition Gnd (d) Stndrd NAND Gnd (e) Symmetri NAND Figure 4: NAND gte synthesis stges Our gol therefore is to show tht regrdless of the vlue of y network N filure is prtilly equivlent to the originl network N originl = x. We n do tht in three steps. First, suexpression y t 1 +t 1 x n e rewritten s y t 1 +t 1 x + x y using the losure xiom. Similrly, suexpression x t 2 +t 2 x n e rewritten s x t 2 +t 2 x + x. Now one n oserve tht x y + x onveniently simplifies to x due to the Boolen sorption lw x y x = x. Therefore, fter ontrting nodes t 1 nd t 2 the resulting network eomes equivlent to N originl s required. Hving verified tht the trnsformed network is ple of withstnding the filure of one swith, one my sk wht hppens in se of more thn single filure. The lgeri pproh n provide the nswer. Let us expliitly model ll four possile filures: N unertin = y 1 t1 +t 1 y 2 + y 3 t2 +t 2 y 4. We n now pose the question: wht ondition must e stisfied so tht we hve the equlity N unertin \{t 1,t 2 } = N originl? By omputing N unertin \{t 1,t 2 } symolilly one n see tht the sought ondition is y 1 y 2 y 3 y 4 = x. An interesting onsequene is tht the trnsformed network n in some situtions withstnd filure of three out of four swithes! For exmple, if y 1 = x (proper opertion), y 2 = 1 (permnently losed), y 3 = 0 (permnently open) nd y 4 is unertin (interferene) then the network s funtionlity is still mintined: x 1 0 y 4 = x. To onlude, in this setion we demonstrted tht the lger provides unified mthemtil lnguge for nlysis of oth funtionl nd non-funtionl properties (suh s reliility) of swithing networks. 5 Synthesis In this setion we show how to synthesise swithing networks with required properties using the lger. 5.1 Synthesis of NAND gte in CMOS tehnology We demonstrte the lgeri synthesis on trnsistor-level implementtion of NAND gte tht given two input signls nd produes the output signl onneted to ground if ondition holds, nd to Vdd otherwise. NCL-EEE-MSD-TR-2012-178, Newstle University 14

Andrey Mokhov: An Alger of Swithing Networks Let nodes nd denote the Vdd nd ground power lines, resp. We need to onnet one of these nodes to the output s shown in Fig. 4(,). This n e strtly expressed using the following system of equtions: X = + if X = + if Tht is, n unknown iruit X, whih we would like to find, must onnet either to or to depending on ondition. Let us solve this system of equtions. A onditionl sttement A = B if F n e lgerilly expressed s [F]A = [F]B, hene we n rewrite the system in the following wy: [ ]X = [ ]( + ) [ ]X = [ ]( + ) By ongruene, two equtions A = B nd C = D imply the eqution A +C = B + D, therefore the system of equtions n e ollpsed into single eqution: [ ]X + [ ]X = [ ]( + ) + [ ]( + ). The result n e simplified y ollpsing the left hnd side to X due to ondition rules nd Boolen lger: [ ]X + [ ]X = [ ]X = [1]X = X Simplifition of the right hnd side of the eqution gives us the following result: X = +. We hve found the unknown iruit X y simple lgeri mnipultions, see the result in Fig. 4(). Sine in the CMOS tehnology eh swith n e ontrolled only y one signl (positive literls orrespond to n-type trnsistors, nd negtive ones orrespond to p-type trnsistors), we hve to refine the result y splitting the swithes into simpler ones. This requires n ddition of new uxiliry node t: X = ( t +t + + )\t. See Fig. 4(d) for the finl iruit, whih mthes the stndrd NAND gte implementtion in the CMOS tehnology. One n utomte the proess of splitting omplex swithes into network of n-type nd p-type trnsistors in the form of rewrite rule. By heking tht eh step in the rule mintins the network equivlene in ordne to the xioms of the lger one n formlly rgue out the orretness of the rule in generl (i.e., not only for this speifi network), whih would e impossile to hieve without the presented lgeri pproh due to the forementioned lnguge rrier. One n tke the ide of using rewrite rules further nd utomte the synthesis of networks with vrious speifi non-funtionl properties. For exmple, it hs een shown tht symmetri trnsistor networks exhiit muh more preditle timing nd power hrteristis, whih is espeilly vlule in the su-threshold design [2][4]. One n express the symmetri trnsformtion of trnsistor networks using the lger nd NCL-EEE-MSD-TR-2012-178, Newstle University 15

Andrey Mokhov: An Alger of Swithing Networks pply it to our NAND gte exmple produing its symmetri 8-trnsistor version shown in Fig. 4(e). Mny struturl trnsformtions tht re routinely used y designers n e effiiently nd onveniently utomted s olletion of verified rewrite rules tht n then e redily shred nd reused y designers therey inresing their produtivity. 5.2 Prmeterised iruits In this susetion we will disuss lgeri synthesis of prmeterised iruits [29], whih in ddition to onventionl input/output interfes (through whih they exhiit the funtionlity to the environment) hve numer of prmetri inputs tht re dded to llow the seletion of prtiulr implementtion of the required funtionlity in run-time. Suh iruits re lso often referred to s reonfigurle iruits [40][28]. The prmeters tht selet prtiulr implementtion of the iruit my ome from vrious soures: i) some of them n e sttilly pre-set during the produt testing/inning stge on the sis of post-mnufturing informtion; ii) others n e hnged in run-time y power mngement ontroller or y system utility t the softwre level; iii) it is lso possile to use the prmeters for the mintenne purposes, e.g., to reonfigure the system tking into ount the informtion out fults or trnsistor geing effets, thus llowing for greful system degrdtion. A trivil wy of synthesising suh iruits is to diretly inlude ll the required implementtions s seprte loks, onnet their inputs vi wire forks, nd then hoose the outputs of the urrently seleted implementtion y multiplexer. This trivil solution is esy to implement nd hs the enefit of reusing existing implementtions. However, it is often the se tht the implementtions re similr to eh other, whih n e exploited y merging ertin prts of different implementtions in order to redue the overll re nd power onsumption overheds. Two exmples of prmeterised trnsistor networks re shown in Fig. 5. In prtiulr, Fig. 5(,,d) show stndrd stti CMOS implementtions of n AND gte, C-element [2] nd n OR gte, while Fig. 5(,e) show optimised prmeterised networks implementing prmeterised C/AND nd C/OR elements [29]. The ltter networks hve the dditionl input p whih n tivte prtiulr network funtionlity. As one n see, the prmeterised networks reuse ommon prts of the onstituent funtionlities (for exmple, the output inverter is reused). One n synthesise these optimised swithing networks using the lgeri pproh. The key ide is to represent the required funtionlity s n overly of simpler loks. If lgeri expressions AND, OR, nd C stnd for the swithing networks implementing AND gte, OR gte nd C-element, resp., then the following expressions will represent the sought prmeterised elements ontrolled y prmeter p: C/AND = [p]and + [p]c C/OR = [p]or + [p]c By using the rules of the lger one n ftor out ommon terms ourring in these prmeterised expressions therey performing optimistion of the resulting swithing networks. This is prtiulrly relevnt for new trnsistor tehnologies, suh s doule-gte trnsistors, tht support fine-grin reonfigurtion vi polrity ontrol [12]. Generlising the ove pproh one n represent prmeterised networks ontrolled y more thn one prmeter. An exmple of suh network n e found in [40] whih desries onfigurle trnsistor NCL-EEE-MSD-TR-2012-178, Newstle University 16

Andrey Mokhov: An Alger of Swithing Networks of the PAnDA rhiteture, whih onnets seven trnsistors M 0 M 6 of vrying physil hrteristis in prllel so tht they n e independently tivted y reonfigurtion its 0 6 (see Fig. 6 of [40]) therey hieving fine-grin dptility nd resiliene to the effets of intrinsi vriility, s well s fult tolerne. This trnsistor rrngement n e lgerilly ptured y the expression [ k ]M k. 0 k 6 The ides disussed in this susetion re further elorted elow in more high-level settings. 5.3 Struturl omposition In this susetion we show how to struturlly ompose swithing networks. We will use the nottion supported y our tool for lgeri iruit speifition, nlysis nd synthesis. Ciruits re first-lss vlues in our Hskell-sed DSL, therefore we n esily rete funtions tht mnipulte iruits. For exmple, funtion tht given three signls,, nd onstruts CMOS NAND gte n e defined 4 s follows: NAND = [ ]( + ) + [ ( )]( + ) To demonstrte struturl omposition, let us lso define the inverter gte funtion: INV = []( + ) + [ ]( + ) Now one n rete iruit implementing the AND gte funtionlity in CMOS y lling the ove funtions nd overlying the results: AND_gte = NAND t + INV t This prtiulr implementtion uses signls nd s the inputs of the AND gte, signl s its output, nd signl t s n intermedite result. We n lso ompose funtions (insted of iruits) to otin more reusle implementtion: AND t = NAND t + INV t Now we n ll the funtion AND whenever we need to instntite CMOS AND gte with prtiulr omintion of input nd output signls. Note tht the implementtion detils re hidden nd one n operte on high-level omponents like AND_gte without deling with individul swithes diretly. This is similr to Verilog nd VHDL hrdwre desription lnguges, ut the differene is tht t ny point of the design proess we know extly not only the urrent struture of the iruit, ut lso its funtionlity, euse they re inseprle. In Verilog or VHDL, one iruit is designed it is neessry to perform its nlysis in order 4 The tul syntx is slightly different due to tehnil resons (e.g., unry opertions re not well supported in Hskell). We deided to stik to the mthemtil nottion used in this pper not to onfuse the reder. NCL-EEE-MSD-TR-2012-178, Newstle University 17

Andrey Mokhov: An Alger of Swithing Networks p p p p () C/AND-element () AND gte () C-element (d) OR gte (e) C/OR-element Figure 5: Trnsistor-level implementtions of speilised nd prmetrised gtes to e sure tht the iruit funtionlity stisfies the speifition. The lgeri pproh to hrdwre design elimintes this step ompletely: one n strt with n strt speifition of the funtionlity nd then keep refining the implementtion y following the rules of the lger until the result stisfies ll the struturl onstrints of prtiulr tehnology, s shown in Figure 4. 5.4 Funtionl omposition One prtiulrly unique nd useful feture of the lger is funtionl ompositionlity. Consider two systems A nd B, whih my potentilly e very omplex nd ontin illions of swithes. As elorted in the previous susetion, we lredy know tht their struturl omposition C n e expressed simply s overly C = A + B: if the systems hve ommon interfe signls, they will e glued together s shown in Fig. 3(). While this type of omposition is usully hndled well y other methods, our pproh lso llows one to perform the funtionl omposition of systems, whih is lot more diffiult to hndle effiiently. For exmple, if one wnts to desrie system C tht delivers funtionlity A under ertin ondition x, nd funtionlity B under the opposite ondition x then the solution n e lgerilly expressed s C = [x]a+[x]b. This hs lredy een demonstrted in synthesis of NAND gte nd prmeterised networks. Importntly, if the two funtionlities re similr, one n simplify the resulting expression y ftoring out ommon terms. For instne, [x]a+[x]a = [x x]a = A, i.e. if the funtionlities oinide then one n lgerilly prove it nd remove the ondition x, s well s the redundnt opy of A, ltogether. Typilly, if A nd B re funtionlities tht system delivers in two operting modes then they hve lot in ommon. It is ruil to detet suh similrities in order to design effiient multimodl systems; to hieve tht we n dopt existing methods for finding similrities in grphs nd fmilies of grphs, e.g., [26]. Finlly, the xiomti definition of swithing network equivlene llows designer to sustitute prt of n expression A with n equivlent prt B without ny dditionl heks of the resulting system s glol properties. As long s the lol equivlene A = B holds, it is gurnteed tht the rest of the system is not ffeted y the sustitution. Algeri ompositionlity opens the wy for new methodologies nd tehniques for system optimistion in vrious spets, suh s lteny, power onsumption, reliility, et. y performing lol provle trnsformtions of n expression representing n entire system. NCL-EEE-MSD-TR-2012-178, Newstle University 18

Andrey Mokhov: An Alger of Swithing Networks 6 Conlusions This pper disusses the glorious pst of the theory of swithing networks, whose roots n e tred k to the eginning of the 20 th entury. Tody, the theory forms the kone of ny omputtion system, however, it is hidden y multiple lyers of strtion nd lrgely forgotten; little or no development is going on t present for it is elieved tht ll the useful fts out swithing networks hve lredy een disovered. This work is n ttempt to revive the old theory y introduing new mthemtil onstrut n lger of swithing networks tht unifies the notions of funtion nd struture of omputtion system tht were lwys seprted. The lger is speified xiomtilly, nd the soundness, minimlity nd ompleteness of the resulting sets of xioms re proved. The trnsformtions required for lgeri nlysis nd synthesis of swithing networks re developed nd demonstrted on set of exmples. The future work inludes the development of slle softwre support tool ple of hndling swithing networks onsisting of illions of swithes, s well s the pplition of the presented tehniques in other res, where modelling onditionl onnetivity is importnt, for exmple, in the nlysis of protein-protein intertions in lrge-sle iologil networks. The most promising diretion for utomtion is vi utomted theorem proving softwre tht is ple of proving mthemtil sttements within given theory. Although theorem proving is undeidle in the generl se, the xioms of the proposed theory of swithing networks llow effiient equlity heking s hs een demonstrted in Setion 4. Effiient verifition of more omplex non-funtionl properties, e.g., relted to reliility or to energy onstrints, requires further lgorithmi reserh. Aknowledgement The uthor would like to thnk Mr Riedel for the introdution to the world of Shnnon s swithing networks, Vitor Khomenko for the inspirtion to reting new lgers, nd Alex Ykovlev for his ontinued ontriution to the theory of onditionl grphs. Speil thnks go to the prtiipnts of the Designing with Unertinty Opportunities & Chllenges 2014 workshop for their vlule omments on the erlier version of this work. This work ws prtilly supported y EPSRC reserh grnts UNCOVER (EP/K001698/1) nd PRIME (EP/K034448/1). Referenes [1] A. Brdsley nd D. Edwrds. The Bls synhronous iruit synthesis system. In Forum on Design Lnguges, 2000. [2] H. K O Berge, A. Hsnegovi, nd S. Aunet. Muller C-elements sed on minority-3 funtions for ultr low voltge supplies. In IEEE Interntionl Symposium on Design nd Dignostis of Eletroni Ciruits Systems (DDECS), pges 195 200, April 2011. [3] A. Bizjk nd A. Buer. ALG User Mnul, Fulty of Mthemtis nd Physis, University of Ljuljn, 2011. [4] J. E. Bjerkedok. Suthreshold Rel-Time Counter. Mster s thesis, Norwegin University of Siene nd Tehnology, Norwy, 2013. NCL-EEE-MSD-TR-2012-178, Newstle University 19

Andrey Mokhov: An Alger of Swithing Networks [5] S. Borkr. Designing relile systems from unrelile omponents: the hllenges of trnsistor vriility nd degrdtion. Miro, IEEE, 25(6):10 16, 2005. [6] R. E. Brynt. Algorithmi spets of symoli swith network nlysis. IEEE Trnstions on CAD of Integrted Ciruits, 6:618 633, 1987. [7] R. E. Brynt. Boolen nlysis of MOS iruits. IEEE Trnstions on Computer-ided Design, 6:634 649, 1987. [8] W. Chen. Boolen mtries nd swithing nets. Mthemtis Mgzine, pges 1 8, Jnury 1966. [9] M. D. Ciletti. Advned Digitl Design with the VERILOG HDL. Prentie Hll PTR, 2002. ISBN: 0130891614. [10] T. H. Cormen, C. E. Leiserson, R. L. Rivest, nd C. Stein. Introdution to Algorithms. MIT Press, 2001. [11] J. Cortdell, M. Kishinevsky, A. Kondrtyev, L. Lvgno, nd A. Ykovlev. Logi synthesis of synhronous ontrollers nd interfes. Advned Miroeletronis. Springer-Verlg, 2002. [12] M. De Mrhi, D. Shetto, S. Frhe, J. Zhng, P. Gillrdon, Y. Leleii, nd G. De Miheli. Polrity ontrol in doule-gte, gte-ll-round vertilly stked silion nnowire fets. In Eletron Devies Meeting (IEDM), 2012 IEEE Interntionl, pges 8 4. IEEE, 2012. [13] J. Esprz. Deidility nd omplexity of Petri net prolems n introdution. Letures on Petri Nets I: Bsi Models, pges 374 428, 1998. [14] C. A. R. Hore. Communiting sequentil proesses. Commun. ACM, 21(8):666 677, 1978. [15] T. Hore, S. vn Stden, B. Möller, G. Struth, J. Villrd, H. Zhu, nd P. O Hern. Developments in onurrent kleene lger. pges 1 18, 2014. [16] F. E. Hohn nd L. R. Shissler. Boolen Mtries nd Comintionl Ciruit Design. Bell Systems Tehnil Journl, (34):177 202, 1955. [17] P. Hudk. Building domin-speifi emedded lnguges. ACM Computing Surveys, 28(4):196, 1996. [18] D.A. Huffmn. The synthesis of sequentil swithing iruits. Journl of the Frnklin Institute, 257(3):161 190, 1954. [19] M.B. Josephs nd J.T. Udding. An overview of D-I lger. In Proeeding of the Twenty-Sixth Hwii Interntionl Conferene on System Sienes, volume 1, pges 329 338, 1993. [20] R. Lipsett, C. A. Ussery, nd C. F. Shefer. VHDL, Hrdwre Desription nd Design. Kluwer Ademi Pulishers, 1993. 9780792390305. [21] T.-J. K. Liu, D. Mrkovi, V. Stojnovi, nd E. Alon. MEMS Swithes for Low-Power Logi. IEEE Spetrum, April 2012. [22] T.J.K. Liu, J. Jeon, R. Nthnel, H. Km, V. Pott, nd E. Alon. Prospets for MEM logi swith tehnology. In Eletron Devies Meeting (IEDM), 2010 IEEE Interntionl, pges 18 3. IEEE, 2010. NCL-EEE-MSD-TR-2012-178, Newstle University 20