USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
defaults.hpp
Go to the documentation of this file.
1//
2// Copyright 2014 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4// Copyright 2020 Ettus Research, a National Instruments Brand
5//
6// SPDX-License-Identifier: GPL-3.0-or-later
7//
8
9#pragma once
10
11#include <string>
12
13namespace uhd { namespace rfnoc {
14
15// FIXME come up with a better place for this
16static const size_t CHDR_MAX_LEN_HDR = 16;
17
18static const std::string CLOCK_KEY_GRAPH("__graph__");
19
20static const std::string PROP_KEY_DECIM("decim");
21static const std::string PROP_KEY_INTERP("interp");
22static const std::string PROP_KEY_SAMP_RATE("samp_rate");
23static const std::string PROP_KEY_SCALING("scaling");
24static const std::string PROP_KEY_TYPE("type");
25static const std::string PROP_KEY_FREQ("freq");
26static const std::string PROP_KEY_TICK_RATE("tick_rate");
27static const std::string PROP_KEY_SPP("spp");
28static const std::string PROP_KEY_MTU("mtu");
29
30static const std::string NODE_ID_SEP("SEP");
31
32using io_type_t = std::string;
33static const io_type_t IO_TYPE_S16 = "s16";
34static const io_type_t IO_TYPE_SC16 = "sc16";
35static const io_type_t IO_TYPE_U8 = "u8";
36
37static const std::string ACTION_KEY_STREAM_CMD("stream_cmd");
38static const std::string ACTION_KEY_RX_EVENT("rx_event");
39static const std::string ACTION_KEY_RX_RESTART_REQ("restart_request");
40static const std::string ACTION_KEY_TX_EVENT("tx_event");
41
43static const std::string DEFAULT_BLOCK_NAME = "Block";
45static const uint32_t DEFAULT_NOC_ID = 0xFFFFFFFF;
46static const double DEFAULT_TICK_RATE = 1.0;
47// Whenever we need a default spp value use this, unless there are some
48// block/device-specific constraints. It will keep the frame size below 1500.
49static const int DEFAULT_SPP = 1996;
50
54using noc_id_t = uint32_t;
55
56/*** Device Identifiers ******************************************************/
58using device_type_t = uint16_t;
59// first nibble for device family (E = E, N = 1, X = A), remaining three nibbles
60// for device number
62static const device_type_t ANY_DEVICE = 0xFFFF;
64static const device_type_t E300 = 0xE300;
66static const device_type_t E310 = 0xE310;
68static const device_type_t E320 = 0xE320;
70static const device_type_t N300 = 0x1300;
72static const device_type_t N320 = 0x1320;
74static const device_type_t X300 = 0xA300;
76static const device_type_t X400 = 0xA400;
77
78// block identifiers
79static const noc_id_t ADDSUB_BLOCK = 0xADD00000;
80static const noc_id_t DUC_BLOCK = 0xD0C00000;
81static const noc_id_t DDC_BLOCK = 0xDDC00000;
82static const noc_id_t FFT_BLOCK = 0xFF700000;
83static const noc_id_t FIR_FILTER_BLOCK = 0xF1120000;
84static const noc_id_t FOSPHOR_BLOCK = 0x666F0000;
85static const noc_id_t LOGPWR_BLOCK = 0x4C500000;
86static const noc_id_t KEEP_ONE_IN_N_BLOCK = 0x02460000;
87static const noc_id_t MOVING_AVERAGE_BLOCK = 0xAAD20000;
88static const noc_id_t RADIO_BLOCK = 0x12AD1000;
89static const noc_id_t REPLAY_BLOCK = 0x4E91A000;
90static const noc_id_t SIGGEN_BLOCK = 0x51663110;
91static const noc_id_t SPLIT_STREAM_BLOCK = 0x57570000;
92static const noc_id_t SWITCHBOARD_BLOCK = 0xBE110000;
93static const noc_id_t VECTOR_IIR_BLOCK = 0x11120000;
94static const noc_id_t WINDOW_BLOCK = 0xD0530000;
95
96}} // namespace uhd::rfnoc
uint16_t device_type_t
Device Type.
Definition: defaults.hpp:58
uint32_t noc_id_t
Definition: defaults.hpp:54
std::string io_type_t
Definition: defaults.hpp:32
Definition: build_info.hpp:12