• 沒有找到結果。

Chapter 4 Simulation

4.2 Analysis of proposed design

4.2.1 Timing analysis of proposed design

在此段落中,我們將分析所提出的設計在時間上的可行性。針對此部分,我 們設計的限制在於為了不降低 decoding performance。因此我們需要去分析每一 張 frame 額外增加或者是修改過的 stages,是否可以 fit 進原本 H.264 的 stage 內 (one stage: Time to decode one frame (1s/30))。

根據 Figure 3-2,每一張 frame 需經過 partial decoding stage(額外增加的 stage)、

decoding stage(修改過的 stage)、Output & Partial Frame Removed stage(額外增加 的 stage)以及 Whole frame remove stage(修改的 stage)。我們將針對上述每一個 stage,分析是否可以 fit 進 Time to decode one frame 內。

A. Partial Decode(P-D) stage Tasks:

1. Partial decode one frame 2. Update PRT Table

3. Store one encoded frame into Input Buffer

上述三個工作流程為: Task1=>Task2(依序執行), Task3 可與 Task1 同時執行

此部份我們須分析是否 Time to execute the Task1 and Task2 < Time to decode one frame

由於 partial decoder 是傳統 H.264 decoder 中 entropy decoder 的簡化,因此我 們可以假設 Execution time of Partial decoder < Execution time of Entropy decoder。

另外,相較於傳統 H.264 的 motion compensation(MC),其 update the PRT table 所需的工作較為簡單,因此可以假設 Execution time of record the PRT info. of blocks < Execution time of MC。因此可證明 Time to partial decode one frame+

62

Time to update the PRT table < Time to decode one frame。

Time to execute task3 < Time to decode one frame

Table 4-9 為 Time to store one encoded frame into Input Buffer 所需的時間,可 發現遠小於 Time to decode one frame 所需的時間,因此 Partial decode stage 是可 以 fit 進原本的 stage 內。

Table 4-9 Timing analysis of writing one encoded frame into Input Buffer.

B. Decode(D) stage

在解碼一張 frame 中,相較於傳統 H.264 decoder,我們僅改變了 DPB access 的部分,因此僅需評估 modified DPB 的 access time 是否少於傳統 DPB 的 access time。Time to access modified DPB 可分成下列三個 case

Case 1: Hit in CRFS (T1) Case 2: Hit in FRFS (T2)

Case 3: Miss in FRFS(此部分所需的時間為 T2+Max(T1,T2))(此為 critical path) Table 4-10 列出 access 不同 storage 所需的時間,可發現 Case 3 所需的 access time 亦小於傳統 DPB 的 access time。因此,我們可確認在此 stage 是不會增加解 碼一張 frame 所需的時間。

Table 4-10 Access time of modified DPB and traditional DPB.

63

C. Output and Partial Frame Remove (O&PRT) stage Tasks:

1. Load all pixels of the frame reaching PRT from CRFS (T1) 2. Store useful pixels in to FRFS (T2)

3. Output pixels of the frame for display 4. Remove one frame from CRFS

上述三個工作流程為: Task1=>Task2、Task3 以及 Task4(Task2、Task3、Task4 可同時執行)

Task3 所需的時間可無須重視,因為傳統 H.264 decoder 在一個 stages 內,也 需要將一張 frame output for display。另外,我們的 modified DPB access time 相 較於傳統 DPB 來的快,因此,我們輸出一張 frame 亦可在一個 stage 之內完成。

Task4 所需的時間亦可忽略,此部分可由下一張 decoded frame 的資料覆蓋掉 此張 frame,因此不需要真正做移除。

我們僅需分析是否 T1+T2 < Time to decode one frame

Table 4-11 列出 T1 以及 T2 所需的時間,可發現 T1+T2< Time to decode one frame,

因此 O&PRT stage 可以 fit 進原本的 stage 內。

Table 4-11 Timing analysis of loading all pixels of the frame reaching PRT from CRFS and storing useful pixels into FRFS.

64

D. Whole frame remove(R) stage

Task: Remove one invalidated frame in FRFS 此部分我們須證明:

Time to remove one invalidated frame in FRFS < Time to decode one frame Table 4-12 顯示 Remove one invalidated frame in FRFS 所需的時間小於 decode one frame 所需要的時間。因此,R stage 可以 fit 進原本的 stage 內。

Table 4-12 Timing analysis of removing one invalidated frame in FRFS.

根據上述分析,由於所有新增或者是修改的 stage 皆可 fit 進傳統的 stage 內,

因此,我們所提出的設計並不會影響到 decoding performance。

相關文件