RTOS Mutex 활용 — Recursive·Priority Inheritance 적용
#한 줄 요약
“Mutex는 남이 못 들어오게 막는 문에, 누가 안에 있는지 적은 명패를 단 것입니다.” 명패가 있어서 priority inheritance와 owner-only release가 가능합니다.
#어떤 상황에서 쓰나
두 task가 같은 SPI bus, 같은 buffer, 같은 flash sector를 쓸 때 mutex로 한 번에 한 task만 들어가게 합니다. 한 task의 transaction 도중 다른 task가 끼어들면 두 transaction의 byte가 섞입니다.
실행 환경은 6-01과 같습니다(FreeRTOS V11.2.0 ARM_CM3 + heap_4, configASSERT 정의, QEMU 11.1.3 mps2-an385 -icount shift=5). 아래 코드 중 spi_xfer(), log_err(), write_raw() 같은 함수는 애플리케이션 함수이고, 실행한 코드는 “측정” 절에 있습니다.
mutex 대신 binary semaphore를 쓰면 코드는 거의 같지만 priority inheritance가 없습니다. 아래 측정에서 그 차이가 우선순위 높은 task의 대기 18 tick과 68 tick으로 나타났습니다.
#핵심 개념
| 속성 | Mutex | Binary semaphore |
|---|---|---|
| owner 추적 | yes | no |
| priority inheritance | yes | no |
| ISR에서 사용 | 불가(semphr.h 703행: “Mutex type semaphores cannot be used from within interrupt service routines”) | xSemaphoreGiveFromISR() |
| recursive 옵션 | 있음 | 없음 |
| 용도 | mutual excl. | signal |
Owner 추적이 핵심입니다. Mutex는 “누가 잠갔는지”를 기억하므로 그 task에게만 release 권한이 있고, 더 높은 priority의 task가 기다리면 owner의 priority를 일시적으로 올려 빨리 끝내게 합니다.
| 상황 | 결과 |
|---|---|
| hold time이 길면 | PI가 있어도 기다리는 task는 hold time만큼 기다림 |
| 여러 mutex를 다른 순서로 잡음 | deadlock (아래 lock ordering) |
#코드 / 실제 사용 예
#기본 SPI bus 보호
SemaphoreHandle_t spi_mutex;
void spi_xfer_safe(const uint8_t *tx, uint8_t *rx, size_t n) { if (xSemaphoreTake(spi_mutex, pdMS_TO_TICKS(100)) != pdTRUE) { log_err("spi busy"); return; } spi_xfer(tx, rx, n); xSemaphoreGive(spi_mutex);}
int main(void) { spi_mutex = xSemaphoreCreateMutex();}Take와 give를 쌍으로 묶고, timeout을 두어 lock을 못 얻은 경우를 알 수 있게 합니다.
#RAII 스타일 (C++ scope guard)
class mutex_guard {public: explicit mutex_guard(SemaphoreHandle_t m) : m_(m) { xSemaphoreTake(m_, portMAX_DELAY); } ~mutex_guard() { xSemaphoreGive(m_); }private: SemaphoreHandle_t m_;};
void do_spi(void) { mutex_guard g(spi_mutex); spi_write(buf, len); /* return 또는 exception 어디서든 자동 release */}C++이면 scope를 벗어날 때 소멸자가 give하므로, 중간 return에서 give를 빠뜨리는 실수가 없어집니다.
#Static mutex
static StaticSemaphore_t spi_mutex_buf;SemaphoreHandle_t spi_mutex;
void init(void) { spi_mutex = xSemaphoreCreateMutexStatic(&spi_mutex_buf);}*Static 변종은 heap 대신 호출자가 넘긴 StaticSemaphore_t에 mutex를 만듭니다.
#Recursive mutex
SemaphoreHandle_t log_mtx;
void log_line(const char *s);void log_with_prefix(const char *p, const char *s) { xSemaphoreTakeRecursive(log_mtx, portMAX_DELAY); write_raw(p); log_line(s); /* 내부에서 또 take */ xSemaphoreGiveRecursive(log_mtx);}
void log_line(const char *s) { xSemaphoreTakeRecursive(log_mtx, portMAX_DELAY); write_raw(s); xSemaphoreGiveRecursive(log_mtx);}
int main(void) { log_mtx = xSemaphoreCreateRecursiveMutex();}같은 task가 여러 번 take 할 수 있고, 같은 수만큼 give 해야 풀립니다. 비재귀 mutex를 같은 task가 두 번 take하면 두 번째 take가 자기 자신을 기다립니다.
#Priority inheritance 시연
void task_low(void *arg) { /* priority 1 */ for (;;) { xSemaphoreTake(m, portMAX_DELAY); busy_work(50); /* High가 들어오면 PI로 priority 5 boost */ xSemaphoreGive(m); vTaskDelay(pdMS_TO_TICKS(10)); }}
void task_med(void *arg) { /* priority 3 */ for (;;) { busy_work(100); /* without PI this preempts Low */ vTaskDelay(pdMS_TO_TICKS(1)); }}
void task_high(void *arg) { /* priority 5 */ for (;;) { xSemaphoreTake(m, portMAX_DELAY); do_critical(); xSemaphoreGive(m); }}FreeRTOS mutex는 High가 기다리기 시작하면 lock을 쥔 Low의 priority를 High의 priority로 올리므로, Med가 ready가 되어도 Low가 먼저 돌아 lock을 놓습니다. binary semaphore에는 이 상속이 없어 Med가 Low를 밀어냅니다. 아래 측정이 이 구조를 돌린 결과입니다.
#Timeout으로 deadlock 감지
if (xSemaphoreTake(m, pdMS_TO_TICKS(200)) != pdTRUE) { log_err("possible deadlock"); /* recovery — abort transaction */ return ERR_BUSY;}timeout은 그 lock의 정상 hold time보다 길게 두고, 넘으면 기록하고 transaction을 포기합니다.
#Lock ordering 규칙
/* 항상 address 오름차순으로 lock */void transfer(account_t *a, account_t *b, int amount) { account_t *first = (a < b) ? a : b; account_t *second = (a < b) ? b : a; xSemaphoreTake(first->mtx, portMAX_DELAY); xSemaphoreTake(second->mtx, portMAX_DELAY); /* ... */ xSemaphoreGive(second->mtx); xSemaphoreGive(first->mtx);}여러 mutex를 잡는 모든 코드가 같은 순서로 잡으면 deadlock이 발생할 수 없습니다.
#측정
#Priority inheritance: mutex와 binary semaphore
Low(우선순위 1)가 lock을 잡고 20 tick의 일을 하는 동안, High(5)가 tick 2에 lock을 청하고 Med(3)가 tick 3부터 50 tick을 계산합니다. lock을 mutex와 binary semaphore로 바꿔 High가 기다린 tick을 쟀습니다.
/* pi.c: Low (prio 1) holds the lock for 20 ticks of work, High (prio 5) asks for it at tick 2, Med (prio 3) computes 50 ticks from tick 3. Lock is a mutex, or a binary semaphore with -DUSE_BINARY. */#include "FreeRTOS.h"#include "task.h"#include "semphr.h"extern void pr(const char *, ...); extern void hosted_exit(int);
static SemaphoreHandle_t lock;static void spin(TickType_t n) { /* n ticks of CPU work */ TickType_t done = 0, last = xTaskGetTickCount(); while (done < n) { TickType_t now = xTaskGetTickCount(); if (now != last) { done++; last = now; } }}
static void low(void *a) { (void)a; xSemaphoreTake(lock, portMAX_DELAY); spin(20); /* counts only ticks it ran */ xSemaphoreGive(lock); for (;;) vTaskDelay(1000);}static void med(void *a) { (void)a; vTaskDelay(3); spin(50); for (;;) vTaskDelay(1000); }static void high(void *a) { (void)a; vTaskDelay(2); TickType_t t0 = xTaskGetTickCount(); xSemaphoreTake(lock, portMAX_DELAY); pr("%s: High asked at tick %u, got it at tick %u (waited %u)\n",#ifdef USE_BINARY "binary semaphore",#else "mutex",#endif (unsigned)t0, (unsigned)xTaskGetTickCount(), (unsigned)(xTaskGetTickCount() - t0)); hosted_exit(0);}
int main(void) {#ifdef USE_BINARY lock = xSemaphoreCreateBinary(); xSemaphoreGive(lock);#else lock = xSemaphoreCreateMutex();#endif xTaskCreate(low, "L", 256, NULL, 1, NULL); xTaskCreate(med, "M", 256, NULL, 3, NULL); xTaskCreate(high, "H", 256, NULL, 5, NULL); vTaskStartScheduler(); return 0;}./build.sh pi.c && qemu-system-arm -M mps2-an385 -nographic -semihosting -icount shift=5 -kernel pi.elf./build.sh pi.c -DUSE_BINARY && qemu-system-arm ... -kernel pi.elfmutex: High asked at tick 2, got it at tick 20 (waited 18)binary semaphore: High asked at tick 2, got it at tick 70 (waited 68)mutex에서는 Low가 High의 우선순위를 물려받아 남은 18 tick을 Med보다 먼저 끝냈고, binary semaphore에서는 Med의 50 tick이 끼어 High가 68 tick을 기다렸습니다. QEMU icount의 tick이라 보드의 시간은 아니지만 두 설정의 차이는 Med의 50 tick 그대로입니다.
#Owner가 아닌 task의 give
/* nonowner.c: task A takes a mutex, task B gives it */#include "FreeRTOS.h"#include "task.h"#include "semphr.h"extern void pr(const char *, ...); extern void hosted_exit(int);static SemaphoreHandle_t m;static void a(void *p) { (void)p; xSemaphoreTake(m, portMAX_DELAY); pr("A took the mutex\n"); for (;;) vTaskDelay(1000); }static void b(void *p) { (void)p; vTaskDelay(1); pr("B gives it\n"); xSemaphoreGive(m); pr("B: give returned\n"); hosted_exit(0); }int main(void) { m = xSemaphoreCreateMutex(); xTaskCreate(a, "A", 256, NULL, 2, NULL); xTaskCreate(b, "B", 256, NULL, 1, NULL); vTaskStartScheduler(); return 0;}A took the mutexB gives itASSERT failed: tasks.c line 6755mutex give는 priority 상속을 되돌리는 xTaskPriorityDisinherit()을 거치고, 그 첫머리의 configASSERT( pxTCB == pxCurrentTCB )(tasks.c 6755행)가 give하는 task가 owner인지 검사합니다.
#자주 보는 함정
ISR에서 mutex
void IRQ(void) { xSemaphoreGiveFromISR(m, &hp); /* m is a mutex */}xSemaphoreTakeFromISR()·xSemaphoreGiveFromISR() 매크로는 있지만, semphr.h는 두 매크로 설명에 “Mutex type semaphores (those created using a call to xSemaphoreCreateMutex()) must not be used with this macro”라고 적고(562–563·655–656행), mutex 생성 함수 설명(703행)에는 “Mutex type semaphores cannot be used from within interrupt service routines”라고 적습니다. queue.c의 xQueueGiveFromISR()은 누가 쥐고 있는 mutex면 configASSERT로 멈춥니다. ISR과 task 사이 신호는 semaphore나 notification으로 합니다.
Owner가 아닌 task가 give
/* task A took it, task B gives */xSemaphoreGive(spi_mutex);위 측정처럼 configASSERT가 있으면 tasks.c 6755행에서 멈춥니다. 개발 빌드에서 configASSERT를 켜 두면 이 실수가 처음 실행에서 드러납니다.
긴 hold time
xSemaphoreTake(m, ...);printf_to_uart(big); /* slow UART output */xSemaphoreGive(m);PI가 있어도 기다리는 task는 hold time만큼 기다립니다(위 측정의 18 tick). 공유 자원 접근만 lock 안에 두고, 가공과 로깅은 밖에서 합니다.
Recursive를 기본으로
SemaphoreHandle_t m = xSemaphoreCreateRecursiveMutex(); /* 무조건 recursive */recursive mutex는 같은 task가 몇 번 잡았는지 세므로, 잡고 놓는 짝이 호출 경로마다 맞는지 따로 확인해야 합니다. 같은 task의 재진입이 실제로 필요한 경로에만 씁니다.
Timeout 없이 portMAX_DELAY 남용
xSemaphoreTake(m, portMAX_DELAY); /* 모든 곳에서 무한 대기 */deadlock이 나면 그 task는 영원히 기다리고, 기록도 남지 않습니다. timeout을 두고 넘으면 기록합니다.
#정리
- Mutex의 본질은 owner 추적입니다. 그 위에 PI, owner-only release, recursive가 얹힙니다.
- ISR은 mutex를 쓰지 않습니다. semaphore나 task notification으로 신호합니다.
- Hold time은 짧게, 가공은 lock 밖에서 합니다. PI는 중간 우선순위의 끼어들기를 막을 뿐 hold time 자체는 줄이지 않습니다.
- 여러 mutex를 잡을 때는 글로벌한 lock order 규칙을 정해 deadlock을 막습니다.
- Recursive는 마지막 수단입니다. 가능하면 비재귀로 설계합니다.
- 위 측정에서 PI는 High의 대기를 68 → 18 tick으로 줄였고, owner가 아닌 give는
configASSERT가 잡았습니다.
다음 편은 Queue 활용입니다. Producer-consumer, by-value와 by-pointer, backpressure를 다룹니다.
#관련 항목
Modern Embedded Recipes · 68 of 153 전체 목차 접기
- 1 Modern Embedded Recipes — 모던 임베디드 실전 레시피 시리즈 소개
- 2 디지털 신호 기초 — Voltage Level·Edge·Noise Margin·반사 분석
- 3 임베디드 클럭과 타이밍 — Skew·Jitter·PLL 분석
- 4 GPIO 내부 구조 분해 — Push-Pull·Open-Drain·Schmitt Trigger
- 5 UART 하드웨어 동작 분석 — Baud Rate·Framing·FIFO
- 6 SPI 하드웨어 분석 — Clock Mode·MOSI/MISO·Chip Select
- 7 I2C 하드웨어 분석 — Open-Drain·Clock Stretching·Arbitration
- 8 ADC 동작 원리 — SAR·Sigma-Delta 비교
- 9 DAC 동작 원리 — R-2R Ladder·Sigma-Delta·Settling Time
- 10 PWM 신호 생성 분석 — Duty·Frequency·Dead Time·Center-Aligned
- 11 CAN 버스 전기적 특성 — 종단·전압 레벨·GND 전위차와 1 Mbit/s 버스 길이 예산
- 12 RS-485·RS-422 차동 신호 분석 — Termination·Biasing·Topology
- 13 LVDS 차동 신호 분석 — Common-Mode·Impedance·Eye Pattern
- 14 ARM Cortex-M 시리즈 비교 — M0·M3·M4·M7·M33·M55 분석
- 15 ARM Cortex-A 시리즈 비교 — A53·A55·A72·A78·X1 분석
- 16 Cortex-M 레지스터 구조 분석 — R0~R15·xPSR·CONTROL·Mask Registers
- 17 Cortex-M4 예외 처리 — Vector Table·NVIC 우선순위·Tail-Chaining
- 18 ARM 메모리 맵 분석 — Normal·Device·Strongly-Ordered Region
- 19 Cortex-M7 캐시와 DMA — Cache Line·Write-Back·Clean/Invalidate 순서
- 20 Cortex-M4 MPU 활용 — Region 배치·Stack Guard·Task 격리
- 21 AArch64 Linux MMU 기초 — Translation Table·TLB·ASID
- 22 ARM TrustZone-M 기초 — Secure/Non-Secure·NSC·MPC
- 23 ARM Memory Barrier 실전 — DMB·DSB·ISB·DMA·MMIO
- 24 임베디드 크로스 컴파일러 분석 — GCC·Clang·Sysroot 구성
- 25 C 컴파일 4단계 — Preprocess·Compile·Assemble·Link 추적
- 26 ELF 파일 구조 분석 — Section·Segment·Symbol Table·DWARF
- 27 링커 스크립트 기초 — SECTIONS·MEMORY·entry point
- 28 링커 스크립트 고급 — Overlay·BSS·init_array·LMA/VMA
- 29 임베디드 스타트업 코드 분석 — Reset_Handler·Vector Table·SystemInit
- 30 C 런타임 crt0 분석 — Stack·BSS Zero·Data Copy·atexit
- 31 임베디드 메모리 레이아웃 — .text·.rodata·.data·.bss·.heap·.stack
- 32 임베디드 컴파일러 최적화 분석 — -O0~-O3·-Os·-LTO 비교
- 33 Map 파일 분석 — 링커가 넣은 것, 끌어온 이유, 버린 것 읽기
- 34 Make·CMake 크로스 컴파일 — Toolchain File·Sysroot·Preset
- 35 임베디드 Bootloader 체인 — BootROM·SPL·U-Boot·Kernel·Secure Boot
- 36 첫 bare-metal 프로그램 작성 — Linker·Startup·main의 최소 구성
- 37 MMIO 레지스터 직접 접근 — volatile·Memory Map·Aliasing 분석
- 38 GPIO 드라이버 직접 구현 — STM32F407을 HAL 없이 레지스터로
- 39 임베디드 클럭 설정 분석 — HSE·PLL·SYSCLK·AHB/APB 분주
- 40 Cortex-M 인터럽트 핸들링 — NVIC·Priority·Vector·EXTI
- 41 SysTick 타이머 활용 — 24-bit Counter·1ms Tick·delay 구현
- 42 UART 드라이버 구현 — polling·interrupt·DMA 3가지 방식 비교
- 43 SPI 드라이버 구현 — Master·Slave·CRC·DMA
- 44 I2C 드라이버 구현 — STM32F405/407 Master·Repeated START·Clock Stretching·Bus Recovery
- 45 임베디드 DMA 기초 — Memory-to-Memory·Peripheral·Circular Mode
- 46 저전력 모드 분석 — Sleep·Stop·Standby·Wake-up Source
- 47 STM32F405/407 IWDG·WWDG 워치독 구현 — Independent vs Window 비교
- 48 임베디드 Flash 프로그래밍 — Erase·Program·Read While Write
- 49 DDR 초기화 실패 진단 — Timing·Calibration·Walking Bit Test
- 50 PWM 출력 실전 — LED 밝기·모터 속도 제어
- 51 DC 모터 제어 — H-Bridge·PWM Duty·Encoder Feedback
- 52 스테퍼 모터 제어 — Full Step·Half Step·Microstepping
- 53 서보 모터 제어 — 50 Hz PWM·다채널·Calibration
- 54 Character LCD 제어 — HD44780·4-bit Mode·Custom Char
- 55 SPI OLED 제어 — SSD1306·Frame Buffer·Page 단위 갱신
- 56 TFT 디스플레이 구동 — ILI9341 SPI와 STM32F746 LTDC
- 57 환경 센서 활용 — BME280 온습압·SHT3x 비교
- 58 IMU 센서 활용 — MPU-6050·Data Ready·Complementary Filter
- 59 CAN 통신 구현 — bxCAN Bit Timing·Filter·Mailbox·Error 상태
- 60 USB Device 기초 — TinyUSB CDC·Descriptor·STM32F407 OTG_FS
- 61 Ethernet MAC+PHY 통합 — RMII·MDIO·lwIP Raw API
- 62 SD 카드 SPI 모드 + FatFs — 초기화·diskio 포팅·다중 블록 쓰기와 f_sync
- 63 STM32F4 RTC 활용 — Calendar·Alarm·Sub-second·Tamper·Backup Register
- 64 RTOS 도입 결정 분석 — Super Loop vs RTOS 트레이드오프
- 65 RTOS Task 설계 패턴 — 우선순위·스택·State Machine
- 66 RTOS Scheduler 동작 분석 — Tick·Context Switch·Yield
- 67 RTOS Semaphore 활용 — Binary·Counting·ISR Give
- 68 RTOS Mutex 활용 — Recursive·Priority Inheritance 적용
- 69 RTOS Queue 활용 — By-Value·By-Reference·Timeout 패턴
- 70 RTOS Event Group 활용 — Bit Wait·Sync·Notify
- 71 RTOS Software Timer 활용 — One-shot·Auto-reload·Daemon Task
- 72 ISR-Safe API 설계 — Reentrant·Atomic·Defer 패턴
- 73 Priority Inversion 진단·예방 — Mars Pathfinder Lesson 추적
- 74 Timer Wheel 분석 — Hashed·Hierarchical·O(1) Tick
- 75 RTOS 디버깅 기법 — Stack·Heap·Run-time Stats·SystemView
- 76 i.MX8M Mini EVK Linux 부팅 흐름 — BootROM에서 PID 1까지 단계별 인계
- 77 U-Boot 활용 — bootcmd·env·tftp·boot.scr 분석
- 78 Device Tree 실전 — DTS·DTB·Overlay·Phandle 추적
- 79 Device Tree Overlay 적용 — Runtime fragment·dtoverlay
- 80 임베디드 커널 빌드 — defconfig·menuconfig·Image·deb 패키지
- 81 커널 모듈 기초 — init/exit·Parameter·KBuild·modprobe
- 82 캐릭터 드라이버 작성 — file_operations·cdev·register_chrdev
- 83 Platform 드라이버 작성 — of_match·devm 해제 순서·probe 실패 판정 (Linux v6.12)
- 84 mmap 4가지 모드 — Anonymous·File·Shared·Huge Page
- 85 epoll 실전 — LT·ET·ONESHOT·EXCLUSIVE 비교
- 86 UIO·VFIO 분석 — User-Space Driver와 IOMMU 격리
- 87 sysfs·configfs 활용 — kobject 기반 User 인터페이스
- 88 IRQ Affinity 설정이 거부되거나 되돌아가는 이유 — smp_affinity·effective_affinity·isolcpus·irqbalance
- 89 루트 파일시스템 구축 — Buildroot 기초·Package·Toolchain
- 90 임베디드 동적 메모리 — malloc 위험·결정성·대안 분석
- 91 메모리 정렬과 패딩 분석 — Natural·Strict Alignment·Trap
- 92 Cache Line Alignment — alignas·Padding·SoA 적용
- 93 DMA-Friendly Allocator — dma_alloc_coherent·IOMMU·Pool
- 94 Zero-Copy Pipeline — DMA-BUF·sendfile·io_uring·splice
- 95 NUMA Memory Topology — numactl·numa_alloc·HBM 적용
- 96 SIMD 활용 분석 — Intrinsics·Auto-Vectorization·OpenMP SIMD
- 97 ARM NEON 심화 — Matrix Multiply·FFT·Image Filter 적용
- 98 임베디드 스택 분석 — high-water·overflow 탐지
- 99 임베디드 코드 크기 최적화 — -Os·LTO·Section Garbage Collection
- 100 임베디드 전력 최적화 — Sleep Mode·Clock Gating·DVFS
- 101 WCET 분석 기법 — Static·Measurement·Hybrid 방법론
- 102 Lock-Free Ring Buffer 구현 — SPSC·Power-of-2·Memory Order
- 103 Wait-Free Signaling — Atomic Flag·Sequence·Latest-Value
- 104 RCU (Read-Copy-Update) 기초 — Quiescent State·Grace Period
- 105 Hazard Pointer 분석 — Lock-Free Memory Reclamation
- 106 Compare-And-Swap 패턴 — Stack·Counter·Linked List 적용
- 107 Atomic Operation 비용 분석 — Fence·Cache Line·Contention
- 108 Spinlock vs Mutex 결정 가이드 — Context Switch·Hold Time
- 109 ABA 문제 회피 — Tagged Pointer·Hazard·Generation Counter
- 110 False Sharing 해결 — Cache Line Padding·Per-CPU·thread_local
- 111 MPMC Queue 구현 — Multi-producer Multi-consumer Lock-Free
- 112 임베디드 디버깅 마인드셋 — 가설·격리·재현·이분탐색
- 113 JTAG·SWD 안 붙을 때 — 핀·전압·속도·세션 진단
- 114 GDB 원격 디버깅 — OpenOCD·J-Link·target remote 구성
- 115 Cortex-M 하드폴트 분석 — Stacked Frame·CFSR 읽기
- 116 UART 안 찍힐 때 — Bare-metal 체크리스트
- 117 임베디드 부팅 실패 진단 — 단계별 Isolation
- 118 인터럽트 누락·중복 진단 — Priority·Pending·Re-entry 추적
- 119 메모리 오버플로우·오염 진단 — Canary·MPU·Pattern 분석
- 120 타이밍·Race 진단 — Heisenbug 잡는 법
- 121 통신 프로토콜 분석 — Logic Analyzer와 Protocol Decoder
- 122 임베디드 로깅 시스템 설계 — 레벨·버퍼·SWO·Deferred
- 123 임베디드 포스트모템 분석 — Core Dump와 Field Crash
- 124 FPGA 기초 분석 — LUT·FF·BRAM·DSP 자원 구조
- 125 Vivado 사용법 — Project·Constraint·Synth·Impl·Bitstream
- 126 PCIe BAR 매핑 분석 — Config Space·Enumeration·MMIO 접근
- 127 AXI 인터페이스 — AXI4·AXI4-Lite·AXI-Stream 비교
- 128 Zynq PS-PL 통신 — GP·HP·ACP 인터페이스 선택
- 129 Mailbox Protocol 분석 — Host와 Accelerator를 잇는 Doorbell
- 130 Command Queue·Submission Queue — NVMe·XDMA 공통 패턴
- 131 DMA Completion 메커니즘 — Interrupt·Polling·Completion Ring
- 132 PCIe Streaming 분석 — BAR Type·MSI-X·Kernel Bypass
- 133 Vitis HLS 분석 — Pragma·Pipeline II·Dataflow 실전 감각
- 134 HLS 최적화 기법 — Pipeline·Unroll·Partition·Dataflow
- 135 Vitis AI 분석 — DPU·xmodel·VART
- 136 OpenCL on FPGA — Kernel·Channel·Burst Memory 분석
- 137 Intel Quartus로 넘어가기 전 — 어느 toolchain에서나 쓰는 HDL과 testbench
- 138 Edge Inference 분석 — Cloud vs Edge·Latency·Privacy
- 139 Edge 추론 Pipeline 측정 — Stage Latency·Mailbox 정책·Buffer 수
- 140 NPU 아키텍처 분석 — Ethos·Hexagon·Systolic Array 비교
- 141 딥러닝 Quantization 분석 — PTQ·QAT·INT8·INT4·Calibration
- 142 TensorRT 분석 — ONNX→Engine·FP16·INT8·DLA·Multi-Stream
- 143 TFLite Micro 분석 — Op Resolver·Tensor Arena·Cortex-M
- 144 ONNX Runtime 분석 — Execution Provider와 Cross-Platform 배포
- 145 Edge Thermal Management — Throttling·DVFS·Fan Curve·Sustained
- 146 NVIDIA Jetson 분석 — Nano·Xavier·Orin·Thor·JetPack·DLA·VPI
- 147 Zero-Copy Camera Pipeline — V4L2·DMA-BUF·GPU Import·NPU 직결
- 148 온디바이스 LLM 추론 — llama.cpp·GGUF·MLX·KV Cache·NPU Backend
- 149 Cortex-M33 TF-M·TrustZone — Secure Firmware·PSA·MCUboot
- 150 Matter·Thread 분석 — IoT 통합 표준·Commissioning·Multi-Fabric
- 151 PCIe → CXL 진화 — 같은 PHY 위 cache-coherent 프로토콜 추가
- 152 QEMU CXL Type 3 디바이스 에뮬레이션 — 노트북에서 CXL 개발 환경 구축
- 153 Linux CXL 드라이버 분석 — cxl_pci·cxl_core·region·DAX