# Example device configuration with multiple interrupt sources
# This demonstrates a high-performance network adapter with:
# - Multiple RX/TX queues
# - Different interrupt priorities for different sources
# - Interrupt coalescing via timer control

name: active_device_multi_source
device_type: network
device_class: enterprise

identification:
  vendor_id: 0x8086
  device_id: 0x10FB  # Intel 82599 10GbE
  class_code: 0x020000
  revision_id: 0x01

registers:
  command: 0x0407      # Bus master + memory + I/O space enabled
  status: 0x0210       # Capabilities list present
  revision_id: 0x01
  cache_line_size: 0x10
  latency_timer: 0x00
  header_type: 0x00
  bist: 0x00

capabilities:
  max_payload_size: 512
  msi_vectors: 16      # 16 MSI vectors for different queues
  msix_vectors: 0      # Using MSI for this example
  supports_msi: true
  supports_msix: false
  supports_power_management: true
  supports_advanced_error_reporting: true
  link_width: 8
  link_speed: "5.0GT/s"
  
  # Active device configuration with multiple interrupt sources
  active_device:
    enabled: true
    timer_period: 200000     # 200k cycles for interrupt coalescing
    timer_enable: true       # Enable periodic timer for coalescing
    interrupt_mode: "msi"    # Use MSI interrupts
    interrupt_vector: 0      # Starting vector
    priority: 12             # High priority for network
    msi_vector_width: 4      # 2^4 = 16 MSI vectors
    msi_64bit_addr: true     # Use 64-bit MSI addresses
    num_interrupt_sources: 16  # 16 different interrupt sources
    default_source_priority: 8
    
    # Source mapping (conceptual):
    # Source 0: Timer (highest priority)
    # Source 1-4: RX queues 0-3 (high priority)
    # Source 5-8: TX queues 0-3 (medium priority)
    # Source 9: Link status change (medium priority)
    # Source 10: Mailbox/admin queue (low priority)
    # Source 11-15: Reserved/other events
    
    # Additional parameters for template
    num_sources: 16
    device_id: "16'h10FB"
    vendor_id: "16'h8086"
    completer_id: "16'h0100"
    default_priority: 8
    
    # MSI-X parameters (not used but required by template)
    num_msix: 0
    msix_table_bir: 0
    msix_table_offset: 0
    msix_pba_bir: 0
    msix_pba_offset: 0

custom_properties:
  network_specific:
    rx_queues: 4
    tx_queues: 4
    supports_rss: true      # Receive Side Scaling
    supports_vmdq: true     # Virtual Machine Device Queues
    supports_sr_iov: true   # Single Root I/O Virtualization
    max_vfs: 64
    
  interrupt_coalescing:
    rx_usecs: 10           # RX interrupt coalescing time
    tx_usecs: 20           # TX interrupt coalescing time
    rx_frames: 32          # RX frames before interrupt
    tx_frames: 64          # TX frames before interrupt