Sai Kumar Taraka commited on
Commit
13dc97c
Β·
1 Parent(s): c6829f8

Update AGENTS.md with cross-file validator and template fixes

Browse files
Files changed (1) hide show
  1. AGENTS.md +13 -6
AGENTS.md CHANGED
@@ -60,19 +60,26 @@
60
  ## Template Status (Post-Phase 1)
61
  | Template | Status | Key Changes |
62
  |---|---|---|
63
- | `ral_model.sv.j2` | βœ… Spec-driven | Iterates `spec.registers` β†’ register classes, block, adapter, predictor; no hardcoded UART names |
64
- | `coverage_collector.sv.j2` | βœ… Spec-driven + reg-level CGs | Dynamic `addr_bits`/`data_bits` from spec; per-register field-level covergroups |
65
- | `scoreboard.sv.j2` | βœ… Spec-driven | `shadow_regs[0:num_regs-1]`, dynamic addr width, UART sections guarded |
66
- | `sequence.sv.j2` | βœ… Spec-driven | Dynamic addr width, loop bounds, range constraints from `num_regs` |
 
67
  | `test.sv.j2` | βœ… Fixed | UART `vif.uart_rx`/`vif.cts_n` guarded by `{% if p == "uart" %}` |
68
 
69
  ## Pipeline additions (Jun 2026)
70
  - **Step 6a2**: SV syntax check via `SVSyntaxChecker` β€” block structure, paren balance, type refs, protocol consistency, common pitfalls
71
- - **Step 6b**: AI quality score via `compute_quality_score()` β€” weighted composite of completeness (25%), syntax (25%), register coverage (20%), RAL readiness (15%), coverage readiness (15%)
72
- - Results include `sv_check` dict and `quality_score` float in pipeline return
 
73
  - ZIP export at `GET /api/export-zip` β€” downloads all generated files as a single archive (wired to UI Download button)
 
74
 
75
  ## Next Steps
 
 
 
 
76
 
77
  ## Important Paths (Docker/HF Space)
78
  - Backend root: `/app/backend/`
 
60
  ## Template Status (Post-Phase 1)
61
  | Template | Status | Key Changes |
62
  |---|---|---|
63
+ | `ral_model.sv.j2` | βœ… Spec-driven | Iterates `spec.registers` β†’ register classes, block, adapter, predictor; no hardcoded UART names; `addr_bits` computed inline via `map\|max` (no `__setitem__` hack) |
64
+ | `coverage_collector.sv.j2` | βœ… Spec-driven + reg-level CGs | Dynamic `addr_bits`/`data_bits` from spec; per-register field-level covergroups; SV `'1` literal instead of `{N{1'b1}}` to avoid Jinja2 clash |
65
+ | `scoreboard.sv.j2` | βœ… Spec-driven | `shadow_regs[0:num_regs-1]`, dynamic addr width, UART sections guarded; `addr_bits` computed inline |
66
+ | `sequence.sv.j2` | βœ… Spec-driven | Dynamic addr width, loop bounds, range constraints from `num_regs`; `data_width` from spec; fixed stray `}` syntax bug |
67
+ | `sequence_item.sv.j2` | βœ… Enhanced | `uvm_object_utils_begin/end` with field macros, `error_type_e` enum, `do_print()`, `inject_error()` helper, `int unsigned delay` |
68
  | `test.sv.j2` | βœ… Fixed | UART `vif.uart_rx`/`vif.cts_n` guarded by `{% if p == "uart" %}` |
69
 
70
  ## Pipeline additions (Jun 2026)
71
  - **Step 6a2**: SV syntax check via `SVSyntaxChecker` β€” block structure, paren balance, type refs, protocol consistency, common pitfalls
72
+ - **Step 6a3**: Cross-file reference validation via `validate_generated_files()` β€” catches `reg_model.xxx` hallucinations where `xxx` not in spec registers; computes spec register/interf reference coverage
73
+ - **Step 6b**: AI quality score via `compute_quality_score()` β€” weighted composite including spec_coverage_score (35% weight); hallucination_penalty (-0.1 each, max -0.5)
74
+ - Results include `sv_check` dict, `quality_score` float, `cross_file_validation` dict (passed, hallucinations, spec_coverage)
75
  - ZIP export at `GET /api/export-zip` β€” downloads all generated files as a single archive (wired to UI Download button)
76
+ - New files: `src/evaluation/cross_file_validator.py`
77
 
78
  ## Next Steps
79
+ 1. Wire cross_file_validation results into React frontend metrics display
80
+ 2. Guard hardcoded UART register references (`reg_model.lcr`, `reg_model.dll`, etc.) in scoreboard/sequence/test behind a check that those registers actually exist in the spec
81
+ 3. Add more protocol templates (AXI4, AHB, Wishbone)
82
+ 4. Generate architecture diagram from spec
83
 
84
  ## Important Paths (Docker/HF Space)
85
  - Backend root: `/app/backend/`