1-LP-FSM-Encoding

1-LP-FSM-Encoding - Special Topics in Hardware Systems (CSV...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Special Topics in Hardware Systems (CSV 881) Low Low Power Design Low Power FSM Encoding FSM Instructor: Preeti Ranjan Panda Department of Computer Science and Engineering Indian Institute of Technology, Delhi FSM FSM Encoding / State Assignment • Assign codes to symbolic states in an FSM codes to symbolic states in an FSM – no 2 states should have the same code 10/00 10/00 S1 0-, -1/01 10/01 11/11 S2 1-/00 0-/01 00 0-, -1/01 10/01 11/11 01 1-/00 0-/01 S3 0-/01 State Encoding 10 0-/01 (C) P. R. Panda, I.I.T Delhi, 2008 2 FSM FSM and State Table • One row in State Table for every FSM Transition row in State Table for every FSM Transition 10/00 Inputs Present Next Outputs State State S1 S1 S1 S2 S2 S3 S3 S3 S2 S1 S1 S2 S3 S2 S3 S1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 S1 0-, -1/01 10/01 11/11 S2 1-/00 0-/01 S3 0-/01 1 0 1 0 1 0 1 0 1 1 0 FSM (C) P. R. Panda, I.I.T Delhi, 2008 State Table 3 Why Why Encode an FSM? • • So we can implement it #bits in encoding ⇒ DFFs in State Register Present State Lines I/P 1 0 1 0 1 0 1 0 1 1 0 PS S1 S1 S1 S2 S2 S3 S3 S3 NS S2 S1 S1 S2 S3 S2 S3 S1 O/P 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 I/P 1 0 1 0 1 0 1 0 1 1 0 PS 00 00 00 01 01 10 10 10 NS 01 00 00 01 10 01 10 00 O/P 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 State Register Next State State Lines Next State and and Output Logic Outputs Inputs 4 State Table Table Truth Table Table (C) P. R. Panda, I.I.T Delhi, 2008 The The FSM Encoding Problem • How to assign codes so that – Area is minimised is minimised – Delay is minimised – Power dissipation is minimised dissipation is minimised (C) P. R. Panda, I.I.T Delhi, 2008 5 Power Power Reduction in FSMs Present State Lines • Where is the scope? State Register Next State Lines Next State and Output Output Logic Outputs Inputs 6 (C) P. R. Panda, I.I.T Delhi, 2008 6 What What FSM Property Can We Exploit? Exploit? S1 S2 S3 S4 S4 (C) P. R. Panda, I.I.T Delhi, 2008 7 Look Look at Transition Frequency • If transition between S2-S3 occurring relatively frequently, their encoding is important important – How should we encode? encode? S4 S1 S2 S3 S4 (C) P. R. Panda, I.I.T Delhi, 2008 8 Low Power FSM Encoding Problem Low • First perform extensive simulations of the FSM – Annotate state transitions with frequencies • Objective function: function: – Minimise: trans = Σ (fij . HD (Si, Sj)) (C) P. R. Panda, I.I.T Delhi, 2008 9 Can we Replace “Frequency” by Can by “Conditional “Conditional Probability”? S1 S2 S3 S4 S4 (C) P. R. Panda, I.I.T Delhi, 2008 10 Overall Overall Strategy: Simulated Annealing Annealing • Start with initial random assignment • 2 types of moves – Select unassigned code for random node – Interchange codes for random pair of nodes • Accept with probability exp (- |δ trans| / Temp) (C) P. R. Panda, I.I.T Delhi, 2008 11 Graph Graph Embedding • Start from Transition Freq. Graph • Assign codes to codes to minimise Cost S0 1 3 0 S1 8 5 S2 2 S3 Cost = Σedges a→b wt(a→b) × HD (a→b) (a HD = Hamming Distance Encoding 1 S0: 00 S1: 01 S2: 10 S3: 11 11 Cost = 3x1 + 5x1 + 2x1 + 1x1 + 0x2 + 8x2 = 27 Encoding 2 S0: 00 S1: 11 S2: 01 S3: 10 10 Cost = 3x2 + 5x1 + 2x2 + 1x1 + 0x1 + 8x1 = 24 (C) P. R. Panda, I.I.T Delhi, 2008 12 Solution Solution to Graph Embedding Problem Problem • Well studied problem • Practical observation – for large FSMs, clusters of nodes with high edge weights exist • Heuristic – in what order to choose nodes for what order to choose nodes for assignment? – identify heavy clusters and assign codes to their states – remove these states from consideration – proceed with remaining graph with remaining graph (C) P. R. Panda, I.I.T Delhi, 2008 13 Embedding Algorithm Embeddin 1. Select node n with maximum sum of Nb incident edge weight 2. Assign some code to n and Assign some code to and minimally distant codes to the Nb adjacent nodes allows all Nb nodes to be at distance 1 all to be at distance from n Nb = 3 a 3 e 3 2 12 d 4 b 40 c 2 6 3. Remove node n (and all incident edges) from graph edges) from graph 4. Repeat (Step 1) with smaller graph (C) P. R. Panda, I.I.T Delhi, 2008 Select b (max sum: 4+6+2) (max sum: b – 000 a – 001 (distance from b = 1) d – 010 (distance from b = 1) e – 100 (distance from b = 1) (distance from 1) 14 Embedding Algorithm - Example Embeddin a 3 e 3 2 12 d 4 b 6 40 c 2 100 001 a 3 e 3 1 2 4 c d 2 010 Select b (max sum: 4+6+2) b – 000 a – 001 d – 010 e – 100 Select a (max sum: 3+2+4) c – 011 (distance from a = 1) (di 1) (C) P. R. Panda, I.I.T Delhi, 2008 15 References References • K. Roy and S. C. Prasad, Circuit Activity Based Logic Synthesis for Low Power Reliable Operations, IEEE Transactions on VLSI Systems, 1(4), Dec. 1993 (C) P. R. Panda, I.I.T Delhi, 2008 16 ...
View Full Document

Ask a homework question - tutors are online