chapter8 retiming

Upload: jaynith

Post on 10-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Chapter8 Retiming

    1/33

    Retiming: Sequential digital circuit optimization

    Theerayod Wiangtong25/01/05

  • 8/8/2019 Chapter8 Retiming

    2/33

    Introduction

    T

    register i

    x

    combinational logic with register j

    propagation delay x

    arrival time si arrival time sj

    Synchronous Digital Circuits

  • 8/8/2019 Chapter8 Retiming

    3/33

    Approaches to synchronous logic

    optimization

    Optimize combinational logic only.

    Optimize register position only:

    Retiming.

    Optimize overall circuit: Peripheral retiming.

  • 8/8/2019 Chapter8 Retiming

    4/33

    Example: Minimize delay

    6

    ij

    55A

    B

    C

    5

    23

    B C

    12

    A

    max

    12D

    65

    D

    si = sj

  • 8/8/2019 Chapter8 Retiming

    5/33

    Retiming

    6

    ij

    5 5A B

    C12D

    Shift registers around to improve circuit performance.

    6

    ij

    5 5A B

    C12D

  • 8/8/2019 Chapter8 Retiming

    6/33

    Optimal Retiming

    si = sj

    6

    ij

    5 5A B

    C12D

    5

    16

    B C

    12

    A

    max 6 5

    D

    Minimum clock periodwith zero skew

  • 8/8/2019 Chapter8 Retiming

    7/33

    Retiming

    Allow synthesis tool to automatically move register

    stages delay on each side of the F/Fs Does not change total delay of the circuit Just

    improves the balance of delays

  • 8/8/2019 Chapter8 Retiming

    8/33

    Example: Minimize Registers

  • 8/8/2019 Chapter8 Retiming

    9/33

    Fundamental criteria

    u vw(u,v)

    r(v)r(u)

    > 0w(u,v) + r(v) - r(u)

    After retiming, every wire must have nonnegative register

    count:

    O(E) linear constraintsE : # wires

    w(u,v): original nonnegative register count of wire (u,v)

  • 8/8/2019 Chapter8 Retiming

    10/33

    Structural constraints

    u v1

    12

    > 01 + r(v) - r(u)

    After retiming, every wire must have nonnegative register

    count:

    O(E) linear constraintsE : # wires

    w(u,v): original nonnegative register count of wire (u,v)

  • 8/8/2019 Chapter8 Retiming

    11/33

    Structural constraints

    u v

    12

    w(u,v): original nonnegative register count of wire (u,v)

    > 01 + 1 - r(u)

    After retiming, every wire must have nonnegative register

    count:

    O(E) linear constraintsE : # wires

  • 8/8/2019 Chapter8 Retiming

    12/33

    Structural constraints

    u v

    12

    w(u,v): original nonnegative register count of wire (u,v)

    > 01 + 1 - 2

    After retiming, every wire must have nonnegative register

    count:

    O(E) linear constraintsE : # wires

  • 8/8/2019 Chapter8 Retiming

    13/33

    Legal register moves

    Retiming Lag/Lead

  • 8/8/2019 Chapter8 Retiming

    14/33

    So, what is retiming?

    Structural optimization methods.

    Retiming. Modeling:

    Retiming for minimum delay.

    Retiming for minimum area.

  • 8/8/2019 Chapter8 Retiming

    15/33

    Synchronous logic modeling

    State-based model:

    Transition diagrams or tables.

    Explicit notion of state.

    Implicit notion of area and delay.

    Structural model:

    Synchronous logic network.

    Implicit notion of state.

    Explicit notion of area and delay

  • 8/8/2019 Chapter8 Retiming

    16/33

    Synchronous network graph

    Synchronous network graph:

    Vertices equations I/O , gates.

    Edges dependencies nets.

    Weights synch. delays registers.

  • 8/8/2019 Chapter8 Retiming

    17/33

    Example

  • 8/8/2019 Chapter8 Retiming

    18/33

    Example

  • 8/8/2019 Chapter8 Retiming

    19/33

    Rules of retiming

    Move register position.

    Do not modify combinational logic.

    Preserve network structure:

    Modify weights. Do not modify graph structure.

  • 8/8/2019 Chapter8 Retiming

    20/33

    Example

  • 8/8/2019 Chapter8 Retiming

    21/33

    Retiming

    Global optimization technique [Leiserson].

    Changes register positions:

    affects area:

    changes register count.

    affects cycle-time:

    changes path delays between register pairs.

    Solvable in polynomial time.

  • 8/8/2019 Chapter8 Retiming

    22/33

    Assumptions

    Vertex delay is constant:

    No fan-outdelay dependency. Graph topology is invariant:

    No logic transformations.

    Synchronous implementation: Cycles have positive weights.

    Edges have non-negative weights.

    Consider topologicalpaths: No false path analysis.

  • 8/8/2019 Chapter8 Retiming

    23/33

    Example

    Retiming of a vertex:

    Integer.

    Lag: registers moved from output to input (+).

    Lead: registers moved from input to output (-).

    Retiming of a network:

    Vector of vertex retiming.

  • 8/8/2019 Chapter8 Retiming

    24/33

    Example

    r = -[11222100]T

  • 8/8/2019 Chapter8 Retiming

    25/33

    Definitions and properties

    See example9.3.9 pp 465

  • 8/8/2019 Chapter8 Retiming

    26/33

    Legal retiming

  • 8/8/2019 Chapter8 Retiming

    27/33

    Refined analysis

    Least register path:

    .

    Over all paths between viand vj.

    Critical delay:

    .

    Over all the paths from vito vjwith weight W(vi, vj).

    There exists a vertex pair vi, vjwhose D(vi, vj)bounds the cycle-time.

  • 8/8/2019 Chapter8 Retiming

    28/33

    Example

  • 8/8/2019 Chapter8 Retiming

    29/33

    Minimum cycle-time retiming

    Find minimum value of the clock period such that thereexist a retiming vector where:

    Solution: Given a value of :

    solve linear constraints.

    methods:

    Bellman-Ford or derivate. MILP. Relaxation.

  • 8/8/2019 Chapter8 Retiming

    30/33

    Example

    See 9.3.10 pp 466

  • 8/8/2019 Chapter8 Retiming

    31/33

    Minimum area retiming problem

    Find a retiming vector that minimizes the

    number of registers. Simple area modeling:

    Every pos.-weighted edge -> register.

    Total register area cost equals total of weights.

    Register sharing model:

    Every set of positively-weighted edges withcommon tail -> shift-register.

    Register area cost equals maximum of weights onoutgoing edges.

  • 8/8/2019 Chapter8 Retiming

    32/33

    Example

  • 8/8/2019 Chapter8 Retiming

    33/33

    Summary of retiming

    Sequential optimization technique for:

    Cycle time or register area.

    Applicable to:

    Synchronous logic models.

    Architectural data-path models:

    Resources with delays.

    Exact algorithm in polynomial time.

    Problems: Delay modeling.

    Network granularity.