JeffBla
    • 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 2025年4月30日 一對一討論 cache > contributed by < `JeffBla` > ## Q1: 為什麼 cache 越慢的範圍越大 ![image](https://liujunming.top/images/2019/4/1.jpg) 1. 擁有較大的搜索範圍,當資料範圍離存取位置較近,則能夠馬上的存取,但若較遠,就需要搜索,如硬碟的 Seek time (移動驅動臂到正確的磁軌)、Rotational delay (等待磁盤轉到正確的磁區)。 2. 各元件的運行速度不同,如: (1). cache:bitlines 與 wordline 的充電,電晶體的運作和放大器讀取。 (2). 硬碟則是需要驅動臂移動讀寫頭到正確的磁軌,磁盤旋轉到正確磁區,讀取頭偵測並將資料轉換成電子訊號。 ## Q2: cache 讀取是快的但寫入是慢的。但為什麼? ### cache 的組成 ![image](https://computationstructures.org/lectures/caches/slides/Slide04.png) cache 由 SRAM cell 組成,這裡我們看到了 8 位置 SRAM 陣列的元件佈局,其中每個位置都保存 6 位元資料。透過 wordlines 選擇要操作的資料。 bitlines 與 drivers 則負責寫入與讀取的電位操作。 ![image](https://computationstructures.org/lectures/caches/slides/Slide05.png) SRAM cell 由兩個 CMOS inverter 組成,形成 1 與 0 的兩種狀態,本單元提供穩定的存儲,只要有電源,逆變器的抗噪能力就能確保邏輯值得以維持,即使任一逆變器輸入端存在雜訊。 ### SRAM 讀取 ![image](https://computationstructures.org/lectures/caches/slides/Slide06.png) 其順序如上圖,值得注意的是,不須真的等到電位下降到有效邏輯電平,利用 Sense amplifiers 快速檢測兩條位線之間產生的微小電壓差並產生適當的數位輸出。 ![image](https://hackmd.io/_uploads/Hy_n0E1ble.png) 讀取的主要延遲為 bitlines 的電容 $C$ 與 sense amplifiers 的靈敏度 $\Delta V$。 ![image](https://hackmd.io/_uploads/Byzi1wxbxx.png) ### SRAM 寫入 ![image](https://hackmd.io/_uploads/SkbR4XxZgl.png) 其順序如上圖,bitlines drivers 設計的比單元內的弱反相電晶體(尤其是 PMOS 電晶體)更強,這樣一來 BL/BL̅ 的輸入將能夠覆寫先前資料。 寫入時需要將先前資料覆寫,以翻轉其內部狀態,然而,不同於讀取,此電位變化過程無法被大幅縮減,若減少太多,則會導致覆寫失敗,也就是必須保證最小寫脈衝寬度、資料有效時間和寫入恢復;內部「高節點」達到 VDD 的 90%。 ![image](https://hackmd.io/_uploads/r1yqkDlbex.png) 其對應的比較如下: | Operation | Bitline Swing Typical | Reason | | -------- | -------- | -------- | | Read | Very small (~100–250 mV) | Small swing to detect data without disturbing it | | Write | Moderate to full (e.g., ~0.5–1 V for VDD = 1 V) | Full swing needed to overwrite existing data | ## ref [Computation structures - L14: The Memory hierarchy by The staff of M.I.T. 6.004](https://computationstructures.org/lectures/caches/caches.html#5) [DIGITAL ELECTRONICS SYSTEM DESIGN by PROF. IRIS BAHAR in BROWN School of Engineering](https://www.brown.edu/Departments/Engineering/Courses/En163/Lectures/ENGN1630-23-sram.pdf) [Lecture 14: Memory Elements by Mark McDermott in The University of Texas at Austin](https://users.ece.utexas.edu/~mcdermot/vlsi1/main/lectures/lecture_14.pdf)

    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