算法艺术创作
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 快照 · 自动分类 · 以原作者文档为准
設時序(有態)之邏路,含 latch、flip-flop、register、counter、有限態機。識所須之記與態類,作態圖與轉表,導所擇 flip-flop 之激式,以 flip-flop 與組合邏於門級施,驗以時序圖與態序模。
定路須記何、須異態幾何:
## 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]
得: 全態表,附所擇編、所擇 flip-flop 類、Mealy 或 Moore 之類。
敗則: 若規中態數不明,以入序(至路記深)追之而列諸態。若數逾實用限(手設逾十六態),考分為小交 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"]
得: 全轉表,涵諸現態/入合,諸態皆自初可達。
敗則: 若轉表缺條,規不全。返需求解模糊。若有不達者,加轉以達或刪而減編。
自轉表算 flip-flop 之入式(激式):
## 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] |
得: 各 flip-flop 與各主出之減激式,諸 don't-care 已用。
敗則: 若激式過繁,重考態編。異編(如由二進轉 one-hot,或重分態碼)可大簡組邏。試至少二編而較字數。
自 flip-flop 與組邏門建全路:
## 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]
得: 全門級網表,含 flip-flop、激邏、出邏、脈分、重置機,各信號一驅。
敗則: 若施有 flip-flop 外之反饋,組合環已入。同步時序之諸反饋必經 flip-flop。追犯徑,重路經 register。
證路於諸脈週正行:
## 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 資料徑用時序塊(register、counter、控 FSM)model-markov-chain -- 有限態機與離散時 Markov 鏈共形式框