|
CocoTB Framework · Verification Infrastructure for RTL Testing GitHub · Documentation Index · MIT License |
← Back to Components Index | CocoTBFramework Index | Main Index
AXIS4 Components¶
Everything you need to verify an AXI4-Stream interface: drive it, sink it, watch it. The components sit on the GAXI layer, so the heavy lifting — signal resolution, pipelines, statistics — is shared with the rest of the framework, and what's here is the stream-specific part: frames, TLAST, backpressure, and sidebands.
Component Overview¶
The AXIS4 family:
Core Components¶
- AXISMaster - Stream source: single beats, lists, or whole frames
- AXISSlave - Stream sink with backpressure control and frame tracking
- AXISMonitor - Protocol compliance monitoring and analysis. Extends
GAXIMonitorand delegates all sampling to its receive loop; see the overview for the_build_packet/_finish_packetextension points. (Dedicated page planned.) - AXISPacket - The beat object: field access, byte packing, TLAST queries
Configuration System¶
- AXISFieldConfigs - Builds the field configuration that keeps BFMs and RTL in agreement on signal widths
Key Features¶
Stream Protocol Specialization¶
- Single channel (T-channel) focus with TVALID/TREADY handshaking
- Native packet boundary management with TLAST signaling
- Advanced flow control and backpressure handling
- Complete sideband signal support (TID, TDEST, TUSER, TSTRB)
GAXI Infrastructure Integration¶
- Unified field configuration system
- Memory model integration for data verification
- Statistics and performance metrics maintained by the pipelines
- Multi-level debugging and transaction logging
- Automatic signal resolution across naming conventions
Advanced Capabilities¶
- Multi-stream support with TID-based routing
- Real-time performance monitoring and analysis
- Protocol compliance verification
- Configurable timing randomization
- Memory-efficient streaming for large datasets
Getting Started¶
from CocoTBFramework.components.axis4 import (
AXISFieldConfigs, AXISMaster, AXISMonitor, AXISPacket, AXISSlave,
)
# Configure stream properties
config = AXISFieldConfigs.create_t_field_config(
data_width=32, id_width=8, dest_width=4)
# Create AXIS components
master = AXISMaster(dut, "StreamSource", "m_axis_", clk, field_config=config)
slave = AXISSlave(dut, "StreamSink", "s_axis_", clk, field_config=config)
monitor = AXISMonitor(dut, "StreamMon", "s_axis_", clk, field_config=config)
# Generate and send packets
packet = AXISPacket(field_config=master.field_config)
packet.data = 0x12345678
packet.last = 1
packet.id = 5
packet.dest = 2
await master.send_packet(packet)
Documentation Structure¶
- Overview - Architecture and how the pieces fit together
- Component References - Per-class details, linked above
- Usage Examples (documentation planned) - Practical implementation patterns and scenarios
- Configuration Guide (documentation planned) - Field configuration and customization options
Start with the overview if you want the architecture, or jump straight to the class you need — each page stands on its own.