- Home
- Skills
- Code Quality & Review
- synthesizable rtl style
Works with the AI Agents you already use
synthesizable rtl style
ASIC-oriented SystemVerilog coding guidelines for clear, maintainable, and synthesis-friendly RTL.
Free
synthesizable rtl style
Example session with this skill installed
Refactor the following 8-bit adder into clean, synthesizable SystemVerilog following ASIC-oriented RTL coding conventions.
Preserve the original functionality, including 8-bit output truncation. Make signal naming, data types, arithmetic widths, and carry handling explicit.
module add(
input [7:0] a, b,
output [7:0] sum
);
assign sum = a + b;
endmodule
Explain the changes and why they improve RTL clarity and maintainability.
- Read your context and instructions
- Compiled the synthesizable rtl style
Refactored Synthesizable RTL
The module has been refactored according to ASIC-oriented SystemVerilog coding conventions while preserving its original 8-bit addition behavior.
1. Refactored Code
`default_nettype none
module add (
input logic [7:0] i_a,
input logic [7:0] i_b,
output logic [7:0] o_sum
);
logic unused_co;
assign {unused_co, o_sum} =
{1'b0, i_a} + {1'b0, i_b};
endmodule
`default_nettype wire
2. Key Improvements
| Area | Original | Refactored |
|---|---|---|
| Data types | Implicit net types | Explicit logic |
| Port naming | a, b, sum | i_a, i_b, o_sum |
| Arithmetic width | Implicit sizing | Explicit 9-bit operands |
| Carry handling | Implicitly discarded | Captured as unused_co |
| Net declarations | Implicit nets permitted | default_nettype none |
3. Why These Changes Matter
Explicit hardware intent
Using logic and consistent port prefixes makes signal directions and ownership easier to understand during RTL review.
Predictable arithmetic behavior
Both operands are explicitly zero-extended to 9 bits before addition.
The complete result is assigned to a 9-bit concatenation. The carry-out is captured separately as unused_co, making the intentional truncation visible in the source code.
Improved tool robustness
The default_nettype none directive prevents accidental implicit net declarations caused by misspelled signal names. The previous setting is restored at the end of the file for integration with other compilation units.
Maintainable conventions
Consistent naming and explicit intermediate widths improve readability during synthesis review, waveform debugging, and later design modifications.
4. Functional Behavior
The original module implements 8-bit modular addition:
[
o_sum = (i_a + i_b) \bmod 256
]
For example
| Input A | Input B | Output | Discarded carry |
|---|---|---|---|
| 10 | 20 | 30 | 0 |
| 255 | 1 | 0 | 1 |
| 200 | 100 | 44 | 1 |
The refactoring preserves this behavior. It does not introduce saturation, overflow protection, additional latency, or registers.
5. Important Notes
- The adder remains purely combinational.
- The carry is intentionally unused by downstream logic.
- No new hardware behavior is introduced.
- This is a source-level refactoring; functional equivalence and synthesis results have not been independently verified.
Result: Cleaner RTL with explicit widths, consistent naming, and clearly documented arithmetic intent, suitable for ASIC-oriented development workflows.
Connects securely to your tools. The creator never sees your data.
About this skill
Write Better Synthesizable SystemVerilog
A practical AI agent skill for writing, reviewing, and refactoring synthesizable SystemVerilog RTL with explicit hardware intent and predictable behavior across ASIC design flows.
Built from real-world digital IC design practices, this skill helps coding agents produce RTL that is easier to understand, maintain, synthesize, and debug.
What It Covers
- Synthesizable RTL: Clear combinational and sequential logic using
always_comb,always_ff, and explicit assignments. - FSMs and Priority Logic: Appropriate use of
case,unique, andif / else ifwithout unnecessary synthesis assumptions. - Arithmetic Correctness: Explicit bit widths, signedness, carry handling, and constants.
- Hierarchy and Naming: Consistent port, signal, instance, and generate-block conventions.
- Tool-Friendly Coding: Conservative practices for simulation, lint, synthesis, DFT, STA, and physical implementation.
- Code Review and Refactoring: Identify ambiguous coding patterns and improve structural clarity while preserving intended functionality.
Who Is It For?
Digital IC designers, ASIC/FPGA engineers, RTL developers, and AI-assisted hardware design workflows.
Compatibility
Designed for AI coding agents supporting the SKILL.md format. Originally developed and tested with OpenAI Codex.
Scope: Synthesizable design RTL only. Testbenches, UVM, and verification-only code are excluded.
This skill provides coding guidance, not automated lint, simulation, or synthesis signoff.
Open source: GitHub Repository
MIT Licensed.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 7 days ago
- Free to download with an account