File: ctrlport_pkg.sv

package info (click to toggle)
uhd 4.9.0.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184,180 kB
  • sloc: cpp: 262,887; python: 112,011; ansic: 102,670; vhdl: 57,031; tcl: 19,924; xml: 8,581; makefile: 3,028; sh: 2,812; pascal: 230; javascript: 120; csh: 94; asm: 20; perl: 11
file content (47 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Copyright 2024 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//
// Package: ctrlport_pkg
//
// Description:
//
//   Defines constants for the control-port interface.
//

package ctrlport_pkg;

  `include "ctrlport.vh"

  // typedef for status
  typedef enum logic [1:0] {
    STS_OKAY    = CTRL_STS_OKAY,
    STS_CMDERR  = CTRL_STS_CMDERR,
    STS_TSERR   = CTRL_STS_TSERR,
    STS_WARNING = CTRL_STS_WARNING } ctrlport_status_t;

  // Defining signals as defined in Table 18 of RFNoC Specification v.1.0.1.
  // request related signals
  typedef struct packed {
    logic                           wr;
    logic                           rd;
    logic [    CTRLPORT_ADDR_W-1:0] addr;
    logic [  CTRLPORT_PORTID_W-1:0] port_id;
    logic [CTRLPORT_REM_EPID_W-1:0] remote_epid;
    logic [  CTRLPORT_PORTID_W-1:0] remote_portid;
    logic [    CTRLPORT_DATA_W-1:0] data;
    logic [ CTRLPORT_BYTE_EN_W-1:0] byte_en;
    logic                           has_time;
    // signal time - renamed to timestamp to avoid conflict with SystemVerilog keyword time
    logic [    CTRLPORT_TIME_W-1:0] timestamp;
  } ctrlport_request_t;

  // response related signals
  typedef struct packed {
    logic                       ack;
    ctrlport_status_t           status;
    logic [CTRLPORT_DATA_W-1:0] data;
  } ctrlport_response_t;

endpackage : ctrlport_pkg