[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73C6SR2YD27ZNWP2ADAC038":3,"skill-same:01M73C6SR2YD27ZNWP2ADAC038":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73C6SR2YD27ZNWP2ADAC038","simulate-cpu-architecture",null,"Design and simulate a minimal CPU from scratch: define an instruction set architecture (ISA), build the datapath (ALU, register file, program counter, memory interface), design the control unit (hardwired or microprogrammed), implement the fetch-decode-execute cycle, and verify by tracing a small program clock cycle by clock cycle. The capstone \"computer inside a computer\" exercise that composes combinational and sequential building blocks into a complete processor.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsimulate-cpu-architecture\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: simulate-cpu-architecture\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-05-03\"\ndescription: >\n  Design and simulate a minimal CPU from scratch: define an instruction set\n  architecture (ISA), build the datapath (ALU, register file, program counter,\n  memory interface), design the control unit (hardwired or microprogrammed),\n  implement the fetch-decode-execute cycle, and verify by tracing a small\n  program clock cycle by clock cycle. The capstone \"computer inside a computer\"\n  exercise that composes combinational and sequential building blocks into a\n  complete processor.\nlicense: MIT\nallowed-tools: Read Grep Glob WebFetch WebSearch\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: digital-logic\n  complexity: advanced\n  language: multi\n  tags: digital-logic, cpu-architecture, instruction-set, datapath, fetch-decode-execute\n---\n\n# Simulate CPU Architecture\n\nDesign a minimal but complete CPU by defining an instruction set architecture, composing an ALU and register file into a datapath, designing a control unit that generates the correct signals for each instruction phase, implementing the fetch-decode-execute cycle, simulating a small program to completion, and verifying every clock cycle against expected register and memory state.\n\n## When to Use\n\n- Learning or teaching computer architecture from first principles\n- Designing a custom processor for an FPGA or educational simulator\n- Verifying understanding of how instructions execute at the gate and register-transfer level\n- Building a software simulation (Python, JavaScript, or structured walkthrough) of a CPU\n- Composing the combinational blocks from design-logic-circuit and the sequential blocks from build-sequential-circuit into a working system\n\n## Inputs\n\n- **Required**: Processor complexity target -- 4-bit, 8-bit, or 16-bit data width; number of general-purpose registers (2-16)\n- **Required**: Minimum instruction set -- at least: load, store, add, subtract, bitwise AND\u002FOR, branch, halt\n- **Optional**: Addressing modes beyond direct (immediate, register-indirect, indexed)\n- **Optional**: Additional instructions (multiply, shift, compare, jump-and-link for subroutines)\n- **Optional**: Memory size and word size\n- **Optional**: Pipeline stages (single-cycle, multi-cycle, or pipelined) -- default is multi-cycle\n- **Optional**: Implementation medium -- software simulation (Python\u002FJS), HDL (Verilog\u002FVHDL), or paper walkthrough\n\n## Procedure\n\n### Step 1: Define the Instruction Set Architecture\n\nSpecify everything a programmer needs to know to write machine code for this CPU:\n\n1. **Data width**: Choose the bit width for data (ALU operand size) and addresses. Common choices: 8-bit data \u002F 8-bit address (256 bytes addressable), 16-bit data \u002F 16-bit address.\n2. **Register file**: Define the number of general-purpose registers and any special-purpose registers.\n   - **General-purpose**: R0-R(N-1). Decide if R0 is hardwired to zero (simplifies instruction encoding).\n   - **Special-purpose**: Program Counter (PC), Instruction Register (IR), Status\u002FFlags register (Zero, Carry, Negative, Overflow).\n3. **Instruction format**: Design a fixed-width instruction word. Divide the bits into fields:\n   - **Opcode**: Identifies the operation. With K bits, support up to 2^K instructions.\n   - **Register fields**: Source and destination register addresses. With N registers, each field needs ceil(log2(N)) bits.\n   - **Immediate\u002Foffset field**: For constants or branch offsets. Use remaining bits.\n4. **Instruction catalog**: Define each instruction with its mnemonic, opcode encoding, operand fields, operation (in RTL notation), and affected flags.\n5. **Addressing modes**: Define how operands are located.\n   - **Register**: Operand is in a register.\n   - **Immediate**: Operand is embedded in the instruction.\n   - **Direct**: Operand address is in the instruction.\n   - **Register-indirect**: Operand address is in a register.\n\n```markdown\n## ISA Specification\n- **Data width**: [N] bits\n- **Address width**: [M] bits\n- **Registers**: [count] general-purpose + [list of special-purpose]\n- **Instruction width**: [W] bits\n\n### Instruction Format\n| Field    | Bits      | Width |\n|----------|-----------|-------|\n| Opcode   | [W-1:X]  | [n]   |\n| Rd       | [X-1:Y]  | [n]   |\n| Rs       | [Y-1:Z]  | [n]   |\n| Imm      | [Z-1:0]  | [n]   |\n\n### Instruction Catalog\n| Mnemonic | Opcode | Format    | RTL Operation          | Flags |\n|----------|--------|-----------|------------------------|-------|\n| LOAD     | 0000   | Rd, [addr]| Rd \u003C- MEM[addr]       | -     |\n| STORE    | 0001   | Rs, [addr]| MEM[addr] \u003C- Rs       | -     |\n| ADD      | 0010   | Rd, Rs    | Rd \u003C- Rd + Rs         | Z,C,N |\n| ...      | ...    | ...       | ...                    | ...   |\n| HALT     | 1111   | -         | Stop execution         | -     |\n```\n\n**Got:** A complete ISA specification where every instruction has a unique opcode, well-defined operand fields, an unambiguous RTL description, and documented flag effects. The instruction encoding must be decodable without ambiguity.\n\n**If fail:** If the instruction word is too narrow to encode all needed fields, either widen the instruction, reduce the register count, use variable-length instructions (more complex decoding), or split instructions into sub-operations. If opcodes collide, reassign the encoding.\n\n### Step 2: Design the Datapath\n\nBuild the register-transfer level hardware that moves and transforms data:\n\n1. **ALU**: Design using the design-logic-circuit skill. The ALU takes two N-bit operands and an operation select signal, and produces an N-bit result plus flag outputs (Zero, Carry, Negative, Overflow).\n   - Operations: ADD, SUB (via 2's complement add), AND, OR, XOR, NOT, SHIFT LEFT, SHIFT RIGHT, PASS-THROUGH (for moves and loads).\n   - The ALU select width must accommodate all required operations.\n2. **Register file**: Design using build-sequential-circuit. A bank of registers with:\n   - Two read ports (source A, source B) -- combinational read with register address as input.\n   - One write port (destination) -- clocked write enabled by a RegWrite control signal.\n   - If R0 is hardwired to zero, override writes to R0.\n3. **Program Counter (PC)**: An N-bit register with:\n   - Increment logic (PC + instruction_width\u002F8 for the next sequential instruction).\n   - Load input for branch\u002Fjump targets.\n   - Multiplexer selecting between increment and branch target, controlled by a PCsrc signal.\n4. **Memory interface**: Separate or unified instruction and data memory.\n   - **Harvard architecture**: Separate instruction memory (read-only during execution) and data memory (read-write). Simpler, allows simultaneous fetch and data access.\n   - **Von Neumann architecture**: Single shared memory for instructions and data. Requires sequencing fetch and data access in different cycles.\n5. **Interconnect**: Multiplexers and buses connecting the components:\n   - ALU input A mux: register read port A or PC (for PC-relative addressing).\n   - ALU input B mux: register read port B or sign-extended immediate.\n   - Register write data mux: ALU result or memory read data (for loads).\n   - Memory address mux: PC (for instruction fetch) or ALU result (for load\u002Fstore).\n\n```markdown\n## Datapath Components\n| Component       | Width  | Ports \u002F Signals                    |\n|----------------|--------|------------------------------------|\n| ALU            | [N]-bit| OpA, OpB, ALUop -> Result, Flags  |\n| Register File  | [N]-bit| RdAddrA, RdAddrB, WrAddr, WrData, RegWrite -> RdDataA, RdDataB |\n| PC             | [M]-bit| PCnext, PCwrite -> PCout           |\n| Instruction Mem| [W]-bit| Addr -> Instruction                |\n| Data Memory    | [N]-bit| Addr, WrData, MemRead, MemWrite -> RdData |\n\n## Datapath Multiplexers\n| Mux Name     | Inputs               | Select Signal | Output      |\n|-------------|----------------------|---------------|-------------|\n| ALU_B_mux   | RegDataB, Immediate  | ALUsrc        | ALU OpB     |\n| WrData_mux  | ALU Result, MemData  | MemToReg      | Reg WrData  |\n| PC_mux      | PC+1, BranchTarget   | PCsrc         | PC next     |\n```\n\n**Got:** A complete datapath diagram (as a component table and mux table) where every instruction in the ISA has a viable path for its data to flow from source to destination through the ALU, register file, and memory.\n\n**If fail:** If an instruction cannot be executed with the current datapath (e.g., no path from memory to a register for LOAD), add the missing multiplexer or data path. Walk through each instruction's RTL operation and trace the required signal flow through the datapath.\n\n### Step 3: Design the Control Unit\n\nBuild the logic that orchestrates the datapath for each instruction:\n\n1. **Identify control signals**: List every multiplexer select, register write enable, memory read\u002Fwrite enable, and ALU operation select signal in the datapath.\n2. **Single-cycle control** (simplest): A purely combinational control unit that derives all control signals from the opcode field of the current instruction in one clock cycle.\n3. **Multi-cycle control** (recommended for learning): A finite state machine (designed using build-sequential-circuit) that breaks each instruction into phases:\n   - **Fetch**: Read instruction from memory at PC address; store in IR; increment PC.\n   - **Decode**: Read register file using fields from IR; sign-extend the immediate field.\n   - **Execute**: Perform the ALU operation or compute the memory address.\n   - **Memory access** (load\u002Fstore only): Read from or write to data memory.\n   - **Write-back**: Write the result to the destination register.\n4. **Control signal table**: For each instruction and each phase, specify the value of every control signal.\n5. **Hardwired vs. microprogrammed**:\n   - **Hardwired**: The control FSM is built from gates and flip-flops. Faster, less flexible.\n   - **Microprogrammed**: A microinstruction ROM stores the control signals for each state. Each microinstruction contains the control signal values plus a next-state field. Slower, but easy to modify.\n\n```markdown\n## Control Signals\n| Signal     | Width | Function                              |\n|-----------|-------|---------------------------------------|\n| ALUop     | [k]   | Selects ALU operation                 |\n| ALUsrc    | 1     | 0=register, 1=immediate for ALU B    |\n| RegWrite  | 1     | Enable register file write            |\n| MemRead   | 1     | Enable data memory read               |\n| MemWrite  | 1     | Enable data memory write              |\n| MemToReg  | 1     | 0=ALU result, 1=memory data to register |\n| PCsrc     | 1     | 0=PC+1, 1=branch target              |\n| IRwrite   | 1     | Enable instruction register load      |\n\n## Multi-Cycle Control FSM\n| State   | Active Signals                          | Next State         |\n|---------|----------------------------------------|-------------------|\n| FETCH   | MemRead, IRwrite, PC \u003C- PC+1           | DECODE             |\n| DECODE  | Read registers, sign-extend immediate   | EXECUTE            |\n| EXECUTE | ALUop=[per instruction], ALUsrc=[...]  | MEM_ACCESS or WB   |\n| MEM_ACC | MemRead or MemWrite                    | WRITE_BACK         |\n| WB      | RegWrite, MemToReg=[...]               | FETCH              |\n```\n\n**Got:** A control unit (combinational or FSM) that generates the correct control signal values for every instruction at every phase, with no conflicting signals (e.g., MemRead and MemWrite both active simultaneously on the same memory).\n\n**If fail:** If a control signal conflict exists, the phases are not properly separated. Ensure that load and store instructions access memory in different phases or that the memory interface supports simultaneous read and write on separate ports. If the FSM has too many states, check whether some instructions share phases and can be merged.\n\n### Step 4: Implement the Fetch-Decode-Execute Cycle\n\nConnect the datapath and control unit into a working processor:\n\n1. **Clock distribution**: Connect the system clock to all flip-flops (PC, IR, register file, control FSM state register). All state updates happen on the same clock edge.\n2. **Phase sequencing**: Wire the control FSM outputs to the datapath control signals. The FSM advances one state per clock cycle, driving the datapath through Fetch -> Decode -> Execute -> Memory -> Write-back.\n3. **Instruction fetch**: In the FETCH phase, the PC drives the instruction memory address bus. The fetched instruction loads into IR. The PC increments by one instruction width.\n4. **Instruction decode**: In the DECODE phase, the opcode field of IR drives the control unit to determine the instruction type. Register addresses from IR drive the register file read ports.\n5. **Execute and beyond**: The remaining phases depend on the instruction type:\n   - **ALU instructions**: Execute (ALU computes), Write-back (result to register).\n   - **Load**: Execute (ALU computes address), Memory (read data memory), Write-back (data to register).\n   - **Store**: Execute (ALU computes address), Memory (write data memory).\n   - **Branch**: Execute (ALU compares or checks flags), conditionally update PC.\n   - **Halt**: FSM enters a terminal state and stops advancing.\n6. **Interrupt and exception handling** (optional): Add a mechanism to save PC and jump to a handler address. This requires additional control states and a cause register.\n\n```markdown\n## Cycle Execution Summary\n| Instruction Type | Phases                          | Cycles |\n|-----------------|--------------------------------|--------|\n| ALU (reg-reg)   | Fetch, Decode, Execute, WB     | 4      |\n| Load            | Fetch, Decode, Execute, Mem, WB| 5      |\n| Store           | Fetch, Decode, Execute, Mem    | 4      |\n| Branch (taken)  | Fetch, Decode, Execute         | 3      |\n| Branch (not taken)| Fetch, Decode, Execute       | 3      |\n| Halt            | Fetch, Decode                  | 2      |\n```\n\n**Got:** A fully connected processor where the control FSM drives the datapath through the correct sequence of phases for each instruction type, and all state transitions occur synchronously on the clock edge.\n\n**If fail:** If the processor hangs (never reaches HALT) or produces incorrect results, the most likely cause is a control signal error in one specific phase. Use Step 5's cycle-by-cycle trace to isolate the failing cycle. If the PC does not increment correctly, check the FETCH phase wiring. If the wrong register is written, check the register address field extraction from IR.\n\n### Step 5: Simulate a Small Program and Verify\n\nExecute a concrete program and verify every clock cycle against expected state:\n\n1. **Write a test program**: Choose a program small enough to trace completely (5-15 instructions) but complex enough to exercise multiple instruction types. Fibonacci sequence computation is ideal: it uses load-immediate, add, branch, and halt.\n2. **Initialize state**: Set all registers to 0. Load the program into instruction memory starting at address 0. Set PC = 0. Set the control FSM to the FETCH state.\n3. **Cycle-by-cycle trace**: For each clock cycle, record:\n   - Control FSM state and phase name\n   - PC value and instruction being fetched\u002Fexecuted\n   - ALU inputs, operation, and result\n   - Register file reads and writes\n   - Memory reads and writes\n   - Flag register values\n   - All control signal values\n4. **Verify against hand computation**: Independently compute the expected register and memory state after each instruction completes (not each cycle -- each instruction takes multiple cycles). Compare the simulation trace against these expected snapshots.\n5. **Edge cases**: Verify behavior for:\n   - Branch not taken (PC increments normally)\n   - Branch taken (PC loads branch target)\n   - Load followed immediately by use of loaded register (checks if write-back completes before next decode reads)\n   - Writing to R0 if hardwired to zero (write should have no effect)\n   - HALT instruction (processor stops cleanly)\n\n```markdown\n## Test Program: Fibonacci (first 8 terms)\n| Addr | Instruction    | Mnemonic         | Comment              |\n|------|---------------|------------------|----------------------|\n| 0x00 | [encoding]    | LOAD R1, #1      | R1 = 1 (F1)         |\n| 0x01 | [encoding]    | LOAD R2, #1      | R2 = 1 (F2)         |\n| 0x02 | [encoding]    | LOAD R3, #6      | R3 = 6 (loop count) |\n| 0x03 | [encoding]    | ADD R4, R1, R2   | R4 = R1 + R2        |\n| 0x04 | [encoding]    | MOV R1, R2       | R1 = R2              |\n| 0x05 | [encoding]    | MOV R2, R4       | R2 = R4              |\n| 0x06 | [encoding]    | SUB R3, R3, #1   | R3 = R3 - 1         |\n| 0x07 | [encoding]    | BNZ 0x03         | Branch if R3 != 0   |\n| 0x08 | [encoding]    | HALT             | Stop                 |\n\n## Cycle-by-Cycle Trace (excerpt)\n| Cycle | Phase   | PC  | IR       | ALU Op   | Result | RegWrite | Flags |\n|-------|---------|-----|----------|----------|--------|----------|-------|\n| 1     | FETCH   | 0x00| LOAD R1,1| -        | -      | No       | -     |\n| 2     | DECODE  | 0x01| LOAD R1,1| -        | -      | No       | -     |\n| 3     | EXECUTE | 0x01| LOAD R1,1| PASS #1  | 1      | No       | -     |\n| 4     | WB      | 0x01| LOAD R1,1| -        | -      | R1 \u003C- 1  | -     |\n| ...   | ...     | ... | ...      | ...      | ...    | ...      | ...   |\n\n## Expected Final State\n| Register | Value | Description         |\n|----------|-------|---------------------|\n| R1       | [val] | Second-to-last Fib  |\n| R2       | [val] | Last computed Fib   |\n| R3       | 0     | Loop counter done   |\n| R4       | [val] | Same as R2          |\n| PC       | 0x09  | One past HALT       |\n```\n\n**Got:** The cycle-by-cycle trace matches the expected final state. Every instruction produces the correct register and memory updates. The program terminates at HALT with the correct Fibonacci values in registers.\n\n**If fail:** Compare the first divergence between expected and actual state. Common causes: (1) ALU operation select is wrong for one instruction type -- check the control signal table. (2) Branch offset calculation is off by one -- verify whether branches are PC-relative from the current or next instruction address. (3) Write-back writes to the wrong register -- check the register address field extraction. (4) Flags not updated correctly -- trace the ALU flag logic for the specific operands that cause the mismatch.\n\n## Validation\n\n- [ ] ISA has at least load, store, add, subtract, AND, OR, branch, and halt instructions\n- [ ] Every instruction has a unique opcode and unambiguous encoding\n- [ ] Datapath provides a valid signal path for every instruction's RTL operation\n- [ ] ALU supports all required operations with correct flag generation\n- [ ] Register file has sufficient read and write ports for the instruction format\n- [ ] Control unit generates correct signals for every instruction at every phase\n- [ ] No control signal conflicts (e.g., simultaneous read and write to the same memory port)\n- [ ] Fetch-decode-execute cycle is fully connected and clocked\n- [ ] Test program executes to completion with correct final state\n- [ ] Cycle-by-cycle trace is verified against hand computation\n- [ ] Branch taken and not-taken cases are both verified\n- [ ] HALT instruction stops execution cleanly\n\n## Pitfalls\n\n- **Branch offset off-by-one**: Branches may be relative to the current PC, PC+1, or the instruction after the branch. Define the convention in the ISA and implement it consistently. Off-by-one errors in branch targets are the single most common CPU design bug.\n- **Write-back\u002Fdecode hazard in multi-cycle**: If instruction I writes a register in its write-back phase at the same time instruction I+1 reads that register in its decode phase, the read may get the old value. In a multi-cycle CPU (one instruction at a time), this is not an issue. In a pipelined CPU, this requires forwarding or stalling.\n- **Forgetting to increment PC during fetch**: If PC is not incremented in the FETCH phase, the CPU will execute the same instruction forever. This is a trivially common wiring error.\n- **ALU flags latching**: Flags should update only on ALU instructions, not on loads, stores, or branches. If flags update unconditionally, a load between a compare and a branch will corrupt the comparison result.\n- **Unsigned vs. signed confusion**: Decide at ISA definition time whether arithmetic is signed (2's complement) or unsigned, and implement the ALU and flag logic accordingly. The Carry flag has different semantics for signed vs. unsigned operations.\n- **Memory alignment**: If the data width and instruction width differ, or if instructions are multi-byte, define alignment rules. A 16-bit instruction in byte-addressable memory occupies two addresses; the PC must increment by 2, not 1.\n- **Overcomplicating the first design**: Start with the simplest possible CPU (8-bit, 4 registers, 8 instructions, single-cycle or multi-cycle, no pipeline). Complexity can always be added later; a working simple design teaches more than a broken complex one.\n\n## Related Skills\n\n- `design-logic-circuit` -- design the ALU, multiplexers, decoders, and other combinational blocks\n- `build-sequential-circuit` -- design the register file, program counter, control FSM, and other sequential blocks\n- `evaluate-boolean-expression` -- simplify the control logic equations for the hardwired control unit\n- `derive-theoretical-result` -- formalize performance analysis (CPI, throughput, Amdahl's law)\n","# Simulate CPU Architecture\n\nDesign a minimal but complete CPU by defining an instruction set architecture, composing an ALU and register file into a datapath, designing a control unit that generates the correct signals for each instruction phase, implementing the fetch-decode-execute cycle, simulating a small program to completion, and verifying every clock cycle against expected register and memory state.\n\n## When to Use\n\n- Learning or teaching computer architecture from first principles\n- Designing a custom processor for an FPGA or educational simulator\n- Verifying understanding of how instructions execute at the gate and register-transfer level\n- Building a software simulation (Python, JavaScript, or structured walkthrough) of a CPU\n- Composing the combinational blocks from design-logic-circuit and the sequential blocks from build-sequential-circuit into a working system\n\n## Inputs\n\n- **Required**: Processor complexity target -- 4-bit, 8-bit, or 16-bit data width; number of general-purpose registers (2-16)\n- **Required**: Minimum instruction set -- at least: load, store, add, subtract, bitwise AND\u002FOR, branch, halt\n- **Optional**: Addressing modes beyond direct (immediate, register-indirect, indexed)\n- **Optional**: Additional instructions (multiply, shift, compare, jump-and-link for subroutines)\n- **Optional**: Memory size and word size\n- **Optional**: Pipeline stages (single-cycle, multi-cycle, or pipelined) -- default is multi-cycle\n- **Optional**: Implementation medium -- software simulation (Python\u002FJS), HDL (Verilog\u002FVHDL), or paper walkthrough\n\n## Procedure\n\n### Step 1: Define the Instruction Set Architecture\n\nSpecify everything a programmer needs to know to write machine code for this CPU:\n\n1. **Data width**: Choose the bit width for data (ALU operand size) and addresses. Common choices: 8-bit data \u002F 8-bit address (256 bytes addressable), 16-bit data \u002F 16-bit address.\n2. **Register file**: Define the number of general-purpose registers and any special-purpose registers.\n   - **General-purpose**: R0-R(N-1). Decide if R0 is hardwired to zero (simplifies instruction encoding).\n   - **Special-purpose**: Program Counter (PC), Instruction Register (IR), Status\u002FFlags register (Zero, Carry, Negative, Overflow).\n3. **Instruction format**: Design a fixed-width instruction word. Divide the bits into fields:\n   - **Opcode**: Identifies the operation. With K bits, support up to 2^K instructions.\n   - **Register fields**: Source and destination register addresses. With N registers, each field needs ceil(log2(N)) bits.\n   - **Immediate\u002Foffset field**: For constants or branch offsets. Use remaining bits.\n4. **Instruction catalog**: Define each instruction with its mnemonic, opcode encoding, operand fields, operation (in RTL notation), and affected flags.\n5. **Addressing modes**: Define how operands are located.\n   - **Register**: Operand is in a register.\n   - **Immediate**: Operand is embedded in the instruction.\n   - **Direct**: Operand address is in the instruction.\n   - **Register-indirect**: Operand address is in a register.\n\n```markdown\n## ISA Specification\n- **Data width**: [N] bits\n- **Address width**: [M] bits\n- **Registers**: [count] general-purpose + [list of special-purpose]\n- **Instruction width**: [W] bits\n\n### Instruction Format\n| Field    | Bits      | Width |\n|----------|-----------|-------|\n| Opcode   | [W-1:X]  | [n]   |\n| Rd       | [X-1:Y]  | [n]   |\n| Rs       | [Y-1:Z]  | [n]   |\n| Imm      | [Z-1:0]  | [n]   |\n\n### Instruction Catalog\n| Mnemonic | Opcode | Format    | RTL Operation          | Flags |\n|----------|--------|-----------|------------------------|-------|\n| LOAD     | 0000   | Rd, [addr]| Rd \u003C- MEM[addr]       | -     |\n| STORE    | 0001   | Rs, [addr]| MEM[addr] \u003C- Rs       | -     |\n| ADD      | 0010   | Rd, Rs    | Rd \u003C- Rd + Rs         | Z,C,N |\n| ...      | ...    | ...       | ...                    | ...   |\n| HALT     | 1111   | -         | Stop execution         | -     |\n```\n\n**Got:** A complete ISA specification where every instruction has a unique opcode, well-defined operand fields, an unambiguous RTL description, and documented flag effects. The instruction encoding must be decodable without ambiguity.\n\n**If fail:** If the instruction word is too narrow to encode all needed fields, either widen the instruction, reduce the register count, use variable-length instructions (more complex decoding), or split instructions into sub-operations. If opcodes collide, reassign the encoding.\n\n### Step 2: Design the Datapath\n\nBuild the register-transfer level hardware that moves and transforms data:\n\n1. **ALU**: Design using the design-logic-circuit skill. The ALU takes two N-bit operands and an operation select signal, and produces an N-bit result plus flag outputs (Zero, Carry, Negative, Overflow).\n   - Operations: ADD, SUB (via 2's complement add), AND, OR, XOR, NOT, SHIFT LEFT, SHIFT RIGHT, PASS-THROUGH (for moves and loads).\n   - The ALU select width must accommodate all required operations.\n2. **Register file**: Design using build-sequential-circuit. A bank of registers with:\n   - Two read ports (source A, source B) -- combinational read with register address as input.\n   - One write port (destination) -- clocked write enabled by a RegWrite control signal.\n   - If R0 is hardwired to zero, override writes to R0.\n3. **Program Counter (PC)**: An N-bit register with:\n   - Increment logic (PC + instruction_width\u002F8 for the next sequential instruction).\n   - Load input for branch\u002Fjump targets.\n   - Multiplexer selecting between increment and branch target, controlled by a PCsrc signal.\n4. **Memory interface**: Separate or unified instruction and data memory.\n   - **Harvard architecture**: Separate instruction memory (read-only during execution) and data memory (read-write). Simpler, allows simultaneous fetch and data access.\n   - **Von Neumann architecture**: Single shared memory for instructions and data. Requires sequencing fetch and data access in different cycles.\n5. **Interconnect**: Multiplexers and buses connecting the components:\n   - ALU input A mux: register read port A or PC (for PC-relative addressing).\n   - ALU input B mux: register read port B or sign-extended immediate.\n   - Register write data mux: ALU result or memory read data (for loads).\n   - Memory address mux: PC (for instruction fetch) or ALU result (for load\u002Fstore).\n\n```markdown\n## Datapath Components\n| Component       | Width  | Ports \u002F Signals                    |\n|----------------|--------|------------------------------------|\n| ALU            | [N]-bit| OpA, OpB, ALUop -> Result, Flags  |\n| Register File  | [N]-bit| RdAddrA, RdAddrB, WrAddr, WrData, RegWrite -> RdDataA, RdDataB |\n| PC             | [M]-bit| PCnext, PCwrite -> PCout           |\n| Instruction Mem| [W]-bit| Addr -> Instruction                |\n| Data Memory    | [N]-bit| Addr, WrData, MemRead, MemWrite -> RdData |\n\n## Datapath Multiplexers\n| Mux Name     | Inputs               | Select Signal | Output      |\n|-------------|----------------------|---------------|-------------|\n| ALU_B_mux   | RegDataB, Immediate  | ALUsrc        | ALU OpB     |\n| WrData_mux  | ALU Result, MemData  | MemToReg      | Reg WrData  |\n| PC_mux      | PC+1, BranchTarget   | PCsrc         | PC next     |\n```\n\n**Got:** A complete datapath diagram (as a component table and mux table) where every instruction in the ISA has a viable path for its data to flow from source to destination through the ALU, register file, and memory.\n\n**If fail:** If an instruction cannot be executed with the current datapath (e.g., no path from memory to a register for LOAD), add the missing multiplexer or data path. Walk through each instruction's RTL operation and trace the required signal flow through the datapath.\n\n### Step 3: Design the Control Unit\n\nBuild the logic that orchestrates the datapath for each instruction:\n\n1. **Identify control signals**: List every multiplexer select, register write enable, memory read\u002Fwrite enable, and ALU operation select signal in the datapath.\n2. **Single-cycle control** (simplest): A purely combinational control unit that derives all control signals from the opcode field of the current instruction in one clock cycle.\n3. **Multi-cycle control** (recommended for learning): A finite state machine (designed using build-sequential-circuit) that breaks each instruction into phases:\n   - **Fetch**: Read instruction from memory at PC address; store in IR; increment PC.\n   - **Decode**: Read register file using fields from IR; sign-extend the immediate field.\n   - **Execute**: Perform the ALU operation or compute the memory address.\n   - **Memory access** (load\u002Fstore only): Read from or write to data memory.\n   - **Write-back**: Write the result to the destination register.\n4. **Control signal table**: For each instruction and each phase, specify the value of every control signal.\n5. **Hardwired vs. microprogrammed**:\n   - **Hardwired**: The control FSM is built from gates and flip-flops. Faster, less flexible.\n   - **Microprogrammed**: A microinstruction ROM stores the control signals for each state. Each microinstruction contains the control signal values plus a next-state field. Slower, but easy to modify.\n\n```markdown\n## Control Signals\n| Signal     | Width | Function                              |\n|-----------|-------|---------------------------------------|\n| ALUop     | [k]   | Selects ALU operation                 |\n| ALUsrc    | 1     | 0=register, 1=immediate for ALU B    |\n| RegWrite  | 1     | Enable register file write            |\n| MemRead   | 1     | Enable data memory read               |\n| MemWrite  | 1     | Enable data memory write              |\n| MemToReg  | 1     | 0=ALU result, 1=memory data to register |\n| PCsrc     | 1     | 0=PC+1, 1=branch target              |\n| IRwrite   | 1     | Enable instruction register load      |\n\n## Multi-Cycle Control FSM\n| State   | Active Signals                          | Next State         |\n|---------|----------------------------------------|-------------------|\n| FETCH   | MemRead, IRwrite, PC \u003C- PC+1           | DECODE             |\n| DECODE  | Read registers, sign-extend immediate   | EXECUTE            |\n| EXECUTE | ALUop=[per instruction], ALUsrc=[...]  | MEM_ACCESS or WB   |\n| MEM_ACC | MemRead or MemWrite                    | WRITE_BACK         |\n| WB      | RegWrite, MemToReg=[...]               | FETCH              |\n```\n\n**Got:** A control unit (combinational or FSM) that generates the correct control signal values for every instruction at every phase, with no conflicting signals (e.g., MemRead and MemWrite both active simultaneously on the same memory).\n\n**If fail:** If a control signal conflict exists, the phases are not properly separated. Ensure that load and store instructions access memory in different phases or that the memory interface supports simultaneous read and write on separate ports. If the FSM has too many states, check whether some instructions share phases and can be merged.\n\n### Step 4: Implement the Fetch-Decode-Execute Cycle\n\nConnect the datapath and control unit into a working processor:\n\n1. **Clock distribution**: Connect the system clock to all flip-flops (PC, IR, register file, control FSM state register). All state updates happen on the same clock edge.\n2. **Phase sequencing**: Wire the control FSM outputs to the datapath control signals. The FSM advances one state per clock cycle, driving the datapath through Fetch -> Decode -> Execute -> Memory -> Write-back.\n3. **Instruction fetch**: In the FETCH phase, the PC drives the instruction memory address bus. The fetched instruction loads into IR. The PC increments by one instruction width.\n4. **Instruction decode**: In the DECODE phase, the opcode field of IR drives the control unit to determine the instruction type. Register addresses from IR drive the register file read ports.\n5. **Execute and beyond**: The remaining phases depend on the instruction type:\n   - **ALU instructions**: Execute (ALU computes), Write-back (result to register).\n   - **Load**: Execute (ALU computes address), Memory (read data memory), Write-back (data to register).\n   - **Store**: Execute (ALU computes address), Memory (write data memory).\n   - **Branch**: Execute (ALU compares or checks flags), conditionally update PC.\n   - **Halt**: FSM enters a terminal state and stops advancing.\n6. **Interrupt and exception handling** (optional): Add a mechanism to save PC and jump to a handler address. This requires additional control states and a cause register.\n\n```markdown\n## Cycle Execution Summary\n| Instruction Type | Phases                          | Cycles |\n|-----------------|--------------------------------|--------|\n| ALU (reg-reg)   | Fetch, Decode, Execute, WB     | 4      |\n| Load            | Fetch, Decode, Execute, Mem, WB| 5      |\n| Store           | Fetch, Decode, Execute, Mem    | 4      |\n| Branch (taken)  | Fetch, Decode, Execute         | 3      |\n| Branch (not taken)| Fetch, Decode, Execute       | 3      |\n| Halt            | Fetch, Decode                  | 2      |\n```\n\n**Got:** A fully connected processor where the control FSM drives the datapath through the correct sequence of phases for each instruction type, and all state transitions occur synchronously on the clock edge.\n\n**If fail:** If the processor hangs (never reaches HALT) or produces incorrect results, the most likely cause is a control signal error in one specific phase. Use Step 5's cycle-by-cycle trace to isolate the failing cycle. If the PC does not increment correctly, check the FETCH phase wiring. If the wrong register is written, check the register address field extraction from IR.\n\n### Step 5: Simulate a Small Program and Verify\n\nExecute a concrete program and verify every clock cycle against expected state:\n\n1. **Write a test program**: Choose a program small enough to trace completely (5-15 instructions) but complex enough to exercise multiple instruction types. Fibonacci sequence computation is ideal: it uses load-immediate, add, branch, and halt.\n2. **Initialize state**: Set all registers to 0. Load the program into instruction memory starting at address 0. Set PC = 0. Set the control FSM to the FETCH state.\n3. **Cycle-by-cycle trace**: For each clock cycle, record:\n   - Control FSM state and phase name\n   - PC value and instruction being fetched\u002Fexecuted\n   - ALU inputs, operation, and result\n   - Register file reads and writes\n   - Memory reads and writes\n   - Flag register values\n   - All control signal values\n4. **Verify against hand computation**: Independently compute the expected register and memory state after each instruction completes (not each cycle -- each instruction takes multiple cycles). Compare the simulation trace against these expected snapshots.\n5. **Edge cases**: Verify behavior for:\n   - Branch not taken (PC increments normally)\n   - Branch taken (PC loads branch target)\n   - Load followed immediately by use of loaded register (checks if write-back completes before next decode reads)\n   - Writing to R0 if hardwired to zero (write should have no effect)\n   - HALT instruction (processor stops cleanly)\n\n```markdown\n## Test Program: Fibonacci (first 8 terms)\n| Addr | Instruction    | Mnemonic         | Comment              |\n|------|---------------|------------------|----------------------|\n| 0x00 | [encoding]    | LOAD R1, #1      | R1 = 1 (F1)         |\n| 0x01 | [encoding]    | LOAD R2, #1      | R2 = 1 (F2)         |\n| 0x02 | [encoding]    | LOAD R3, #6      | R3 = 6 (loop count) |\n| 0x03 | [encoding]    | ADD R4, R1, R2   | R4 = R1 + R2        |\n| 0x04 | [encoding]    | MOV R1, R2       | R1 = R2              |\n| 0x05 | [encoding]    | MOV R2, R4       | R2 = R4              |\n| 0x06 | [encoding]    | SUB R3, R3, #1   | R3 = R3 - 1         |\n| 0x07 | [encoding]    | BNZ 0x03         | Branch if R3 != 0   |\n| 0x08 | [encoding]    | HALT             | Stop                 |\n\n## Cycle-by-Cycle Trace (excerpt)\n| Cycle | Phase   | PC  | IR       | ALU Op   | Result | RegWrite | Flags |\n|-------|---------|-----|----------|----------|--------|----------|-------|\n| 1     | FETCH   | 0x00| LOAD R1,1| -        | -      | No       | -     |\n| 2     | DECODE  | 0x01| LOAD R1,1| -        | -      | No       | -     |\n| 3     | EXECUTE | 0x01| LOAD R1,1| PASS #1  | 1      | No       | -     |\n| 4     | WB      | 0x01| LOAD R1,1| -        | -      | R1 \u003C- 1  | -     |\n| ...   | ...     | ... | ...      | ...      | ...    | ...      | ...   |\n\n## Expected Final State\n| Register | Value | Description         |\n|----------|-------|---------------------|\n| R1       | [val] | Second-to-last Fib  |\n| R2       | [val] | Last computed Fib   |\n| R3       | 0     | Loop counter done   |\n| R4       | [val] | Same as R2          |\n| PC       | 0x09  | One past HALT       |\n```\n\n**Got:** The cycle-by-cycle trace matches the expected final state. Every instruction produces the correct register and memory updates. The program terminates at HALT with the correct Fibonacci values in registers.\n\n**If fail:** Compare the first divergence between expected and actual state. Common causes: (1) ALU operation select is wrong for one instruction type -- check the control signal table. (2) Branch offset calculation is off by one -- verify whether branches are PC-relative from the current or next instruction address. (3) Write-back writes to the wrong register -- check the register address field extraction. (4) Flags not updated correctly -- trace the ALU flag logic for the specific operands that cause the mismatch.\n\n## Validation\n\n- [ ] ISA has at least load, store, add, subtract, AND, OR, branch, and halt instructions\n- [ ] Every instruction has a unique opcode and unambiguous encoding\n- [ ] Datapath provides a valid signal path for every instruction's RTL operation\n- [ ] ALU supports all required operations with correct flag generation\n- [ ] Register file has sufficient read and write ports for the instruction format\n- [ ] Control unit generates correct signals for every instruction at every phase\n- [ ] No control signal conflicts (e.g., simultaneous read and write to the same memory port)\n- [ ] Fetch-decode-execute cycle is fully connected and clocked\n- [ ] Test program executes to completion with correct final state\n- [ ] Cycle-by-cycle trace is verified against hand computation\n- [ ] Branch taken and not-taken cases are both verified\n- [ ] HALT instruction stops execution cleanly\n\n## Pitfalls\n\n- **Branch offset off-by-one**: Branches may be relative to the current PC, PC+1, or the instruction after the branch. Define the convention in the ISA and implement it consistently. Off-by-one errors in branch targets are the single most common CPU design bug.\n- **Write-back\u002Fdecode hazard in multi-cycle**: If instruction I writes a register in its write-back phase at the same time instruction I+1 reads that register in its decode phase, the read may get the old value. In a multi-cycle CPU (one instruction at a time), this is not an issue. In a pipelined CPU, this requires forwarding or stalling.\n- **Forgetting to increment PC during fetch**: If PC is not incremented in the FETCH phase, the CPU will execute the same instruction forever. This is a trivially common wiring error.\n- **ALU flags latching**: Flags should update only on ALU instructions, not on loads, stores, or branches. If flags update unconditionally, a load between a compare and a branch will corrupt the comparison result.\n- **Unsigned vs. signed confusion**: Decide at ISA definition time whether arithmetic is signed (2's complement) or unsigned, and implement the ALU and flag logic accordingly. The Carry flag has different semantics for signed vs. unsigned operations.\n- **Memory alignment**: If the data width and instruction width differ, or if instructions are multi-byte, define alignment rules. A 16-bit instruction in byte-addressable memory occupies two addresses; the PC must increment by 2, not 1.\n- **Overcomplicating the first design**: Start with the simplest possible CPU (8-bit, 4 registers, 8 instructions, single-cycle or multi-cycle, no pipeline). Complexity can always be added later; a working simple design teaches more than a broken complex one.\n\n## Related Skills\n\n- `design-logic-circuit` -- design the ALU, multiplexers, decoders, and other combinational blocks\n- `build-sequential-circuit` -- design the register file, program counter, control FSM, and other sequential blocks\n- `evaluate-boolean-expression` -- simplify the control logic equations for the hardwired control unit\n- `derive-theoretical-result` -- formalize performance analysis (CPI, throughput, Amdahl's law)\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"digital-logic, cpu-architecture, instruction-set, datapath, fetch-decode-execute","Philipp Thoss","digital-logic","1.0","multi","advanced","Julius Brussee homage — caveman","Design and simulate a minimal CPU from scratch: define an instruction set architecture (ISA), build the datapath (ALU, register file, program counter, memory interface), design the control unit (hardwired or microprogrammed), implement the fetch-decode-execute cycle, and verify by tracing a small program clock cycle by clock cycle. The capstone \"computer inside a computer\" exercise that composes combinational and sequential building blocks into a complete processor.\n","Read Grep Glob WebFetch WebSearch","82c77053","en","2026-05-03","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fsimulate-cpu-architecture",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill simulate-cpu-architecture",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill simulate-cpu-architecture",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill simulate-cpu-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsimulate-cpu-architecture\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]