blob: b0f83df6009412c78e7446c37b8c9b61aae7281f (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/* -*- c++ -*- */
/*
* Copyright 2007 Free Software Foundation, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INCLUDED_USRP2_FPGA_REGS_H
#define INCLUDED_USSRP2_FPGA_REGS_H
#include "usrp2_cdefs.h"
__U2_BEGIN_DECLS
// ----------------------------------------------------------------
#define DSP_CORE_TX_BASE 128
// DUC center frequency tuning word (phase increment)
#define FR_TX_FREQ_0 (0 + DSP_CORE_TX_BASE)
// I & Q output scaling, 16.0 format ((I_SCALE << 16) | Q_SCALE)
#define FR_TX_SCALE_0 (1 + DSP_CORE_TX_BASE)
// Tx interpolation rate (set to 1 less than desired rate)
#define FR_TX_INTERP_RATE_0 (2 + DSP_CORE_TX_BASE)
// Write 1 (actually anything) to clear tx state
#define FR_TX_CLEAR_STATE_0 (3 + DSP_CORE_TX_BASE)
// ----------------------------------------------------------------
#define DSP_CORE_RX_BASE 160
// DDC center frequency tuning word (phase increment)
#define FR_RX_FREQ_0 (0 + DSP_CORE_RX_BASE)
// I & Q input scaling, 16.0 format ((I_SCALE << 16) | Q_SCALE)
#define FR_RX_SCALE_0 (1 + DSP_CORE_RX_BASE)
// Rx decimation rate (set to 1 less than desired rate)
#define FR_RX_DECIM_RATE_0 (2 + DSP_CORE_RX_BASE)
// The next two registers concatenated are the Rx command register.
//
// Writing FR_RX_TIME_TO_RX_0 writes the concatenated value into the
// cmd queue. Thus, if you're writing both, be sure to write
// FR_RX_QTY_0 first.
//
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | Timestamp |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#define FR_RX_TIME_TO_RX (3 + DSP_CORE_RX_BASE)
// 23-bits 9-bits
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | number_of_lines | lines_per_frame |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#define FR_RX_QTY_0 (4 + DSP_CORE_RX_BASE)
// write a 1 (anything actually) to clear the overrun
#define FR_RX_CLR_OVERRUN_0 (5 + DSP_CORE_RX_BASE)
__U2_END_DECLS
#endif /* INCLUDED_USRP2_FPGA_REGS_H */
|