| name | gf-gen | ||||
|---|---|---|---|---|---|
| description | Generate scaffolds | ||||
| argument-hint | <type> <name> [options] | ||||
| allowed-tools |
|
Generate SystemVerilog code artifacts: modules, testbenches, or packages.
Parse the arguments to determine generation type:
gf-gen module <name>- Generate a new modulegf-gen testbench <name>- Generate a testbench for a modulegf-gen package <name>- Generate a package
Create a synthesizable module with:
- Standard header comment with filename and description
- Parameter declarations (if needed)
- Port list with proper directions and types
- Internal signal declarations
- Basic combinational/sequential logic structure
- Proper
always_ffandalways_combblocks
Create a testbench that:
- Instantiates the DUT (Device Under Test)
- Generates clock and reset signals
- Includes initial block with
$dumpfileand$dumpvars - Has placeholder for test stimulus
- Uses
$finishto end simulation - Follows UVM-lite or simple directed test style
Create a package with:
- Type definitions (enums, structs)
- Parameter constants
- Function declarations
- Proper export statements
Write the generated file to <name>.sv or <name>_tb.sv for testbenches.