derek8955
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    10
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Static Timing Analysis(STA) ###### tags: `Digital IC Design` [回到主頁面](https://hackmd.io/@derek8955/BkK2Nb5Jo/https%3A%2F%2Fhackmd.io%2FdpcBlBL8TlShpQ-wSi9Quw) ### <font color="blue"> What is STA </font> - STA 是一個驗證 timing 是否有 violation 的方法,透過檢查電路中所有 path 的 Timing arc(pin 與 pin之間的 timing 關係)是否符合 constraint 的要求 - DTA( Dynamic Timing Analysis ) 是另外一種驗證方法,利用測試資料對整個電路跑 simulation > DTA 因為要對所有電路跑過一次邏輯模擬,相對速度不會比 STA 快。而且 STA 可以確保所有的 Timining path 有被 detect ### <font color="blue"> Goal of STA</font> - 檢查 synthesis 之後 timing 是否有 violation ( Logic synthesis ) - 檢查 scan chain insertion 之後 timing 是否有 violation ( DFT ) - 檢查 Place & Route 之後 timing 是否有 violation ( APR ) |![1000010153](https://hackmd.io/_uploads/HkebGy_Eel.jpg)| |:---:| |Ref:[6] STA確認的各種Timing(斜體字為user指定;直體字為vendor提供)| ### <font color="blue"> Start Points and End Points </font> - Timing path start points include: - Clock pins of registers - Input ports - Timing path end points include: - All input pin of registers except clock pins - Output ports ### <font color="blue"> Timing Path </font> 在數位電路中有四條 Timing path: - in2reg (Path1) : input(port) to register(except clock pins) - reg2reg (Path2) : register(Clock pins) to register(except clock pins) - reg2out (Path3) : register(Clock pins) to output(port) - in2out (Path4) : input to output ( 盡量避免這條路徑 ) |![](https://i.imgur.com/z0dItdu.png)| |:---:| |Ref : [1]| ### <font color="blue"> Term definition </font> - setup time : 輸入訊號必須在 clock edge 之前 tsu 即穩定 - hold time : 輸入訊號必須在 clock edge 之後 thd 都保持穩定 :::success tsu 與 thd 是製程提供的 ::: - recovery time : reset de-assert後,恢復到正常狀態時必須在clock edge 前的一段時間到來,才能保證clock能有效恢復到正常狀態(類似setup time) - removal time: reset de-assert必須在clock edge 後一段時間才能改變(類似 hold time) |![](https://i.imgur.com/w10YuoN.png)|![](https://hackmd.io/_uploads/BJ_nO7YNxl.jpg)| |:---:|:---:| | setup time & hold time | removal time & recovery time| |Ref : [2]| Ref : [7]| - nochange: 某些訊號需要進行 no-change 時序檢查,以確保它們不會在週期性訊號(例如時鐘)的作用期間內切換(變化) - max_skew: 檢查同一個時鐘在不同 flip-flop 間的到達時間差(skew)是否超出允許範圍。太大的 skew 會讓 setup 或 hold time margin 被吃掉 - min_period: 檢查兩個相鄰時鐘邊緣之間的最小時間間隔是否小於某個限制。如果週期太短,flip-flop/logic 沒時間完成運算 → 設計會錯亂 - min_pulse_width: 檢查 clock 的高電位或低電位維持的時間是否太短。如果 clock 高或低的時間太短(glitch),FF 可能無法辨識為一個合法的 edge 導致 FF 沒有正確觸發,產生 meta-stability、資料錯誤 - clock gating check - setup: 檢查 gating cell 的 enable訊號(L1/A),是否在時鐘 edge 來臨前有足夠的 setup 時間穩定下來 - hold: Clock gating hold check 是檢查 enable 訊號(L1/A)在 clock gating cell觸發時,是否維持一段時間不變,避免 clock glitch 或錯誤 gating。 |![1000010181](https://hackmd.io/_uploads/ryclXBtNee.png)|![1000010182](https://hackmd.io/_uploads/HJybmrFExx.png)| |:---:|:---:| |clock gating |waveform of clock gating check| - data to data check: 檢查「兩個 data 訊號彼此之間的時序關係」。例如數據訊號要比ready訊號早穩定一段時間,並且ready訊號assert後一段時間才可以toggle數據訊號 - contamination delay(tcd) : 輸入訊號改變之後 Y 開始改變的時間 - propagation delay(tpd) : 輸入訊號改變之後 Y 改變至穩定的時間 - Clock-to-Q contamination delay : clock edge 到 Y 開始改變的時間 - Clock-to-Q propagation delay : clock edge 到 Y 改變至穩定的時間 |![](https://i.imgur.com/rlEeTyo.png)|![](https://i.imgur.com/UOVGKtp.png)| |:---:|:---:| |contamination delay & propagation delay|Clock-to-Q contamination/propogation delay| |Ref : [3]|Ref : [4]| ### <font color="blue"> Setup Time Criterion & Hold Time Criterion </font> - Setup Time Criterion : (Tcycle + tskew) >= (tpcq + tpd + tsetup) data required time( data 到達所需時間 ) : Tcycle + tskew data arrival time( data 實際到達的時間 ) : tpcq + tpd + tsetup > 1. Tcycle : clock period > 2. 線路中難免都會有電阻,所以兩個 cell 收到 clock 的時間點會有所不同,我們稱彼此之間的差值為 clock skew > 3. tpcq : DFF_1 clock to q 所需的時間 |![](https://i.imgur.com/HnPqzxH.png)|![](https://i.imgur.com/ZqHMMvG.png)| |:---:|:---:| |Ref : [5] |Setup Time Criterion | - Hold Time Criterion : (tccq + tcd) >= (thold + tskew) data required time : tccq + tcd data arrival time : thold + tskew > 1. tccq : DFF_2 clock to q 所需的時間 |![](https://i.imgur.com/HnPqzxH.png)|![](https://i.imgur.com/bMtgMct.png)| |:---:|:---:| |Ref : [5] | Hold Time Criterion | ### <font color="blue"> Timing Violation </font> designer 必須權衡 Performance & Power & Area,但在這之前必須先解決 Timing 問題,確保所有的 Timing path 都不可有 Timing violation,否則會導致 metastable 的問題產生 - Setup Time Violation : 一個 cycle 內太多件事要做,可以設計 [pipeline](https://hackmd.io/lmsj4cLzTS-_IUq3GkHo8A) 或是調高 clock period > Input delay( 見 [synthesis flow](https://hackmd.io/on4SdHtHSc2pa9BD8k2u4g) ) 不適當也會造成 setup time violation - Hold Timiming Violation : 代表 delay 不足,可以在 violated path 加上 buffer > hold time 若有 violation,在 clock tree synthesis 之後才能改善 ### <font color="blue"> Reference Image </font> [1] https://www.synopsys.com/glossary/what-is-static-timing-analysis.html [2] http://www.vlsi-expert.com/2011/04/static-timing-analysis-sta-basic-part3a.html [3] https://www.sciencedirect.com/topics/computer-science/contamination-delay [4] https://slideplayer.com/slide/17358331/ [5] https://medium.com/mirkat-x-blog/iclab-lab04-note-6a19d03b8d42 [6] https://zhuanlan.zhihu.com/p/392478843 [7] https://www.intel.com/content/www/us/en/docs/programmable/683539/20-4/recovery-and-removal-checks.html ### <font color="blue"> Apendix --- 為何 flip-flop 需在 clock edge 的前後保留一段準備時間 </font> https://www.edn.com/understanding-the-basics-of-setup-and-hold-time/ ### <font color="blue"> Apendix --- setup/hold youtube介紹影片 </font> https://www.youtube.com/watch?v=xCA54Qu4WtQ&list=PLpCkjM331Aa8JNoZ1s1o1txve2wlf9pCP

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully