工具鏈與組譯流程
本章把第 18 章的指令「用起來」:介紹 GNU 工具鏈的組譯與連結流程、常用偽指令與組譯器指示詞;詳述 RISC-V ——參數與回傳值的暫存器分配、呼叫者/被呼叫者保存責任、堆疊框架的建立與拆除;並以迴圈、陣列、字串、遞迴(階乘與費氏)等完整範例示範慣用寫法。這些程式將於第 26 章載入我們自製的 Verilog CPU 上實際執行。
阅读文章 →M 擴展:乘法與除法
基礎集之外,真實的 RISC-V 處理器總會搭配若干標準擴展。本章詳述與本教材實作最相關的 (乘法與除法):八條指令的語意、mulh 家族的用途、除零與溢位的定義行為;介紹 (16 位元壓縮指令)的編碼思想與硬體代價;概覽 (原子操作)如何支撐多核同步;最後討論「該選哪些擴展」的工程取捨。
阅读文章 →特權模式
使用者層指令(第 18 章)之外,處理器還需要一套「管理機器」的機制:這就是 RISC-V (ISA Manual Volume II)。本章介紹三級特權模式(M/S/U)與其分工;及六條 Zicsr 指令;的完整硬體流程(mtvec/mepc/mcause/mstatus 的角色與 mret 返回);計時器與軟體中斷(CLINT)、外部中斷(PLIC);以及 分頁虛擬記憶體如何落實第 8 章的概念。這是把第一部作業系統支援、第二部指令
阅读文章 →硬體思維:與軟體語言的根本差異
本章為第三部的工具課:以「做 CPU 需要什麼」為範圍,精講 Verilog 硬體描述語言。核心觀念只有一個——:每一行都對應真實的閘、導線與正反器,所有 always 區塊永遠並行存在。我們將依序建立:模組與埠、wire/reg 與四值邏輯、組合邏輯(assign 與 always @(*))、時序邏輯(always @(posedge clk)與非阻塞指定)、參數化、記憶體陣列與 readmemh、測試平台寫法,以及新手最常犯的錯誤
阅读文章 →設計規劃
從本章起,我們動手建造一顆完整的 RV32I 處理器。策略是「先單週期、後管線」:單週期機器每個時脈執行完一整條指令,沒有危障,是理解資料路徑的最佳起點。本章完成所有的 Verilog 實作與原理講解:ALU、暫存器檔、立即值產生器、分支比較器、主控制器、指令/資料記憶體。每個模組都對應前面章節的理論:ALU 對應第 9 章、立即值對應第 11 章、控制訊號對應第 15 章。完整原始碼位於專案的 目錄,已以 Icarus Verilog
阅读文章 →頂層介面與資料路徑
單週期 CPU(二):整合與指令流程頂層資料路徑 / PC 邏輯 / 寫回選擇 / 每類指令的資料流 / 時脈與關鍵路徑
阅读文章 →管線切割:四組暫存器
五級管線 CPU:危障、前遞與停頓IF/ID/EX/MEM/WB 管線暫存器 / 前遞單元 / 載入使用停頓 / 分支沖除 / 完整 Verilog 實作
阅读文章 →驗證策略總覽
驗證與模擬:組譯器、Testbench 與除錯實錄Python 組譯器 / 自檢測試程式 / testbench 設計 / 波形與追蹤除錯 / 迴歸測試自動化
阅读文章 →交通號誌控制系統設計 — PLC + Modbus + SCADA
方案 A(傳統工業自動化方案) 適用情境:十字路口、產業道路、廠區出入口、隧道號誌等需要高可靠度(MTBF)與符合工業規範(IEC 611313、IEC 61508 SIL2)的場域。
阅读文章 →Project Code Flow — Detailed Technical Documentation
This document describes how the CCIT4080 CL05 PKPD Group2 project is structured, which code runs in each build, and how data and control flow through the system. It covers both the simple TFT clock default build and the
阅读文章 →Code Execution Flow Detailed Technical Documentation
This document provides a comprehensive explanation of how the MAX30102 Health Monitor code executes from startup to runtime, covering every component and detail.
阅读文章 →Quick Start Guide
Install: LVGL by LVGL version 8.3.0 or later TFTeSPI by Bodmer if using compatible display
阅读文章 →MAX30102 Health Monitor with ESP32 and LVGL
A comprehensive health monitoring system using ESP32, MAX30102 pulse oximeter sensor, and LVGL for the user interface.
阅读文章 →Serial Logging System Documentation
The codebase includes comprehensive serial logging throughout all components to help users understand code execution and facilitate debugging. All logs use a consistent format with component tags in square brackets.
阅读文章 →TFTeSPI Configuration Guide
TFTeSPI requires configuration in the UserSetup.h file before use. Follow these steps:
阅读文章 →Getting Started Guide
This guide will help you set up your development environment and run your first LVGL example on ESP32 with TFT display.
阅读文章 →LVGL + ESP32 + TFTeSPI Educational Package
This folder contains a comprehensive educational package for teaching students how to use LVGL Light and Versatile Graphics Library with ESP32 and TFTeSPI displays.
阅读文章 →LVGL Quick Reference Guide
A quick reference for common LVGL operations when working with ESP32 and TFTeSPI.
阅读文章 →ESP32 + TFTeSPI + LVGL Complete Guide
This guide provides a comprehensive introduction to using LVGL Light and Versatile Graphics Library with ESP32 and TFTeSPI display drivers. You'll learn how to create interactive graphical user interfaces GUIs for embedd
阅读文章 →PCI Peripheral Component Interconnect Architecture and WiFi Driver Integration
PCI Peripheral Component Interconnect is a local bus standard designed for connecting hardware devices to a computer system. Originally developed by Intel in 1992, PCI has evolved through multiple versions and remains a
阅读文章 →TCP/IP 4Layer Model and WiFi PCI Driver Architecture
This document provides a comprehensive explanation of the TCP/IP 4layer model and describes how Linux WiFi PCI card drivers interact with each layer of the network stack. Understanding these layers is crucial for develop
阅读文章 →rt2x00 WiFi PCI Driver: Probe, Init, TX/RX, and Interrupt Flow
This document describes in detail how the rt2x002.0.0b3 WiFi PCI driver probes the card, initializes it, configures hardware, hooks into the network stack, sends packets from the IP layer through the WiFi card, receives
阅读文章 →Beginner Character Driver Tutorial Linux
This tutorial shows how a character device driver works by building small, heavilycommented kernel modules that create /dev nodes, then implement common characterdriver file operations.
阅读文章 →LANE ONE Directional Vehicle Detection → LED Board Control System
Application Scenario: A singlelane workzone section is controlled by two photoelectric beam locations, A entry and B exit, spaced apart to form a detection zone. Traffic is one car at a time. When a vehicle travels in th
阅读文章 →