commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8347 - usrp2/trunk/firmware/include


From: eb
Subject: [Commit-gnuradio] r8347 - usrp2/trunk/firmware/include
Date: Fri, 9 May 2008 12:35:51 -0600 (MDT)

Author: eb
Date: 2008-05-09 12:35:51 -0600 (Fri, 09 May 2008)
New Revision: 8347

Modified:
   usrp2/trunk/firmware/include/usrp2_eth_packet.h
Log:
work-in-progress

Modified: usrp2/trunk/firmware/include/usrp2_eth_packet.h
===================================================================
--- usrp2/trunk/firmware/include/usrp2_eth_packet.h     2008-05-09 07:17:01 UTC 
(rev 8346)
+++ usrp2/trunk/firmware/include/usrp2_eth_packet.h     2008-05-09 18:35:51 UTC 
(rev 8347)
@@ -165,7 +165,10 @@
 #define OP_CONFIG_TX          10
 #define        OP_READ_TIME           11       // What time is it? (100 MHz 
counter)
 #define        OP_READ_TIME_REPLY     12       // This time.
+#define        OP_CONFIG_RX_V2        13
+#define        OP_CONFIG_TX_V2        14
 
+
 typedef struct {
   uint8_t      opcode;
   uint8_t      len;
@@ -181,7 +184,7 @@
 typedef struct {
   uint8_t      opcode;
   uint8_t      len;
-  uint16_t     rid_mbz;
+  uint16_t     rid_ok;                 // low bit is "OK"
   u2_mac_addr_t        addr;
   uint16_t     hw_rev;
   uint8_t      fpga_md5sum[16];
@@ -236,6 +239,68 @@
 } op_read_time_reply_t;
 
 
+/*
+ * Configure the receiver.
+ */
+typedef struct {
+  uint8_t      opcode;
+  uint8_t      len;
+  uint16_t     rid_mbz;
+  // bitmask indicating which of the following fields are valid
+  uint16_t     valid;
+  uint16_t     gain;           // fxpt_db (Q9.7)
+  uint32_t     target_freq_hi; // high 32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     target_freq_lo; // low  32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     interp;         // desired interpolation factor (NOT -1)
+  uint32_t     scale_iq;       // (scale_i << 16) | scale_q [16.0 format]
+} op_config_rx_v2_t;
+
+// bitmask for "valid" field.  If the bit is set, there's
+// meaningful data in the corresonding field.
+
+#define        CFGV_GAIN               0x0001  // gain field is valid
+#define        CFGV_FREQ               0x0002  // target_freq field is valid
+#define        CFGV_INTERP_DECIM       0x0004  // interp or decim is valid
+#define        CFGV_SCALE_IQ           0x0008  // scale_iq is valid
+
+/*
+ * Reply to receiver configuration
+ */
+typedef struct {
+  uint8_t      opcode;
+  uint8_t      len;
+  uint16_t     rid_mbz;
+
+  uint16_t     ok;             // config was successful (bool)
+  uint16_t     inverted;       // spectrum is inverted (bool)
+
+  // RF frequency that corresponds to DC in the IF (fxpt_freq)
+  uint32_t     baseband_freq_hi;
+  uint32_t     baseband_freq_lo;
+  // DDC frequency (fxpt_freq)
+  uint32_t     ddc_freq_hi;
+  uint32_t     ddc_freq_lo;
+  // residual frequency (fxpt_freq)
+  uint32_t     residual_freq_hi;
+  uint32_t     residual_freq_lo;
+
+} op_config_rx_v2_reply_t;
+
+typedef struct {
+  uint8_t      opcode;
+  uint8_t      len;
+  uint16_t     rid_mbz;
+  // bitmask indicating which of the following fields are valid
+  uint16_t     valid;
+  uint16_t     gain;           // fxpt_db (Q9.7)
+  uint32_t     freq_hi;        // high 32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     freq_lo;        // low  32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     decim;          // desired decimation factor (NOT -1)
+  uint32_t     scale_iq;       // (scale_i << 16) | scale_q [16.0 format]
+} op_config_tx_v2_t;
+
+
+
 // union of all of them
 
 typedef union {
@@ -248,6 +313,8 @@
   op_burn_mac_addr_t   op_burn_mac_addr;
   op_read_time_t       op_read_time;
   op_read_time_reply_t op_read_time_reply;
+  op_config_rx_v2_t    op_config_rx_v2;
+  op_config_tx_v2_t    op_config_tx_v2;
 } u2_subpkt_t;
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]