Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Models

Models are the constructed from components and resources and run by the gwr_engine.

The gwr_models library provides a collection of connectable models to be used when building larger models and simulations. The following is a brief and not exhaustive list of the models provided.

Frames

Many systems are based on frames (packets) of different forms.

Memory Access

Memory traffic is represented with MemoryAccess, which carries routing, access type, payload size, and protocol overhead.

Ethernet Frame

The EthernetFrame represents a frame that looks like the one defined in the standards.

Flow Controlled Pipeline

A flow controlled pipeline represents a low-level hardware component which can be used to moved data in a system. It comprises a buffer that will hold data received from the sender and a credit-based mechanism for ensuring the buffer doesn’t overflow.

Interfaces: rx: input port, tx: output port

The EthernetLink is effectively a bi-directional set of connections that have similar properties to a connection over an Ethernet link.

Interfaces: rx_a, rx_b : input ports, tx_a, tx_b: output ports

Memory

A model of a memory to handle read/write accesses.

Interfaces: rx: input port, tx: output port

Cache

A whole-line n-way set associative cache with bounded parent requests and line fills. The implementation and constructors live in cache; ordinary packets need only implement CacheAccess.

In coherent and incoherent caches, parents completed by memory responses use a separate return worker and retain admission through response service. Outstanding fills can finish ingress while the requesting device is blocked, with completed parents bounded by the admission limit. Forwarded nonposted-write acknowledgements also use the return worker; their ingress waits for completion, allowing at most one extra queued response.

Cache::new_coherent_and_register additionally takes a CoherenceConfig and requires CoherentAccess. The same cache core then models directory-managed shared/exclusive permissions, dirty writeback, invalidations, and scoped barriers. cache::coherency_manager provides the directory endpoint. Cache and manager line sizes must match; platform construction validates this relationship.

Barriers carry a destination address. When coherence is enabled, the cache drains its prior requests, then forwards the barrier to the coherence manager responsible for that address, as selected by the manager map in CoherenceConfig. The cache waits for that manager’s acknowledgement before completing the barrier and processing later device requests. The selected manager drains its prior operations across all address ranges managed by it. A barrier is scoped to the receiving cache and the selected manager; it is not broadcast to other managers and does not flush resident dirty cache lines.

Coherence managers process work without a clock-rate limit by default. Use CoherencyManagerConfig::with_operations_per_tick(n) to set a positive shared processing budget. Handling an incoming packet, starting a queued request, or completing a barrier each consumes one operation. Requests that initially wait for a line or barrier consume another operation when they are replayed. The budget resets each clock tick; unused operations do not accumulate.

Responses, writebacks, and invalidation acknowledgements have priority over ordinary requests and queued replay work, but consume the same budget. Ingress and output run independently of processing, so output backpressure does not prevent the manager from handling protocol traffic. The limit controls directory processing, not queue capacity or packet bandwidth. Generating several invalidations is one processing operation; fabric bandwidth limits their transmission.

Interfaces:

Ring Node

A model of a node that can sit in a ring communication topology.

Interfaces:

Fabric

A model of a two-dimensional interconnect fabric. It is provided in both functional and routed implementations that provide the same interfaces but trade off model accuracy vs run-time performance.

**Interfaces:**gwr-