rtl-verilog-lintlisted
Install: claude install-skill Premchand006/AI-assistant-skills
# Synthesisable RTL
The failure this skill exists to prevent: RTL that simulates cleanly, passes a
casual review, and then either fails elaboration or synthesises into different
hardware than the code appears to describe. Those bugs are cheap to prevent in
the source and expensive to find in a netlist.
## Order of work
1. Ask for the target if it is not in the repo: FPGA or ASIC, and which
family or PDK. Reset style, memory inference and clock gating differ, and
the answer changes what correct code looks like.
2. Write or edit the RTL following the rules below.
3. Run `scripts/check_synthesizable.py` on the files you touched.
4. Run `scripts/lint_rtl.sh` for the full pass, which adds Verilator, Verible
and a Yosys elaboration when those tools are installed.
5. Report what ran and what did not. A clean result from two installed tools
is not the same as a clean result from a full flow, and saying so keeps the
next person from trusting it too far.
```bash
python3 scripts/check_synthesizable.py rtl/ --exclude "*_tb.sv"
./scripts/lint_rtl.sh --top my_design rtl/
```
The checker exits non-zero on any error-severity finding, so it drops into a
pre-commit hook or a CI job unchanged.
## The rules that catch the most bugs
**Non-blocking in clocked blocks, blocking in combinational blocks.** `always_ff`
with `=` creates a simulation race whose outcome depends on the order the
simulator schedules blocks; the netlist and the waveform then disagree.
```systemverilog