算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
build-sequential-circuit【设计与创意】Build sequential (stateful) logic circuits including latches, flip-flops, registers, counters, and finite state machines. Covers SR latch, D and JK flip-flops, binary/BCD/ring counters, and Mealy/Moore FSM design with clock signal and timing analysis. Use when a circuit must remember past inputs, count events, or implement a state-dependent control s…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
設序路—識記與態類、建態圖與轉表、導所擇 FF 類之激方、以 FF 與組合邏輯於門級施、以時圖析與態序模驗正。
定路當記何與需幾異態:
## State Requirements
- **Number of states**: [N]
- **State encoding**: [binary / one-hot / Gray]
- **Flip-flops needed**: [count and type]
- **Machine type**: [Mealy / Moore]
- **Inputs**: [list with descriptions]
- **Outputs**: [list with descriptions]
- **Reset behavior**: [synchronous / asynchronous / none]
得: 全態錄附所擇編、所擇 FF 類、機分為 Mealy 或 Moore。
敗: 規中態計不明→循諸入序至路記深以列態。計過實限(手設過 16 態)→宜分為小互 FSM。
以態圖與等表正路行:
## State Transition Table
| Present State | Input | Next State | Output |
|--------------|-------|------------|--------|
| S0 | 0 | S0 | 0 |
| S0 | 1 | S1 | 0 |
| S1 | 0 | S0 | 0 |
| S1 | 1 | S2 | 0 |
| ... | ... | ... | ... |
- **Unreachable states**: [list, or "none"]
- **Equivalent state pairs**: [list, or "none"]
得: 全轉表涵每當態/入組,諸態自初可達。
敗: 轉表條缺→規不全。返需而解模糊。不可達態存→或加轉以達,或除而減態編。
自轉表算 FF 入方(激方):
## Excitation Equations
- **Flip-flop type**: [D / JK / T]
- **State encoding**: [binary assignment table]
| Flip-Flop | Excitation Equation |
|-----------|------------------------------|
| Q1 | D1 = [minimized expression] |
| Q0 | D0 = [minimized expression] |
## Output Equations
| Output | Equation |
|--------|------------------------------|
| Y | [minimized expression] |
得: 每 FF 之小化激方與每主出之出方,諸 don't-care 已用。
敗: 激方似過繁→重思態編。異編(如自二進換 one-hot,或重賦態碼)可顯簡組合邏輯。試至少兩編而較字計。
自 FF 與組合門建全路:
## Circuit Implementation
- **Flip-flops**: [count] x [type], [edge type]-triggered
- **Combinational gates for excitation**: [count and types]
- **Combinational gates for output**: [count and types]
- **Total gate count**: [flip-flops + combinational gates]
- **Reset mechanism**: [asynchronous CLR / synchronous mux / none]
得: 全門級網表附 FF、激邏、出邏、時布、重置,每號有且唯有一驅。
敗: 施有 FF 外之回饋→組合迴現。同步序路諸回饋必經 FF。循犯路而改經寄。
證路跨諸時週正行:
## Timing Verification
| Cycle | Clock | Input | Present State | Next State | Output |
|-------|-------|-------|---------------|------------|--------|
| 0 | rst | - | - | S0 | 0 |
| 1 | rise | 1 | S0 | S1 | 0 |
| 2 | rise | 1 | S1 | S2 | 0 |
| ... | ... | ... | ... | ... | ... |
- **All transitions match state diagram**: [Yes / No]
- **Setup/hold violations**: [None / list]
- **Reset verified**: [Yes / No]
得: 時圖每週合轉表,出每週正,無時違。
敗: 態轉誤→循其當態/入組之激邏。出誤而轉正→誤於出邏。路入意外態→察重置未全或未用態碼缺轉。
design-logic-circuit — 設組合激與出邏塊simulate-cpu-architecture — CPU 資路用序塊(寄、計、控 FSM)model-markov-chain — FSM 與離時馬氏鏈共正框