RapidRTL SDK Feature Roadmap
This document outlines potential features to extend the RapidRTL SDK beyond its current RTL synthesis, simulation, and dependency resolution capabilities.
1. Timing Report Analysis
Goal
Provide automated parsing and validation of post-synthesis/post-implementation timing reports to catch timing failures early and provide actionable feedback.
Challenges
- Vendor Dependency: Each vendor (Xilinx/AMD, Lattice, Intel/Altera) produces timing reports in different formats.
- Xilinx:
report_timing_summaryoutputs text with sections like "Timing Summary", "Intra-Clock Paths", "Inter-Clock Paths". Can also export as.rpx(XML-based). - Lattice (Radiant): Uses PAR timing report, different structure.
- Intel (Quartus): Uses TimeQuest Timing Analyzer,
.sta.rptformat.
- Xilinx:
- RTL Dependency: Clock names, generated clocks, and constraint names are project-specific.
Proposed Approach
-
Abstraction Layer: Create a
TimingReportPython class with vendor-specific parsers.tools/report-analyzer/ ├── timing_report.py # Abstract base class ├── xilinx_parser.py # Parses Vivado timing summaries ├── lattice_parser.py # Parses Radiant timing reports └── intel_parser.py # Parses Quartus STA reports -
Core Metrics to Extract:
- Worst Negative Slack (WNS) / Total Negative Slack (TNS)
- Worst Hold Slack (WHS) / Total Hold Slack (THS)
- Number of failing endpoints
- Critical path summary (start/end registers, clock domain)
-
Makefile Integration:
timing-check: ## Analyze timing report for failures (after implementation) @python3 $(SDK_ROOT)/tools/report-analyzer/check_timing.py \ --vendor $(VENDOR) \ --report dcp/$(TOP)/$(TOP)_timing.rpt \ --top-n 10 -
Output:
-
✅ TIMING MET: WNS = 0.234ns(Green) -
❌ TIMING FAILED: WNS = -0.150ns (5 failing paths)(Red) -
Top N Failing Paths (Required Feature):
Top 10 Failing Paths: 1. -0.150ns: clk_100mhz → reg_a/D → reg_b/Q 2. -0.120ns: clk_100mhz → fifo_inst/wr_ptr → fifo_inst/rd_ptr ...
-
Implementation Priority: Medium
Requires sample reports from each vendor to develop parsers.
2. Constraints Analysis / Clock Inference
Goal
Assist users in generating or validating timing constraints (XDC/SDC) based on the RTL structure.
Challenges
- RTL Dependency: Clock sources, clock domains, and CDC paths are entirely design-specific.
- Inference Accuracy: Automatic clock inference from RTL is non-trivial (e.g., differentiating a clock from a data signal).
- Exception Paths (False Paths / Multi-Cycle Paths): These are designer-intent decisions, not easily automatable.
Proposed Approach (Conservative)
Rather than full inference, provide templates and validation utilities:
-
Constraint Templates (
make gen-xdc-template): Generates a starter XDC file with common patterns:- Primary clock definition (
create_clock) - I/O delay templates (
set_input_delay,set_output_delay) set_max_delaywith-datapath_onlytips for CDC paths- Placeholder for false paths
Example output:
# Primary Clock create_clock -period 10.000 -name clk_100mhz [get_ports clk] # CDC Paths (use set_max_delay -datapath_only for async crossings) # set_max_delay -datapath_only -from [get_cells src_reg] -to [get_cells dst_reg] 10.0 # False Paths # set_false_path -from [get_clocks clk_a] -to [get_clocks clk_b] - Primary clock definition (
-
Clock Domain Report (RTL-based):
[!WARNING] Complexity Note: Clocks can be named differently across RTL modules. Tracking clock domains accurately requires hierarchical analysis of clock signal propagation—a significant parser effort with unclear benefit-to-effort ratio.
Recommendation: Defer this feature or implement as a best-effort heuristic with explicit caveats.
-
XDC Linter:
- Check XDC syntax for common mistakes.
- Warn if a clock is defined but not used in the design.
- Warn if a constraint references a non-existent port/cell.
[!NOTE] Limitation: Synthesis tools often rename nets (e.g.,
my_signal→my_signal_reg). XDC validation against RTL may produce false positives. Consider post-synthesis validation against the elaborated netlist instead.
Makefile Integration
gen-xdc-template: ## Generate XDC constraint template
@python3 $(SDK_ROOT)/tools/constraint-analyzer/gen_template.py \
--src $(SRC_DIR) --top $(TOP) --out $(XDC_DIR)/$(TOP)_timing.xdc
xdc-lint: ## Validate XDC constraint syntax and references
@python3 $(SDK_ROOT)/tools/constraint-analyzer/xdc_lint.py \
--xdc $(XDC_FILES) --src $(SRC_DIR)
Implementation Priority: Low-Medium
Template generation is a simpler starting point. Full CDC analysis is high complexity with limited ROI.
3. Waveform Viewing Integration
Goal
Streamline the workflow of viewing simulation waveforms generated by GHDL, NVC, or Verilator.
Design Decisions
[!IMPORTANT] Waveform generation should be the default behavior. Disabling waves should be explicit (e.g.,
WAVES=0or--no-waves), useful for regressions where speed matters.
Proposed Workflows
make waves (Open Existing Waveform)
Opens the most recent waveform file for a specified top module.
- Behavior:
- Look for
sim_build/<TOP>/<TOP>.ghw(GHDL) or.vcd/.fst(Verilator/NVC). - If found, launch GTKWave (or
nvc --wave). - If not found, print error: "No waveform found for
<TOP>. Runmake sim MODULE=<TOP>first."
- Look for
- Usage:
make waves TOP=tb_uart_sniffer
make sim (Default: Generates Waves)
Standard simulation now generates waves by default.
- Disable waves for regressions:
make simulation WAVES=0
make sim-waves (Explicit Run + Open)
Runs simulation and opens viewer after completion.
- Usage:
make sim-waves MODULE=tb_uart_sniffer
Tool Detection
- Check for
gtkwavein$PATH. - If not found, suggest installation or use
nvc --wavefallback for NVC users.
Makefile Integration
# Default: waves enabled
WAVES ?= 1
waves: ## Open waveform viewer for a module (Usage: make waves TOP=tb_name)
@if [ -z "$(TOP)" ]; then echo "❌ Error: TOP not specified."; exit 1; fi
@WAVE_FILE=$$(find sim_build -name "$(TOP).ghw" -o -name "$(TOP).vcd" | head -1); \
if [ -n "$$WAVE_FILE" ]; then \
gtkwave $$WAVE_FILE &; \
else \
echo "❌ No waveform found for $(TOP). Run simulation first."; \
fi
sim-waves: ## Run simulation and open waveform viewer
@$(MAKE) sim MODULE=$(MODULE) WAVES=1
@$(MAKE) waves TOP=$(MODULE)
Implementation Priority: 🟢 High
Low complexity, high daily user value.
4. Code Coverage
Goal
Provide code coverage metrics (statement, branch, toggle, FSM) for RTL designs during simulation.
Licensing Reality
[!IMPORTANT] Most robust code coverage tools for VHDL/Verilog are commercial/paid:
- Synopsys VCS: Paid.
- Cadence Xcelium: Paid.
- Mentor/Siemens Questa: Paid.
- Xilinx Vivado Simulator: Paid (part of Enterprise edition for coverage).
Open-Source Alternatives
| Tool | Coverage Support | Notes |
|---|---|---|
| GHDL | ❌ None | No native coverage. gcov can be used on the compiled C++ model from ghdl --synth, but this is experimental and not statement-level RTL coverage. |
| NVC | ❌ None | No coverage support currently. |
| Verilator | ✅ Line/Toggle | Verilator supports --coverage for Verilog/SV. Outputs .dat files parseable with verilator_coverage. |
| Icarus Verilog | ❌ None | No native coverage. |
Proposed Approach
Since Verilator supports coverage, we can add support for Verilog/SV designs:
-
Enable Coverage in Verilator Build:
- Modify Cocotb Verilator build args to include
--coverage. - Post-simulation, collect
.datfiles.
- Modify Cocotb Verilator build args to include
-
Coverage Report Generation:
- Run
verilator_coverage --write-info coverage.info <files>. - Optionally generate HTML report with
genhtml(lcov).
- Run
-
Makefile Target:
coverage: ## Run simulation with code coverage (Verilog only, requires Verilator) @SIM=verilator EXTRA_ARGS="--coverage" make simulation @verilator_coverage --write-info coverage.info sim_build/**/*.dat @genhtml coverage.info -o coverage_report @echo "✅ Coverage report: coverage_report/index.html"
VHDL Coverage (Future-Proofing)
[!TIP] Architecture for future VHDL support: Design the coverage infrastructure with an abstract backend interface. If GHDL or NVC adds coverage support in the future, a new backend can be plugged in without restructuring.
# Conceptual: tools/coverage/backend.py
class CoverageBackend(ABC):
@abstractmethod
def collect(self, sim_build_dir: Path) -> CoverageData: ...
@abstractmethod
def generate_report(self, data: CoverageData, output: Path): ...
class VerilatorBackend(CoverageBackend): ...
class GHDLBackend(CoverageBackend): # Future
pass
Implementation Priority: Medium (Verilog only)
VHDL coverage is blocked by tooling limitations. Design for future extensibility.
5. Formal Verification with SymbiYosys
What is Formal Verification?
Formal verification uses mathematical proofs (SAT/SMT solvers) to exhaustively check that a design meets specified properties (assertions). Unlike simulation, which tests specific input vectors, formal proves correctness for all possible inputs within bounded time steps.
What SymbiYosys Provides
SymbiYosys is an open-source formal verification front-end for Yosys. It supports:
| Feature | Description |
|---|---|
| Bounded Model Checking (BMC) | Prove assertions hold for N clock cycles. |
| K-Induction | Prove unbounded correctness by showing induction step. |
| Cover Mode | Find input sequences that reach a specific state (useful for debugging). |
| Live Mode | Check liveness properties (something eventually happens). |
Use Cases for RapidRTL
- Assertion Checking: Verify that FSMs don't enter illegal states.
- Interface Protocol Verification: Prove AXI/Wishbone handshakes follow protocol.
- CDC Verification: Prove that CDC synchronizers are correctly implemented.
- Equivalence Checking: (Limited) Compare two versions of a module.
Proposed SDK Integration
-
Property File Convention:
- Users write
*.sby(SymbiYosys job files) alongside their RTL. - Or: Users annotate RTL with
// synopsys translate_off/assert property(...).
- Users write
-
Makefile Target:
formal: ## Run formal verification with SymbiYosys (Usage: make formal TOP=module) @sby -f $(SRC_DIR)/$(TOP).sby -
Result Parsing:
- Parse
PASS/FAIL/TIMEOUTfrom SymbiYosys output. - On failure, provide path to counterexample VCD.
- Parse
Limitations
- Verilog/SV Only: SymbiYosys (via Yosys) has limited VHDL support. GHDL-Yosys-Plugin exists but is experimental for synthesis; formal support is even more limited.
- Not a Synthesis Replacement: SymbiYosys uses Yosys internally for elaboration/netlist generation, but we are not relying on it for synthesis. The goal is property checking, not bitstream generation.
Implementation Priority: Low-Medium
Valuable for safety-critical designs; requires user familiarity with formal concepts.
6. RTL Schematic Viewer
Goal
Provide a visual schematic representation of RTL modules for visualization only, without relying on vendor synthesis tools.
Proposed Tool: Yosys + Netlistsvg
- Yosys: Elaborate RTL to a JSON netlist (
write_json).Note: We use Yosys only for elaboration to JSON, not for synthesis. All actual synthesis remains with vendor tools.
- Netlistsvg: Convert JSON netlist to SVG schematic.
Workflow
# Elaborate to JSON (Yosys) - Visualization only, NOT synthesis
yosys -p "read_verilog src/my_module.v; prep; write_json my_module.json"
# Generate SVG schematic
netlistsvg my_module.json -o my_module.svg
Makefile Target
schematic: ## Generate SVG schematic from RTL (Usage: make schematic TOP=module)
@if [ -z "$(TOP)" ]; then echo "❌ Error: TOP not specified."; exit 1; fi
@mkdir -p schematics
@yosys -q -p "read_verilog $(shell python3 $(SDK_ROOT)/tools/project-manager/dependency_resolver.py --top $(TOP) --src $(SRC_DIR) --list); prep -top $(TOP); write_json schematics/$(TOP).json"
@netlistsvg schematics/$(TOP).json -o schematics/$(TOP).svg
@echo "✅ Schematic: schematics/$(TOP).svg"
VHDL Support
Yosys VHDL support is provided via the GHDL-Yosys-Plugin (ghdl --synth). This converts VHDL to Yosys's internal representation.
yosys -m ghdl -p "ghdl --std=08 src/my_module.vhd -e my_module; prep; write_json my_module.json"
[!WARNING] Visualization Only: GHDL-Yosys-Plugin elaboration fidelity is not guaranteed to match vendor tools. Use schematics for design understanding and documentation, not as a synthesis reference. All synthesis is performed by vendor tools (Vivado, Radiant, Quartus).
Implementation Priority: Medium-High
High user value for design understanding; relatively low complexity.
Summary & Priority (Post-Review)
Based on user feedback, the following priority ordering is recommended:
| Priority | Feature | Complexity | Key Notes |
|---|---|---|---|
| 1 | Waveform Viewing | Low | Quick win. Waves default ON, explicit disable for regressions. |
| 2 | RTL Schematic Viewer | Medium | High value for design reviews. Visualization only—no synthesis. |
| 3 | Timing Report Analysis | Medium | Top N failing paths is a must. Requires vendor sample reports. |
| 4 | Constraint Templates | Low | gen-xdc-template with set_max_delay -datapath_only tips. |
| 5 | Code Coverage | Medium | Verilog only (Verilator). Design for future VHDL extensibility. |
| 6 | XDC Linter | Medium | Useful but limited by tool net renaming. Post-synthesis validation preferred. |
| 7 | Formal Verification | High | Verilog only; valuable for safety-critical. Requires user expertise. |
| 8 | Clock Domain Report | High | Deferred—hierarchy tracking complexity with unclear ROI. |
Next Steps
- Implement Wave Viewing (
make waves,make sim-waves,WAVES=0for regressions). - Implement Schematic Viewer (
make schematicwith Yosys + Netlistsvg). - Gather Sample Reports from Xilinx for timing analysis parser development.
- Create XDC Template Generator with
set_max_delaytips.