Try   HackMD

NCKU DSP Arch NOTE

contributed by <yanjiun>

tags: mynote

課程:VLSI design for digital communication systems -N2109 of NCKU
學生:顏君翰 MS student
指導老師:謝明德 PhD

Retiming (請假)

  • 目標:
    • Clock period miniretiming
    • Registers minimization (Linear Problem)
  • 特性:
    • Retiming dose not alter the iteration bound in a DFG
    • Retiming 使用 Shortest Path Algorithm 解 constrains graph 得出
      r(V)
    • Constrains 有三種
      1. feasible constrains : 不能讓邊上變負的。(必須)
      2. period constrains : 增加最大延遲條件。(通常會加上,需使用合理時間)
      3. registers constrains : 增加某點的fanout條件。(使問題變成線性規劃問題,解題複雜度大幅提升,斟酌使用)
        • 如要使用需要最先使用 registers constrains,再算後續條件。

Demo

  • 對以下電路實作完整 Retiming
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  1. feasible constrains
  2. Registers constrains
  3. Period constrains

Fesaible constrains (origin DFG)

轉換為 DFG 表示法。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Registers minimization (add dummy node and breath
β
)

增加虛擬點在要限制暫存器之 fanout

w(e^)=wmaxw(e),where wmax=max{Wout(Node)}
β=count.(Eout(Node))

  1. 限制點
    Node1
  2. wmax=2D

    β=2
  3. w35=2Dw13=D

    w45=2Dw14=0

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Clock period constrains (computing
W(U,V)
and
D(U,V)
)

w=Mw(e)t(U),where M=tmaxN
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

SUV:ShorestPathAlgorithm

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

W(U,V)=SUVM,when UV

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

D(U,V)=MW(U,V)SUV+t(V)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • 限制最長延遲
    c=2

    r(U)r(V)W(U,V)1, when D(U,V)>c

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • 加上原圖
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    使用 Shortest path algorithm 求解
  • 並且最小化 COST
    ILP Algorithm
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Definations

  • G
    : Original DFG,
    Gr
    : Retimed DFG
  • r(V)
    : Delay transferred from outgoing edges of node V to the incident deges of node V.






D


cluster_rU

r(U)


cluster_rV

r(V)



U

U



V

V



U->V


w



fw




fw->U





w




  • w(e): weigth(delay) of the edge
    e

  • wr(e): weight(delay) of the dege
    e
    after retiming.

  • Uwr(e)V after retiming has a weight of
    wr(e)=w(e)+r(V)r(U)

    • 因為當前的個數
      w(e)
      加上前面拿入的
      r(V)
      減去拿出到後面的
      r(U)
  • weighty of path

    w(p)=i=0k1w(ei)

  • path computaion time

    t(p)=i0kt(Vi)

Minimium clock period

  • Φ(G)=max{t(p):w(p)=0}

  • W(U,V)=min{w(p):UpV}

    • Minimum number of registers on any path from node U to node V
  • D(U,V)=max{t(p):UpV and w(p)=W(U,V)}

    • Maximum computation time among all paths from U to V with weight
      W(U,V)
  • M=tmaxn

    • tmax
      :max node computation time
    • n
      : number of nodes
  • w(e)=Mw(e)t(U)

    • for all edges to create new graph
      G
  • SUV: Solve shortest path problem on
    G

    • If UV then

      W(U,V)=SUVM

      D(U,V)=MW(U,V)SUV+t(V)
    • If U=V then

      W(U,V)=0

      D(U,V)=t(U)

Minimium registers

  • Rv=maxVe?{wr(e)}
    • non-linear function, need reformulate.

Reformulate graph

  1. add a dummy node
    U^
    to
    V
    • t(U^)=0
      : with no computing time.
    • w(ei^)=wmaxw(ei)
      , where
      wmax
      V(e)
      邊中最大的延遲
    • β=1/k
      : 原本
      V
      點有
      k
      條邊,
      U^
      每條邊則為
      1/k

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
  • Registers constrains
    • Minimium the
      Vr(V)(?>Vβ(e)V>?β(e))

      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →

介紹

forward cutsets retiming(pipeline) < cutsets retiming < retiming

  • Retiming

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Cutset retiming rules

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • forward cutsets retiming(pipeline)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • uNslow DFG
    Replace each delay in a DFG with N delays.
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • Retiming 2-slow Graph

Shortest Path Algorithm

Floyd-Warshall algorithm

如果沒有負圈,就會找到最短路徑







spa



1

1



2

2



1->2


-3



3

3



2->3


1



4

4



2->4


2



3->4


2



4->1


1



  1. Initial frist matrix by DFG
    R(1)=[3121]
  • if
    k(k+1)(U,V)>rk(U,k)+rk(k,V)
  1. R(2)=[312212]
  • if
    k(k+1)(U,V)>rk(U,k)+rk(k,V)
  1. R(3)=[3211221210]
  • if
    k(k+1)(U,V)>rk(U,k)+rk(k,V)
  1. R(4)=[3211221210]
  • if
    k(k+1)(U,V)>rk(U,k)+rk(k,V)
  1. R(5)=[0321301230121210]