DENIM (Dynamic endpoint network impairment model) semester project - #235
Open
RaresToader wants to merge 6 commits into
Open
RaresToader wants to merge 6 commits into
RaresToader wants to merge 6 commits into
Conversation
Adds a configurable impairment module in series on the network stack's receive stream, so experiments (for instance congestion-control ones) can trigger deterministic events.
Wires the module into the network stack ahead of the RoCE stack and adds EN_DENIM through the build (like other optional services).
A vFPGA exposing the rule table and counters over CSRs, plus a full RDMA endpoint, so one can test DENIM's functionality when the node acts as a server (receiver in the RDMA exchange). denim_ctl parses the rule grammar and installs the rules. It checks the register map version at startup.
…ow much a rule can fire, intention is to be able to "impact" just a selected portion of traffic. Register map goes to 1.3.
RaresToader
marked this pull request as ready for review
September 8, 2026 10:27
Splitting the sniffer block to make room for the DENIM interface declarations reopened the second half with a bare `en_sniffer` guard, dropping the `sniffer_vfpga_id == c_reg` half of the condition. The port list and the interface declarations still carry the full guard, so for any vFPGA that is not the sniffer's, the wrapper was emitted with the 13 sniffer/filter_config assigns but neither the ports nor the interfaces they refer to. Every identifier on both sides of those assignments is then undeclared and elaboration fails. Only reachable with EN_SNIFFER=1 and N_REGIONS > 1: example 11 ships with a single region, where the dropped condition is trivially true, and the DENIM example sets EN_SNIFFER=0, so no shipped configuration hits it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README documented the rule language and denim_ctl thoroughly but
never covered the Coyote-side mechanisms the example demonstrates, which
is what the other example READMEs are for.
Adds two short subsections with verbatim snippets from the source:
- how a service is spliced into the shell's RX stream in
network_stack.sv, and why the insertion sits upstream of the
sniffer tap
- how the rule table crosses aclk -> nclk via meta_ccross, why the
config interface is 72 bits, and why reads are served from a
shadow register array in denim_slv rather than crossing back
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DENIM is an in-path impairment module for RoCE v2 traffic, sitting in the service layer
(
nclkdomain) so that experiments can inject deterministic network events at the endpoint.A stateless filter matches the first 64B beat of each frame against 8 rule slots and emits a
verdict tag
{valid, rule_id, effect_mask}. Chained effect blocks (ECN / drop / delay) act onthe tag only. Rules are written as
<cond>[, <cond>...] : <effect>[, <effect>], e.g.qpn 3, psn 50-150 : ecn, delay 1us.Two constructs make impairments repeatable across runs:
psn +Kaddresses packets byposition in the flow rather than by absolute PSN (the base is captured in hardware from the
connection's first packet), and
once/shots Nbound how many packets a rule may act on,so a rule can inject e.g. transient loss.
Everything is behind
EN_DENIMand off by default. Includes a control vFPGA CSR slave,denim_ctlfor driving it from software, andexamples/13_denimwith documentation.Type of change
Tests & Results
Simulation. 15 xsim testbenches, covering field extraction, match priority, effect chaining, relative-PSN capture,
shot limits, delay FIFO overflow, and the CSR path. The rule parser has its own host-side unit tests.
Timing. Full shell build for
u55c: WNS +0.046 ns, WHS +0.019 ns, 0 failingendpoints of ~1.5M.
Hardware E2E tests. Two Alveo U55C nodes,
09_perf_rdmaas the traffic source, DENIM on the receivingnode.
Not yet covered: TODO PCAP level verification
IMPORTANT
also worked well. Can only vouch for builds generated with these two Vivado versions.
Checklist