Kyle Hsieh (謝阿Sa)
    • 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 New
    • 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 Note Insights Versions and GitHub Sync 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
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Computer Architecture Week1 tags: jserv --- # On Fall 2021 > [Course online links](https://youtu.be/h_3ZakOBxTM) ## Introduction ![](https://i.imgur.com/w6EK2Ry.png) - Compatibility is important on computer industry ## David Patterson: [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI) > [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md) - Software advances can inspire architecture - Virtualization technology - hardware support: [Intel vt-x vt-d vt-c](https://www.itread01.com/content/1550308865.html) - MicroVAX - simplify everything - inspire **RISC** - ![](https://i.imgur.com/0JwGioc.png) - ![](https://i.imgur.com/PesfFRA.png) - ![](https://i.imgur.com/8TmxXyM.png) ## David Patterson: [From Mainframe CPUs to Neural-Network TPUs and Open RISC-V](https://riscv.org/wp-content/uploads/2017/05/Mon0915-RISC-V-50-Years-Computer-Arch.pdf) / [video](https://youtu.be/eH9_ygsio3I) ## [Great Ideas in Computer Architecture, Intro](https://drive.google.com/open?id=1Y4yUaw9vryZcdc4Xu0RQxHfqjVbeHJLF) / [video](https://youtu.be/u_hXH5-tbM4?t=263) ## [Number Representation](https://drive.google.com/drive/folders/1_Zbt8KdwieLsqRdfc6aNBOa2_hEmFkxR) - trick on switch of upper/lower cases in ASCII code - one's complement: still be used in tcp/ip - Sign extension ## [Floating Point](https://drive.google.com/drive/folders/147xm_DhklkevG6602mH4yoGuVMw-3GQZ?usp=sharing) ### Fixed point - sometimes shortened to **fixpoint** - need to think the scope of number you want to represent #### fixed-point multiplication > [Multiplication Examples Using the Fixed-Point Representation](https://www.allaboutcircuits.com/technical-articles/multiplication-examples-using-the-fixed-point-representation/) - in a manner similar to the **decimal multiplication** - Steps: 1. ignore the binary point of the multiplier and multiplicand > by making the operands to be an integer 2. perform the multiplication treating the operands as [two’s complement](https://www.allaboutcircuits.com/technical-articles/twos-complement-representation-theory-and-examples/) numbers 3. determine the position of the binary point for the result ### Representation of Fractions - We really want is to "float" the binary point. Why? > Floating binary point most effective use of our limited bits (and thus more accuracy in our number representation) ### Floating Point Representation - :question: Representation range > 延伸閱讀:[Floating-Point Arithmetic](/amphuEo3SdGXbWCYMndTBg) - *NaN* has many kinds of Not a Number - float vs double - precision - efficient - :warning: convert double to float data type - limitation - efficient - int -> float -> int - may have rounding error ### Floating Point Fallacy - FP add associative: **FALSE!** - Why? FP result __approximates__ real result! ## [C Memory Management](https://drive.google.com/drive/folders/1pHpHRvjEg5TdidIp_fkOrh6TvMlYl5Yj?usp=sharing) / [video](https://youtu.be/fhEE4J4QCps) # On Fall 2022 > [Course online link](https://youtu.be/kchwRBGRIHk) ## Introduction ![](https://hackmd.io/_uploads/HklOv18Wo.png) - The performance of Single-Thread Processor Performance is rapidly increased from year `1985` to `2000` and ended on year `2000`. ![](https://hackmd.io/_uploads/r1pddk8bs.png) - Software developers *must* consider - Parallel systems - Heterogeneous systems ## David Patterson: [A New Golden Age for Computer Architecture: History, Challenges and Opportunities](https://content.riscv.org/wp-content/uploads/2018/12/A-New-Golden-Age-for-Computer-Architecture-History-Challenges-and-Opportunities-David-Patterson-.pdf) / [video](https://youtu.be/uyc_pDBJotI) > [Article](https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-age-for-computer-architecture/fulltext), [note](https://github.com/cristiean/notes/blob/4c4ceb291ba68c55659ab0d4571385c8cccacd21/a-new-golden-age-for-computer-architecture.md) ![](https://hackmd.io/_uploads/r1CO3JLbo.png) - By early 1960's ![](https://hackmd.io/_uploads/rk4Lp18Wj.png) - `Intel iAPX 432` is a `RISC architecture`, not compitible to `x86` - the architecture is finally failed: - the ambition was punished by `performance problems` and ran late, so they had to come to their founder `Gordon Moore` and say: *look we're not going to be there in time with a 16-bit microprocessor*, so that set off alarm bells at Intel and they stared an emergency project to try to build a 16-bit computer in just 52 weeks. ![](https://hackmd.io/_uploads/Hy-5ZlUbi.png) - The complex ISA prevents a compiler being optimized and performing advance optimizing strategies - :notes: So, the main concept behind `RISC` is that everything is from scratch and keep as simple as possible which makes optimizing compiler can do a good job ### CISC vs. RISC Today **CISC** - Pros - For *comptibility* on `PC Era`, CISC can do better, because tight coupling between Intel x86 and Microsoft Windows OS - You can also extend the existing microprocessor with help of the `microcode (μcode)` - Cons - It suffers on *performance problems* because it's hard to optimize the x86 program as mentioned before - e.g., reorder the order of instructions **PostPC Era: Client/Cloud** - \> `20B` total / year in 2017 - e.g., IoT embedded devices - these devices could be powered by RISC, because of the cost and optimization requirement - 99% Processors today are RISC - x86 could be regards as a RISC architecture - CISC instruction will be decoded into `micro-ops` which are native instruction in RISC architecture, such as: ![](https://i.imgur.com/dsvxpYn.png) - [ ] (TO-READ) [What's MPU](https://semiengineering.com/mpu-vs-mcu/)

    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