design-logic-circuit
정보
이 Claude Skill은 기능적 명세나 진리표로부터 게이트 수준 조합 논리 회로를 설계합니다. 기본 게이트를 사용하여 회로를 구현하고, NAND/NOR 범용 변환을 처리하며, 가산기와 멀티플렉서 같은 표준 구성 요소를 구축합니다. 부울 논리를 검증되고 하드웨어로 구현 가능한 네트워크로 변환하는 데 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/design-logic-circuitClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Design Logic Circuit
Spec → combinational circuit. Define I/O, derive min Bool expr, map → gate schematic, (optional) convert to universal gate basis (NAND/NOR), verify via exhaustive sim.
Use When
- Bool fn → gate net (physical or sim)
- Std combinational blocks (adders, muxes, decoders, comparators)
- Convert arbitrary → NAND-only / NOR-only for mfg
- Teach/review digital logic spec → schematic
- Prep combinational datapath for build-sequential-circuit or simulate-cpu-architecture
In
- Required: Spec — truth table, Bool expr, verbal I/O desc, or std block name (e.g., "4-bit ripple-carry adder")
- Required: Target gate lib — unrestricted (AND/OR/NOT), NAND-only, NOR-only, or std cell lib
- Optional: Optimize goal — min gate count, min prop delay (critical path), min fan-out
- Optional: Max fan-in (e.g., 2-input only)
- Optional: Don't-cares
Do
Step 1: Spec
Interface + behavior before synthesis:
- Inputs: Names, widths, ranges. Multi-bit → bit order (MSB/LSB-first).
- Outputs: Names + widths.
- Truth table: Every input combo → outputs. Many inputs → algebraic or minterms/maxterms.
- Don't-cares: Input combos that can't occur (BCD 1010-1111) → mark.
- Timing: Prop delay constraints. Combinational = no clock → worst-case gate delay through critical path.
## Circuit Specification
- **Name**: [descriptive name]
- **Inputs**: [list with bit widths]
- **Outputs**: [list with bit widths]
- **Function**: [verbal description]
- **Truth table or minterm list**: [table or Sigma notation]
- **Don't-care set**: [d(...) or "none"]
→ Unambiguous spec, every legal input → exactly one output.
If err: Ambiguous (missing cases, conflicting outputs) → clarify. Don't assume don't-care unless told.
Step 2: Derive min Bool expr
evaluate-boolean-expression skill:
- Single-output: Each bit → min SOP (or POS, whichever fewer gates).
- Multi-output: Shared sub-exprs → factor out. Fewer gates + more routing.
- XOR detection: Checkerboard patterns in K-map. XOR expensive in NAND/NOR-only, efficient in std libs.
- Record: Min expr each output + literal count + term count.
## Minimal Expressions
| Output | Minimal SOP | Literals | Terms |
|--------|-------------|----------|-------|
| F1 | [expression] | [count] | [count] |
| F2 | [expression] | [count] | [count] |
- **Shared sub-expressions**: [list, if any]
→ Min expr each output + shared sub-exprs ID'd.
If err: Non-minimal (more literals than expected) → re-run K-map or Quine-McCluskey. >6 vars → Espresso.
Step 3: Map → gate schematic
Bool → gate network:
- Direct SOP: Product term → multi-input AND. Sum → OR fed by ANDs. Complemented var → NOT (or use NAND/NOR to absorb).
- Gate assignment: Each gate:
- Type (AND, OR, NOT, XOR, NAND, NOR)
- Inputs (name or from other gate)
- Output name
- Fan-in
- Fan-in decomp: Exceeds max → tree of smaller. 4-input AND w/ 2-input → 2 two-input ANDs feeding 3rd.
- Notation: Text netlist or structured.
## Gate-Level Netlist
| Gate ID | Type | Inputs | Output | Fan-in |
|---------|------|-------------|--------|--------|
| G1 | NOT | A | A' | 1 |
| G2 | AND | A', B | w1 | 2 |
| G3 | AND | A, C | w2 | 2 |
| G4 | OR | w1, w2 | F | 2 |
- **Total gates**: [count]
- **Critical path depth**: [number of gate levels from input to output]
→ Complete netlist, every output traceable to primary inputs, no floating.
If err: Dangling wires or feedback loops (invalid combinational) → recheck. Every signal = exactly one driver, every gate input connects.
Step 4: Convert → universal basis (optional)
NAND-only or NOR-only:
- NAND-only:
- AND → NAND + NOT (NAND tied inputs)
- OR → De Morgan:
A + B = ((A')*(B'))' = NAND(A', B')→ NOTs then NAND - NOT →
A' = NAND(A, A) - Bubble pushing: Cancel adjacent inversions. 2 NOTs series cancel. NAND → NOT = AND.
- NOR-only:
- OR → NOR + NOT
- AND → De Morgan:
A * B = ((A')+(B'))' = NOR(A', B') - NOT →
NOR(A, A) - Bubble push cancels inversions.
- Gate count: Before + after. NAND/NOR-only typ more gates but simplify mfg.
## Universal Gate Conversion
- **Target basis**: [NAND-only / NOR-only]
- **Gates before conversion**: [count]
- **Gates after conversion**: [count]
- **Gates after bubble-push optimization**: [count]
- **Conversion netlist**: [updated table]
→ Functionally equiv, redundant inversions eliminated via bubble push.
If err: More inversions than expected → re-examine bubble push. Common: forgetting NAND/NOR self-dual under complementation. De Morgan consistently from outputs back → inputs.
Step 5: Verify via exhaustive sim
Correct for every input:
- Approach: ≤16 inputs (65,536 combos) → exhaustive. Larger → targeted vectors + corner cases + random.
- Propagate: Each combo, propagate gate by gate in topological order.
- Compare: Check each output vs truth table. Don't-cares → 0 or 1.
- Record: Mismatches w/ input + expected vs actual.
- Timing (optional): Count gate levels longest path. × per-gate delay → worst-case prop.
## Simulation Results
- **Total test vectors**: [count]
- **Vectors passed**: [count]
- **Vectors failed**: [count, with details if any]
- **Critical path**: [gate sequence, e.g., G1 -> G3 -> G7 -> G9]
- **Critical path depth**: [N gate levels]
- **Estimated worst-case delay**: [N * gate_delay]
→ All vectors pass. Functional + critical path docs.
If err: Vector fails → trace path gate by gate. First gate w/ incorrect output. Common: wire wrong input, missing inversion, NAND/NOR conversion err.
Check
- All I/O named + widths spec'd
- Truth table covers all legal combos
- Bool exprs min (K-map/Quine-McCluskey)
- Every gate all inputs connected + exactly one output
- No combinational feedback
- Fan-in constraints respected
- NAND/NOR conversion preserves equivalence
- Bubble push eliminates redundant inversions
- Exhaustive sim passes (non-don't-cares)
- Critical path depth docs
Traps
- Combinational feedback: Output → own input chain = latch, not combinational. State needed → build-sequential-circuit.
- Forget inversions in NAND/NOR: Most common err = dropping NOT in De Morgan. Bubble push systematically outputs → inputs, not ad hoc.
- Exceed fan-in w/o decomp: 5-input AND not in 2-input lib. Balanced tree min delay, not linear chain.
- Ignore don't-cares: Unexploited → bigger circuit. Always include when avail.
- Gate vs wire delay: Intro design → gate delay dominates. Real VLSI → wire delay can exceed. Note when estimating.
- Multi-output hazards: Shared gates → change one affects shared sub-expr. Verify all outputs after any mod.
→
evaluate-boolean-expression— derive min Bool expr for this skillbuild-sequential-circuit— add state (flip-flops) → sequentialsimulate-cpu-architecture— use blocks (ALU, mux, decoder) as datapath
GitHub 저장소
연관 스킬
content-collections
메타이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
polymarket
메타이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
creating-opencode-plugins
메타이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
sglang
메타SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
