S SmartDocs

硬體與嵌入式系統

Arduino、RISC-V、MSP430、PLC、Linux 驅動程式與嵌入式系統工程。

RISC V Hardware 更新於 2026-07-04

工具鏈與組譯流程

本章把第 18 章的指令「用起來」:介紹 GNU 工具鏈的組譯與連結流程、常用偽指令與組譯器指示詞;詳述 RISC-V ——參數與回傳值的暫存器分配、呼叫者/被呼叫者保存責任、堆疊框架的建立與拆除;並以迴圈、陣列、字串、遞迴(階乘與費氏)等完整範例示範慣用寫法。這些程式將於第 26 章載入我們自製的 Verilog CPU 上實際執行。

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

M 擴展:乘法與除法

基礎集之外,真實的 RISC-V 處理器總會搭配若干標準擴展。本章詳述與本教材實作最相關的 (乘法與除法):八條指令的語意、mulh 家族的用途、除零與溢位的定義行為;介紹 (16 位元壓縮指令)的編碼思想與硬體代價;概覽 (原子操作)如何支撐多核同步;最後討論「該選哪些擴展」的工程取捨。

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

特權模式

使用者層指令(第 18 章)之外,處理器還需要一套「管理機器」的機制:這就是 RISC-V (ISA Manual Volume II)。本章介紹三級特權模式(M/S/U)與其分工;及六條 Zicsr 指令;的完整硬體流程(mtvec/mepc/mcause/mstatus 的角色與 mret 返回);計時器與軟體中斷(CLINT)、外部中斷(PLIC);以及 分頁虛擬記憶體如何落實第 8 章的概念。這是把第一部作業系統支援、第二部指令

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

硬體思維:與軟體語言的根本差異

本章為第三部的工具課:以「做 CPU 需要什麼」為範圍,精講 Verilog 硬體描述語言。核心觀念只有一個——:每一行都對應真實的閘、導線與正反器,所有 always 區塊永遠並行存在。我們將依序建立:模組與埠、wire/reg 與四值邏輯、組合邏輯(assign 與 always @(*))、時序邏輯(always @(posedge clk)與非阻塞指定)、參數化、記憶體陣列與 readmemh、測試平台寫法,以及新手最常犯的錯誤

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

設計規劃

從本章起,我們動手建造一顆完整的 RV32I 處理器。策略是「先單週期、後管線」:單週期機器每個時脈執行完一整條指令,沒有危障,是理解資料路徑的最佳起點。本章完成所有的 Verilog 實作與原理講解:ALU、暫存器檔、立即值產生器、分支比較器、主控制器、指令/資料記憶體。每個模組都對應前面章節的理論:ALU 對應第 9 章、立即值對應第 11 章、控制訊號對應第 15 章。完整原始碼位於專案的 目錄,已以 Icarus Verilog

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

頂層介面與資料路徑

單週期 CPU(二):整合與指令流程頂層資料路徑 / PC 邏輯 / 寫回選擇 / 每類指令的資料流 / 時脈與關鍵路徑

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

管線切割:四組暫存器

五級管線 CPU:危障、前遞與停頓IF/ID/EX/MEM/WB 管線暫存器 / 前遞單元 / 載入使用停頓 / 分支沖除 / 完整 Verilog 實作

閱讀文章 →
RISC V Hardware 更新於 2026-07-04

驗證策略總覽

驗證與模擬:組譯器、Testbench 與除錯實錄Python 組譯器 / 自檢測試程式 / testbench 設計 / 波形與追蹤除錯 / 迴歸測試自動化

閱讀文章 →
traffic light 更新於 2026-05-17

交通號誌控制系統設計 — PLC + Modbus + SCADA

方案 A(傳統工業自動化方案) 適用情境:十字路口、產業道路、廠區出入口、隧道號誌等需要高可靠度(MTBF)與符合工業規範(IEC 611313、IEC 61508 SIL2)的場域。

閱讀文章 →
Arduino EN 更新於 2026-02-03

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

閱讀文章 →
Arduino EN 更新於 2026-02-03

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.

閱讀文章 →
Arduino EN 更新於 2026-02-03

Quick Start Guide

Install: LVGL by LVGL version 8.3.0 or later TFTeSPI by Bodmer if using compatible display

閱讀文章 →
Arduino EN 更新於 2026-02-03

MAX30102 Health Monitor with ESP32 and LVGL

A comprehensive health monitoring system using ESP32, MAX30102 pulse oximeter sensor, and LVGL for the user interface.

閱讀文章 →
Arduino EN 更新於 2026-02-03

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.

閱讀文章 →
Arduino EN 更新於 2026-02-03

TFTeSPI Configuration Guide

TFTeSPI requires configuration in the UserSetup.h file before use. Follow these steps:

閱讀文章 →
Arduino EN 更新於 2026-02-03

Getting Started Guide

This guide will help you set up your development environment and run your first LVGL example on ESP32 with TFT display.

閱讀文章 →
Arduino EN 更新於 2026-02-03

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.

閱讀文章 →
Arduino EN 更新於 2026-02-03

LVGL Quick Reference Guide

A quick reference for common LVGL operations when working with ESP32 and TFTeSPI.

閱讀文章 →
Arduino EN 更新於 2026-02-03

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

閱讀文章 →
linux drivers EN 更新於 2026-02-03

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

閱讀文章 →
linux drivers EN 更新於 2026-02-03

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

閱讀文章 →
linux drivers EN 更新於 2026-02-03

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

閱讀文章 →
linux drivers EN 更新於 2026-02-03

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.

閱讀文章 →
traffic light EN 更新於 2026-06-05

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

閱讀文章 →