10 篇文章

  • lecture10_Combinational_Logic

    Combinational Logic CMOS Boolean algebra Arithmetic Logic Unit (ALU) .

  • lecture11_FSMs

    FSMs, Synchronous Digital Systems FSM: Finite State Machine state transition diagram s0 初始状态;input/output;箭头指向是 next state clock and registers Flip-Flop 时钟上升沿;Q = D,其余时刻什么也不做 register delay clk-to-q delay Registers can’t transfer the D input to Q output instantly clk-to-q delay: Time it takes after ...

  • lecture14_DataPath_Hazards

    Hazards Structural Hazards 两条或更多指令在流水线需要访问同一个物理单元 Solutions 指令轮流使用物理资源 增加额外的硬件资源 设计指令集避免结构冒险 Data Hazards Some regfiles support writing a new value to a register, then reading the new value, in the same cycle.

  • lecture15_Data_Level_Parallelism

    Data-Level Parallelism SIMD single instruction, multiple data or vector instructions SIMD 实现矩阵乘法 common mistake 直接使用 32-bit 的 SIMD vector(寄存器与内存不同) 使用_mm_load or _mm_store 时采用未对齐的内存 忘记处理尾部特殊情况 使用太多的 vector .

  • lecture16_Thread_Level_Parallelism

    Thread-Level Parallelism SISD:线性执行指令,没有并行 RISC-V 单周期 CPU SIMD:单指令流,多数据流 Intel instrinsics GPUS MISD:多指令流,单数据流 Deep learning acceleration chips MIMD:多指令流,多数据流 Modern processors 多核执行模型 独立资源 Datapath (PC, registers, ALU) Highest level caches (L1, L2 cache) 共享资源 Memory (DRAM) 3rd level cache 线程 一个进程可以可以...

  • lecture17_Process_Level_Parallelism

    Process-Level Parallelism Multiprocess Framework 不同的核不分享内存,但是共享一个文件系统 在多线程程序运行时,一个线程 crash,整个程序可能 crash;但是多核程序,每个核之间是独立的,如果一个核 crash,其他的核可以继续运行 不同的核交流占用大量时间 将一个大问题分解成独立的小问题;以此来减少数据的传输时间损耗 .

  • lecture18_Caches

    Caches Memory Hierarchy (层次化内存) 寄存器离 CPU 最近,使用也最快;但是很贵;每个 CPU 只有少量寄存器 DRAM 更适合存储大量数据,但是速度更慢 需要数据总线进行传输 加速方式 Hardware Multithreaing 在等待数据的过程中,切换到另一个进行去执行任务 每个物理核含有两个 PC 核寄存器组,所以上下文切换很快 Prefetching 每个周期预取指令和数据 Caching 利用空间局部性和时间局部性,减少和主存之间的数据传输 缓存中存放被主存使用的数据副本 主存中存放磁盘上的数据副本 层次化管理 Registers <--->...

  • lecture2_Intro_to_C

    Intro to C Great idea in Computer Architecture 1. Abstraction (Layers of Representation/Interpretation) 2. Moore’s Law(摩尔定律) 3.

  • lecture21_Virtual_Memory

    Virtual Memory 直接使用物理内存问题 没有足够空间;RISC-V 只提供 32bit 空间即 4GB 地址空间有空洞 不能保证其他程序不访问同一块内存 Benefits 允许运行自身大小比主存大得多的程序;只有工作的页放在主存,其他页放在磁盘;由 OS 进行页的请求和置换 OS 可以共享内存并实现程序的互相保护 隐藏机器级的不同 .

  • lecture4_C_Memory

    C Memory memory alignment(内存对齐) Memory alignment: a system-dependent rule that tells us where data can be stored (usually not at every byte) Can be accomplished with the “aligned” attribute __attribute__((aligned(n))); Strings Example: The string “Hi” is stored in memory as an array of characters.