Beruflich Dokumente
Kultur Dokumente
University of Pittsburgh
Search (or lookup) operations represent an important common function Network packet processing
For each arriving packet, determine the output port Given packet information, find a matching classification rule Each look up can incur many memory accesses
Speech recognition
Searching (e.g., dictionary lookup) takes up ~24% of CPU cycles
ISPASS 2007
For OC-768, up to 104M packets must be processed per second Network traffic has doubled every year [McKeown03] Routing tables (~200K prefixes in a core router) are growing [RIS] IPv6
Power and thermal issue already a critical limiting factor in network processing device design [McKeown03] Search in battery-operated devices should be energyefficient Conventional search solutions
Software methods (tries, hash table, ) Hardware methods (CAM, TCAM, )
ISPASS 2007
Software approach is flexible high memory capacity requirement high memory bandwidth requirement not SCALABLE
ISPASS 2007
ISPASS 2007
ISPASS 2007
Talk roadmap
What is CA-RAM? Prototype design Case study 1: IP lookup Case study 2: Trigram lookup for speech recognition
ISPASS 2007
Match logic
ISPASS 2007
Use hashing to store keys in a particular row To look up, hash the search key and retrieve one row Perform matching on entire row in parallel Achieve full content addressability w/o paying overhead!
search key
Index generato r Keyj1 Keyj2
Keyi1
Keyi2
Keyj1
Keyj2
Keyj3
Keyj2
Keyj3
Result
entries
Use two-level hashing and employ multiple CA-RAM ISPASS banks 2007
ISPASS 2007
Key Keyi1 i1
Keyi2
Keyi2 i3 Key
Match information
ISPASS 2007
ISPASS 2007
K0 xor
K1
K2
j1
KN-1
Ki
M i TM i
j1 j2
Ternary
Search key
Supporting different types of MATCH matching MATCH Reconfigurable match logic in different bit positions feasible
i
Match information
ISPASS 2007
ISPASS 2007
Data access follows TCAM lookup CA-RAM supports data embedding Cuts memory traffic & latency by half
Search key Reconfigurable match logic Keyj1 Dataj2 Key j1
ISPASS 2007
ISPASS 2007
Search key
Match information
ISPASS 2007
Input Controller
CA-RAM slice
CA-RAM slice
...
CA-RAM slice
Config
...
CA-RAM slice
...
CA-RAM slice
... ...
CA-RAM slice
Output Controller
ISPASS 2007
Prototype implementation
We implemented a prototype CA-RAM slice design (w/ a degree of reconfigurability) and evaluated its power and area advantages over state-of-the-art TCAMs We used a standard cell (0.16m) based ASIC design flow Step
Expand search key Calculate match vector Decode match vector Extract result Total
# cells
3,804 5,252 899 6,037 15,992
Area, m2 Delay, ns
66,228 10,591 1,970 21,775 100,564 (0.89) 0.95 1.91 1.99 4.85
ISPASS 2007
11x 4.5x
CA-RAM 8T DRAM-based 6T DRAM-based DRAM-based ternary area advantage 4.5x~11x CA-RAM power advantage 4x~14x
TCAM TCAM CA-RAM
7 6 5
14x 4x
ISPASS 2007
ISPASS 2007
Problem description
Given
A set of prefixes (each prefix is associated with output port
number) IP address
Find a prefix that matches with input IP address and return output port number associated with it
In the presence of multiple matching prefixes, choose the
longest
Procedure
Find a good hash function to distribute prefixes Determine CA-RAM organization
ISPASS 2007
98% of prefixes are at least 16 bits long Select hash bits from the first 16 bits (low-order bits)
ISPASS 2007
Shaping CA-RAM
Consider multiple design points:
Design A Design B Design C
( = 0.47) ( = 0.40) ( = 0.36) 2,048 rows (32 entries) 4,096 rows (64 entries)
Design D Design E
( = 0.36)
Design F
( = 0.24)
( = 0.36)
ISPASS 2007
Performance
40% 30%
Design E
( = 0.24)
Design F
( = 0.36)
2.5 2
Uniform traffic
0 Design A
ISPASS 2007
Design B
Design C
Design D
Design E
Design F
TCAM
Design B
TCAM
CA-RAM CA-RAM
Area
Power
ISPASS 2007
Problem
Look up a trigram in the trigram database
Data set
A subset of the Sphinx trigram database We picked up entries having 13~16 characters Still 5,385,231 entries or 86MB
Hashing
DJB, an efficient string hash function (Used in Sphinx)
ISPASS 2007
Result
ISPASS 2007
Data distribution
ISPASS 2007
Area comparison
Relative area
1.2
0.8
0.6
0.4
0.2
CAM
CA-RAM
ISPASS 2007
CA-RAM conclusions
ISPASS 2007