~ubuntu-branches/ubuntu/utopic/uhd/utopic

« back to all changes in this revision

Viewing changes to host/lib/usrp/x300/x300_regs.hpp

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2014-07-01 22:34:32 UTC
  • mfrom: (9.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20140701223432-beg73ip3q8b3lgeg
Tags: 3.7.1-2
* Apply maint branch fixes through release_003_007_001-49-gdf4cf6d
* Fix B2xx udev rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#ifndef INCLUDED_X300_REGS_HPP
19
19
#define INCLUDED_X300_REGS_HPP
20
20
 
 
21
#include <stdint.h>
21
22
#include <boost/cstdint.hpp>
22
23
 
23
24
#define TOREG(x) ((x)*4)
124
125
static const uint32_t FPGA_CNTR_LO_REG      = PCIE_FPGA_REG(0x0004);
125
126
static const uint32_t FPGA_CNTR_HI_REG      = PCIE_FPGA_REG(0x0008);
126
127
static const uint32_t FPGA_CNTR_FREQ_REG    = PCIE_FPGA_REG(0x000C);
 
128
static const uint32_t FPGA_STATUS_REG       = PCIE_FPGA_REG(0x0020);
127
129
static const uint32_t FPGA_USR_SIG_REG_BASE = PCIE_FPGA_REG(0x0030);
128
130
static const uint32_t FPGA_USR_SIG_REG_SIZE = 16;
129
131
 
 
132
static const uint32_t FPGA_STATUS_DMA_ACTIVE_MASK = 0x3F3F0000;
 
133
 
130
134
static const uint32_t PCIE_TX_DMA_REG_BASE  = PCIE_FPGA_REG(0x0200);
131
135
static const uint32_t PCIE_RX_DMA_REG_BASE  = PCIE_FPGA_REG(0x0400);
132
136
 
139
143
#define PCIE_TX_DMA_REG(REG, CHAN)          (PCIE_TX_DMA_REG_BASE + (CHAN*DMA_REG_GRP_SIZE) + REG)
140
144
#define PCIE_RX_DMA_REG(REG, CHAN)          (PCIE_RX_DMA_REG_BASE + (CHAN*DMA_REG_GRP_SIZE) + REG)
141
145
 
142
 
static const uint32_t DMA_CTRL_RESET        = 1;
 
146
static const uint32_t DMA_CTRL_DISABLED     = 0x00000000;
 
147
static const uint32_t DMA_CTRL_ENABLED      = 0x00000002;
 
148
static const uint32_t DMA_CTRL_CLEAR_STB    = 0x00000001;
143
149
static const uint32_t DMA_CTRL_SW_BUF_U64   = (3 << 4);
144
150
static const uint32_t DMA_CTRL_SW_BUF_U32   = (2 << 4);
145
151
static const uint32_t DMA_CTRL_SW_BUF_U16   = (1 << 4);
146
152
static const uint32_t DMA_CTRL_SW_BUF_U8    = (0 << 4);
147
 
static const uint32_t DMA_STATUS_ERROR      = 1;
 
153
static const uint32_t DMA_STATUS_ERROR      = 0x00000001;
 
154
static const uint32_t DMA_STATUS_BUSY       = 0x00000002;
148
155
 
149
156
static const uint32_t PCIE_ROUTER_REG_BASE  = PCIE_FPGA_REG(0x0500);
150
157
#define PCIE_ROUTER_REG(X)                  (PCIE_ROUTER_REG_BASE + X)