35
Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion Automata Processor Tobias Markus Advanced Seminar ”Computer Engineering” January 21, 2015 Tobias Markus (Advanced Seminar ”Computer Engineering”) Automata Processor January 21, 2015 1 / 35

Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

  • Upload
    others

  • View
    54

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Automata Processor

Tobias Markus

Advanced Seminar ”Computer Engineering”

January 21, 2015

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 1 / 35

Page 2: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 2 / 35

Page 3: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Future Accelerators

• Need for parallel systems

• GPUs, Cluster good for structured data

• Accelerator for difficult problem loads (e.g. patternmatching)

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 3 / 35

Page 4: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 4 / 35

Page 5: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Deterministic Finite Automaton(DFA)

q0start q1 q2

1

0 1

0

1

0

• Exactly one active state

• Exactly one active transition (transition function)

• In this example detecting binary strings ending with ”01”

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 5 / 35

Page 6: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Nondeterministic FiniteAutomaton (NFA)

q0start q1 q2

0,1

0 1

• Multiple active states are allowed

• Transition relation can result in multiple states

• Fewer transitions and states are possible compared to DFA

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 6 / 35

Page 7: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Mathematical model

NFAs can be described by a 5-tupel:

< Q,Σ, δ, q0,F > (1)

• Q: set of automaton states

• Σ: input alphabet

• δ(q, α): transition relation

• q0: start state

• F : set of final states

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 7 / 35

Page 8: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Definitions

Accepting a word

• r0 = q0

• ri+1 ∈ δ(ri , ai+1), i = 0, ..., n − 1

• rn ∈ F

The recognized Language L(M)

L(M) = {w | δ∗(q0,w) ∩ F 6= ∅} (2)

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 8 / 35

Page 9: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Example

q0start q1 q2

0,1

0 1

• δ∗(q0, 0) = {q0, q1}• δ∗(q0, 00) = δ(q0, 0) ∪ δ(q1, 0) = {q0, q1} ∪ ∅ = {q0, q1}• δ∗(q0, 001) = δ(q0, 1) ∪ δ(q1, 1) = {q0} ∪ {q2} = {q0, q2}• δ∗(q0, 0010) = δ(q0, 0)∪ δ(q2, 0) = {q0, q1}∪∅ = {q0, q1}• δ∗(q0, 00101) = δ(q0, 1) ∪ δ(q1, 1) = {q0} ∪ {q2} ={q0, q2}

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 9 / 35

Page 10: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 10 / 35

Page 11: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Automata Processor MemoryArray

Automata DIMM format[1]

• Is implemented in Microns standard DDR3 SDRAMtechnology

• Processes 8 bit input symbols at 1 Gbps

• Input symbol is given as row address

• Invokes operations with State Transition Elements (STE)and the Routing Matrix

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 11 / 35

Page 12: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

AP Memory Array [2]

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 12 / 35

Page 13: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

State Transition Element (STE)

STE [2]

Consists of:

• State memory

• State transition logic,state bit

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 13 / 35

Page 14: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

State Transition Element (STE)

• State memory contains matching character or characterclass

• Each state bit can be programmed multiple start states

q0start

q1

q2

ε

ba a,b

a

q0start

q1start

q2b

a

a

a,b

a

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 14 / 35

Page 15: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Counter

• 12 bit counter

• To simplify automaton

• Possible to implement a subset of pushdown automaton

• Turing complete

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 15 / 35

Page 16: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Boolean Element

• Configurable to• OR• AND• NAND• NOR• sum of products• product of sums

• No state

• Also to simplify automaton

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 16 / 35

Page 17: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Routing Matrix

• Programmable routing matrix to connect the STEs

• Theoretically every state must be able to connect withevery other

• Implemented hierarchically

• Grouped in row → rows grouped in blocks → grid ofblocks

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 17 / 35

Page 18: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Routing Matrix

Hierarchical routing scheme [2]

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 18 / 35

Page 19: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Reconfigurability and Inter RankBus

The AP is:

• Partially reconfigurable

• There is an inter rank bus to distribute input symbols overAPs

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 19 / 35

Page 20: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 20 / 35

Page 21: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Programming the AP

• Perl Compatible Regular Expressions (PCRE)

• Automaton Network Markup Language (ANML)

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 21 / 35

Page 22: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Description via PCRE

/a(b|c) ∗ [de]/i

PCRE example

• For some regular expressions software post-processing isneeded

• Some restrictions to assure hardware performance

• Regular Expressions can be defined within C/C++

• AP SDK is used to compile them

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 22 / 35

Page 23: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

C Example

#i n c l u d e <ap comp i l e . h>

ap automaton t CreateAutomaton ( vo i d ){

ap automaton t amton ;a p e xp r db t db ;

db = AP CreateExpress ionDB ( ) ;

AP AddExpress ion ( db , NULL , ”/a ( b | c ) ∗ [ de ] / i ” , 1 ,0 , AP GRAMMAR PCRE DELIMITED) ;

AP Compile ( db , &amton , 0 , NULL , 0 ,DEVICE FAMILY FRIO) ;

AP DestroyExpress ionDB ( db ) ;

r e t u r n amton ;}

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 23 / 35

Page 24: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Description via ANML

• XML-based language

• Directly describes automata

• ANML can be produced from C/C++

• ANML can be graphically developed from AP Workbench

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 24 / 35

Page 25: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 25 / 35

Page 26: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Application fields for the AP

• Bioinformatics

• Network Security

• Sigint and Crypto

• Finance applications

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 26 / 35

Page 27: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Network Security

• Signature based detection of known malware patterns

• AP is good for complex RegEx

• Allows generic signature matching

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 27 / 35

Page 28: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Network Security [2]

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 28 / 35

Page 29: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Bioinformatics

Modern DNA Sequencing workfow [3]

• Modern DNA Sequencing

• Need the assembly of overlapping sequences

• Another task, the search for motifs

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 29 / 35

Page 30: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Motif matching

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 30 / 35

Page 31: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

1 Introduction

2 Automaton Theory

3 Implementation

4 Programming the AP

5 Applications

6 Conclusion

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 31 / 35

Page 32: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Conclusion

• Very specific applications

• Difficult to determine if the AP fits for a problem

• Defined language to describe automaton (ANML)

• Logic implemented in DDR3 SDRAM technology

• Fits good into current accelerators

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 32 / 35

Page 33: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

References

• [1] Micron. Automata http://www.micronautomata.com/

• [2] Paul Glendenning Michael Leventhal Harold Noyes PaulDlugosch, Dave Brown. An efficient and scalabesemiconductor architecture for parallel automataprocessing. IEEE TRANSACTIONS ON PARALLEL ANDDISTRIBUTED SYSTEMS 25:11, 2014.

• [3] Micron. Automata applications.http://www.micronautomata.com/#applications

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 33 / 35

Page 34: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Questions?

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 34 / 35

Page 35: Automata Introduction Automaton Automata Processor€¦ · Automata Processor Tobias Markus Introduction Automaton Theory Implementation Programming the AP Applications Conclusion

AutomataProcessor

Tobias Markus

Introduction

AutomatonTheory

Implementation

Programmingthe AP

Applications

Conclusion

Additional/New Information

Performance table from Micron AP Briefing

Tobias Markus (Advanced Seminar ”Computer Engineering”)Automata Processor January 21, 2015 35 / 35