[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,91 +2,169 @@
|
||||
id: wiki-2026-0508-hardware-verification
|
||||
title: Hardware Verification
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-AUTO-HAVE-001]
|
||||
aliases: [Formal Verification, Chip Verification, RTL Verification]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.94
|
||||
tags: [auto-reinforced, Hardware-verification, formal-verification, simulation, vlsi, chip-design, functional-safety]
|
||||
confidence_score: 0.93
|
||||
verification_status: applied
|
||||
tags: [hardware, verification, formal-methods, eda, rtl]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: SystemVerilog
|
||||
framework: UVM/JasperGold/SymbiYosys
|
||||
---
|
||||
|
||||
# [[Hardware-Verification|Hardware-Verification]]
|
||||
# Hardware Verification
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "물질 이전의 증명: 수조 원의 천문학적 비용이 드는 칩 제조(Tape-out) 전, 설계된 논리 회로가 단 하나의 오차도 없이 의도대로 작동함을 수학적 검증과 수억 번의 시뮬레이션으로 입증하는 결벽증에 가까운 품질 보증."
|
||||
## 매 한 줄
|
||||
> **"매 silicon 의 mistake 의 cost ≫ software bug — 매 60-70% chip dev effort 가 verification"**. Pentium FDIV (1994, $475M recall) 매 watershed; modern flow 매 simulation (UVM) + formal (property checking) + emulation (Palladium/Veloce) + post-silicon validation. 매 RISC-V 의 open verification revolution (2024-26).
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
하드웨어 검증(Hardware-Verification)은 설계된 집적 회로(IC)나 시스템온칩(SoC)이 원래의 사양([[Specification|Specification]])에 맞게 올바르게 동작하는지 확인하는 과정입니다.
|
||||
## 매 핵심
|
||||
|
||||
1. **검증 방법론**:
|
||||
* **Simulation-based Verification**: 입력 벡터를 넣어보고 출력값이 예상과 맞는지 확인 (UVM 프레임워크). (Simulation와 연결)
|
||||
* **Formal Verification**: 특정 속성(Property)이 모든 가능한 입력 조합에 대해 수학적으로 참임을 증명. (Mathematical-Proof와 맥락)
|
||||
* **Emulation/FPGA [[Prototyping|Prototyping]]**: 실제 칩과 유사한 속도로 하드웨어를 구동하여 실시간 소프트웨어 테스트 병행.
|
||||
2. **왜 중요한가?**:
|
||||
* 하드웨어는 소스 코드 수정처럼 '패치'가 불가능(비용 폭증)하므로, 제조 전 완벽한 무결성 정책 확보가 생존과 직결되기 때문임. ([[Reliability|Reliability]]와 연결)
|
||||
### 매 layers
|
||||
- **Simulation** (UVM/SystemVerilog): constrained-random + coverage-driven.
|
||||
- **Formal verification**: mathematical proof of property (CDC, register, security).
|
||||
- **Emulation**: FPGA/dedicated boxes (Palladium, Veloce, ZeBu) — 매 1000× faster than sim, full SoC.
|
||||
- **Static**: linting, CDC (clock domain crossing), RDC (reset domain).
|
||||
- **Post-silicon**: bringup on actual die — bugs that escaped pre-si.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌**: 과거에는 사람이 수동으로 테스트 케이스 정책을 짰으나, 현대 정책은 제약 기반 무작위 테스트(CRV) 정책을 통해 도저히 사람이 생각할 수 없는 '코너 케이스 정책(Corner cases)'을 알고리즘이 스스로 찾아내게 함(RL Update). ([[Constraint-Satisfaction-Problems|Constraint-Satisfaction-Problems]]와 연결)
|
||||
- **정책 변화(RL Update)**: 이제는 AI 가 설계 도면(RTL) 정책을 읽고 버그가 발생할 확률이 높은 지점 정책을 미리 예측하거나, 검증용 테스트 코드를 자동으로 생성하는 'AI-Driven EDA' 시대가 열림.
|
||||
### 매 metrics
|
||||
- **Code coverage**: line/branch/toggle/FSM (necessary, not sufficient).
|
||||
- **Functional coverage**: covergroups on intent.
|
||||
- **Bug curve**: bugs/week vs time — closure when asymptote.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- Simulation, [[Reliability|Reliability]], [[Constraint-Satisfaction-Problems|Constraint-Satisfaction-Problems]], [[Quality-Control|Quality-Control]], [[Technical-Architecture|Technical-Architecture]], Standard-Operating-Procedure
|
||||
- **Key Standard**: Universal Verification Methodology (UVM).
|
||||
---
|
||||
### 매 응용
|
||||
1. CPU verification (RISC-V cores, ARM, x86).
|
||||
2. AI accelerator verification (TPU, GPU, NPU).
|
||||
3. Safety-critical (ISO 26262 ASIL-D, DO-254).
|
||||
4. Security (Spectre/Meltdown class — formal info-flow).
|
||||
5. Cryptography hardware (AES, post-quantum).
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
## 💻 패턴
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
### UVM testbench skeleton
|
||||
```systemverilog
|
||||
class my_test extends uvm_test;
|
||||
`uvm_component_utils(my_test)
|
||||
my_env env;
|
||||
function void build_phase(uvm_phase phase);
|
||||
env = my_env::type_id::create("env", this);
|
||||
endfunction
|
||||
task run_phase(uvm_phase phase);
|
||||
my_seq seq = my_seq::type_id::create("seq");
|
||||
phase.raise_objection(this);
|
||||
seq.start(env.agt.sqr);
|
||||
phase.drop_objection(this);
|
||||
endtask
|
||||
endclass
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### SystemVerilog Assertion (SVA)
|
||||
```systemverilog
|
||||
property req_ack;
|
||||
@(posedge clk) disable iff (rst)
|
||||
req |-> ##[1:5] ack;
|
||||
endproperty
|
||||
assert property (req_ack) else $error("ack timeout");
|
||||
cover property (req_ack);
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Formal property (Jasper / SymbiYosys)
|
||||
```systemverilog
|
||||
// Prove: FIFO never overflows
|
||||
property no_overflow;
|
||||
@(posedge clk) (count == DEPTH) |-> !push;
|
||||
endproperty
|
||||
assert property (no_overflow);
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Constrained random
|
||||
```systemverilog
|
||||
class transaction;
|
||||
rand bit [31:0] addr;
|
||||
rand bit [31:0] data;
|
||||
constraint c_align { addr[1:0] == 0; }
|
||||
constraint c_range { addr inside {[32'h1000:32'h2000]}; }
|
||||
endclass
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### Coverage closure
|
||||
```systemverilog
|
||||
covergroup cg @(posedge clk);
|
||||
cp_addr: coverpoint addr {
|
||||
bins low = {[0:32'h0FFF]};
|
||||
bins mid = {[32'h1000:32'hEFFF]};
|
||||
bins high = {[32'hF000:$]};
|
||||
}
|
||||
cp_kind: coverpoint kind { bins all[] = {READ, WRITE, ATOMIC}; }
|
||||
cross cp_addr, cp_kind;
|
||||
endgroup
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### Open-source flow (SymbiYosys + Yosys)
|
||||
```bash
|
||||
# .sby file
|
||||
[options]
|
||||
mode prove
|
||||
depth 20
|
||||
[engines]
|
||||
smtbmc z3
|
||||
[script]
|
||||
read -formal design.sv
|
||||
prep -top top
|
||||
[files]
|
||||
design.sv
|
||||
sby -f design.sby
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### CDC check (Spyglass-style)
|
||||
```tcl
|
||||
read_verilog design.sv
|
||||
set_top top
|
||||
analyze cdc
|
||||
report cdc -severity error
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Control logic correctness | Formal (full proof) |
|
||||
| Datapath / large bugs | UVM constrained-random |
|
||||
| Full SoC software boot | Emulation |
|
||||
| Post-RTL freeze | Gate-level sim + FV |
|
||||
| Security properties | Formal info-flow (Coq/Sail) |
|
||||
| Performance | Hybrid emulation + RTL profiling |
|
||||
|
||||
**기본값**: UVM for blocks + formal for control + emulation for system.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Formal-Methods]] · [[VLSI-Design]]
|
||||
- 변형: [[Simulation-Based-Verification]] · [[Formal-Verification]] · [[Emulation]]
|
||||
- 응용: [[RISC-V-Verification]] · [[AI-Accelerator-Verification]] · [[ISO-26262]]
|
||||
- Adjacent: [[Model-Checking]] · [[Theorem-Proving]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: SVA generation from spec text, UVM boilerplate scaffold, coverage closure analysis, debugging waveform descriptions.
|
||||
**언제 X**: signing off tapeout (need human + tool sign-off), safety-critical sole reviewer, novel formal proofs (need expert).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Coverage = correctness**: 100% code coverage 매 buggy chips ship 의 still.
|
||||
- **No assertions**: bugs only at testbench checker → late detection.
|
||||
- **Re-running same seed**: random ineffective without seed sweep.
|
||||
- **Skipping CDC**: silicon metastability bugs 매 hardest to debug.
|
||||
- **Late formal**: starting formal at end of project — embed early on critical blocks.
|
||||
- **No regression triage**: failing tests left "to investigate" rot.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Accellera UVM 1.2/2020 LRM, Cadence/Synopsys/Siemens EDA whitepapers, Pentium FDIV postmortem, RISC-V International verification WG 2024-25).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — UVM/SVA/formal/CDC patterns |
|
||||
|
||||
Reference in New Issue
Block a user