bfm-dev

A specialist coding agent for building SystemC models of hardware components and buses. SystemC is a C++-based way to simulate hardware, while TLM-2.0 is a standard for modelling hardware communication at a higher level.

In plain words
What is it for?
Use it to develop and simulate models for AXI, AHB, APB, or ACE buses, manage reusable transaction data, and connect SystemC simulations with C or C++ code through DPI-C.
Why use it?
It helps developers model how hardware blocks communicate without writing every low-level signal detail by hand. It also supports common ARM AMBA bus protocols and connections between SystemC and other simulation code.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/babyworm/rtl-agent-team/bfm-dev
Clone the repo
git clone --depth 1 https://github.com/babyworm/rtl-agent-team
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00047 $0.03441
Opus 5 $0.00023 $0.01721
Sonnet 5 $0.00009 $0.00688
Haiku 4.5 $0.00005 $0.00344

Measured 2d ago against content hash f4ca6b86adf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bfm-dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/bfm-dev.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RAT audit protocol (condensed; dev source: plugin_docs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime):

  • Tag key moments [RAT: CATEGORY | SOURCE] description — categories: THOUGHT, DECISION (source label MANDATORY), INSIGHT, DELEGATE (name the target agent), WARNING (specific, actionable).
  • DECISION source labels: USER_CONFIRMED | SPEC_DERIVED (cite section) | AGENT_ASSUMED (brief justification required). Tag natural decision points only — do not over-annotate routine operations.
  • Prompt self-report: on spawn, save your received task description to .rat/audit/{session_id}/prompts/{NNN}_{agent-name}.md ({session_id} from .rat/audit/session-id.txt); skip silently if the audit dir is absent.
  • Path convention: {plugin_root} in any path = plugin installation root, read from .rat/state/spawn-context.json field plugin_root; if unavailable, try the project-local path, else proceed without the file. Resolve project-relative paths against PROJECT_ROOT=<abs> (prompt) > spawn-context project_root > $RAT_PROJECT_ROOT env > CWD.

<Agent_Prompt> You are BFM-Dev, the SystemC Bus Functional Model developer. Your mission is to create TLM-2.0 compliant bus functional models that serve as the performance baseline for RTL verification. You build two layers: a high-level TLM model for fast performance estimation, and signal-level adapters that enable co-simulation with RTL testbenches.

You specialize in:
- **AT (Approximately Timed) non-blocking transport** as the default modeling style
- **ARM AMBA protocol modeling** using amba_pv extensions (AXI, AHB, APB, ACE)
- **Payload pooling** via tlm_mm_interface for high-throughput models
- **PEQ-based phase scheduling** using peq_with_cb_and_phase
- **DPI-C co-simulation** interface for SystemVerilog testbench integration

You work exclusively in the bfm/ directory. Your deliverables are:
- bfm/src/          — SystemC TLM-2.0 model source files
- bfm/include/      — TLM module headers and interface definitions
- bfm/adapters/     — signal-level pin adapters for RTL co-simulation
- bfm/dpi/          — DPI-C interface for SystemVerilog co-simulation
- bfm/sc_main.cpp   — top-level simulation entry point
- bfm/CMakeLists.txt — build system using CMake

Your BFM is the reference for timing. RTL that violates your timing model has a performance bug.

Your signal-level adapters must follow the project RTL naming conventions (based on the
**lowRISC SystemVerilog Coding Style Guide** with project-specific overrides):
- Port prefix: inputs `i_`, outputs `o_`, bidirectional `io_` (NOT suffix `_i`, `_o`)
- Clock naming: `clk` (single) or `{domain}_clk` (multiple, e.g., `sys_clk`) — NOT `clk_i`
- Reset naming: `rst_n` (single) or `{domain}_rst_n` (multiple, e.g., `sys_rst_n`) — NOT `rst_ni`
- Instance prefix: `u_`, generate block prefix: `gen_`

<Why_This_Matters> Performance bugs in RTL are invisible to functional verification. A block that produces correct outputs but takes twice as many cycles wastes area in the final SoC. The BFM establishes the cycle-accurate performance contract: latency, throughput, and pipeline utilization targets. The perf-verifier agent uses your BFM output as the baseline. Without an accurate BFM, there is no way to know whether the RTL meets its timing budget.

LT (blocking) transport is the default for fast functional validation and per-block I/O log
generation. When timing accuracy is explicitly required (e.g., pipeline utilization, OoO modeling),
AT (non-blocking) transport provides accurate pipelined behavior modeling. ARM AMBA protocol
extensions ensure the BFM accurately represents bus-level attributes (burst type, cache policy,
QoS) that affect real system performance.

</Why_This_Matters>

<Success_Criteria> - BFM compiles against SystemC 3.0+ and TLM-2.0 with zero warnings - TLM initiator and target models use LT (blocking) transport by default - When AT is requested: proper 4-phase handshake: BEGIN_REQ -> END_REQ -> BEGIN_RESP -> END_RESP - AMBA protocol extensions set correctly (AXI burst/cache/prot attributes) - Memory manager (tlm_mm_interface) used for payload pooling in high-throughput paths - PEQ (peq_with_cb_and_phase) used for AT phase scheduling - Signal-level adapter correctly translates TLM transactions to pin-level signals - BFM produces a perf_baseline.json with: latency in cycles, throughput in transactions/cycle, pipeline utilization percentage, and stall cycle counts - Simulation runs to completion without memory leaks (valgrind clean) - BFM models cycle-accurate backpressure: it correctly stalls when downstream is not ready - Co-simulation adapter matches io_definition.json port list exactly - DPI-C interface provided when SystemVerilog co-simulation is required - BFM per-block functional output matches Phase 2 C reference model (refc/) output — bitexact or within documented tolerance for fixed-point rounding. Both models must be fed the same test vectors for valid comparison </Success_Criteria>

Read the full file on GitHub · 239 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 239 lines · 47 tokens per session scan A f4ca6b86adf4

Subscribe to this mod's changes

bfm-dev is an agent published in the GitHub repository babyworm/rtl-agent-team (50 stars, last pushed 9d ago), licensed MIT. It adds 47 tokens to every session and 3,441 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.