[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 21/148: put 64 bit timer for vita49 on the
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 21/148: put 64 bit timer for vita49 on the settings bus |
Date: |
Mon, 15 Aug 2016 00:47:20 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.
commit 240d7c5c8e8f1722abb0baffecf0f007576a00aa
Author: Matt Ettus <address@hidden>
Date: Thu Nov 5 13:41:20 2009 -0800
put 64 bit timer for vita49 on the settings bus
---
usrp2/firmware/lib/memory_map.h | 12 +++++++++++-
usrp2/fpga/timing/time_64bit.v | 12 +++++-------
usrp2/fpga/top/u2_core/u2_core.v | 12 +++++++++++-
usrp2/fpga/top/u2_rev3/Makefile | 1 +
4 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/usrp2/firmware/lib/memory_map.h b/usrp2/firmware/lib/memory_map.h
index 0d0cf04..b049371 100644
--- a/usrp2/firmware/lib/memory_map.h
+++ b/usrp2/firmware/lib/memory_map.h
@@ -297,7 +297,7 @@ hwconfig_wishbone_divisor(void)
#define BUFFER_POOL_CTRL_BASE 0xD500
#define DSP_TX_BASE 0xD600
#define DSP_RX_BASE 0xD680
-
+#define TIME64 0xD700
#define LAST_SETTING_REG 0xD7FC // last valid setting register
// --- buffer pool control regs ---
@@ -508,6 +508,16 @@ typedef struct {
(((num_lines) << 9) | ((lines_per_frame) & 0x1ff) \
| (((now) & 0x1) << 31) | (((chain) & 0x1) << 30))
+// ----------------------------------------------------------------
+// VITA49 64 bit time
+typedef struct {
+ volatile uint32_t secs; // value to set absolute secs to on next PPS
+ volatile uint32_t ticks; // value to set absolute ticks to on next PPS
+} sr_time64_t;
+
+#define sr_time64 ((sr_time64_t *) TIME64
+
+
/*
* --- ethernet tx protocol engine regs (write only) ---
*
diff --git a/usrp2/fpga/timing/time_64bit.v b/usrp2/fpga/timing/time_64bit.v
index c0a846e..ab0c12b 100644
--- a/usrp2/fpga/timing/time_64bit.v
+++ b/usrp2/fpga/timing/time_64bit.v
@@ -9,10 +9,13 @@ module time_64bit
output [63:0] vita_time
);
- localparam NEXT_TICKS = 0;
- localparam NEXT_SECS = 1;
+ localparam NEXT_TICKS = 1;
+ localparam NEXT_SECS = 0;
localparam ROLLOVER = TICKS_PER_SEC - 1;
+ reg [31:0] seconds;
+ reg [31:0] ticks;
+ wire end_of_second;
assign vita_time = {seconds,ticks};
wire [31:0] next_ticks_preset;
@@ -28,11 +31,6 @@ module time_64bit
(.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out(next_seconds_preset),.changed(set_on_pps_trig));
- reg [31:0] seconds;
- reg [31:0] ticks;
-
- wire end_of_second;
-
always @(posedge clk)
if(rst)
set_on_next_pps <= 0;
diff --git a/usrp2/fpga/top/u2_core/u2_core.v b/usrp2/fpga/top/u2_core/u2_core.v
old mode 100755
new mode 100644
index fd17a10..5b272c3
--- a/usrp2/fpga/top/u2_core/u2_core.v
+++ b/usrp2/fpga/top/u2_core/u2_core.v
@@ -135,6 +135,8 @@ module u2_core
input sim_mode,
input [3:0] clock_divider
);
+
+ localparam SR_TIME64 = 192;
wire [7:0] set_addr;
wire [31:0] set_data;
@@ -159,6 +161,7 @@ module u2_core
wire serdes_link_up;
wire epoch;
wire [31:0] irq;
+ wire [63:0] vita_time;
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Wishbone Single Master INTERCON
@@ -560,7 +563,7 @@ module u2_core
.fifo_occupied(dsp_rx_occ),.fifo_full(dsp_rx_full),.fifo_empty(dsp_rx_empty),
.debug_rx(debug_rx) );
- // dummy_rx dsp_core_rx
+ // dumkmy_rx dsp_core_rx
dsp_core_rx dsp_core_rx
(.clk(dsp_clk),.rst(dsp_rst),
.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data),
@@ -631,6 +634,13 @@ module u2_core
assign RAM_CE1n = 0;
assign RAM_D[17:16] = 2'bzz;
+ // /////////////////////////////////////////////////////////////////////////
+ // VITA Timing
+
+ time_64bit #(.TICKS_PER_SEC(32'd100000000),.BASE(SR_TIME64)) time_64bit
+ (.clk(dsp_clk), .rst(dsp_rst), .set_stb(set_stb), .set_addr(set_addr),
.set_data(set_data),
+ .pps(pps_o), .vita_time(vita_time));
+
//
/////////////////////////////////////////////////////////////////////////////////////////
// Debug Pins
diff --git a/usrp2/fpga/top/u2_rev3/Makefile b/usrp2/fpga/top/u2_rev3/Makefile
index 4358d7c..8b18550 100644
--- a/usrp2/fpga/top/u2_rev3/Makefile
+++ b/usrp2/fpga/top/u2_rev3/Makefile
@@ -171,6 +171,7 @@ serdes/serdes_fc_rx.v \
serdes/serdes_fc_tx.v \
serdes/serdes_rx.v \
serdes/serdes_tx.v \
+timing/time_64bit.v \
timing/time_receiver.v \
timing/time_sender.v \
timing/time_sync.v \
- [Commit-gnuradio] [gnuradio] 19/148: VITA49 rx (and tx skeleton) copied over from quad radio, (continued)
- [Commit-gnuradio] [gnuradio] 19/148: VITA49 rx (and tx skeleton) copied over from quad radio, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 43/148: minor tweak to transport loop and debug printf for vrt, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 44/148: Removed temporary u2_eth_packet_only_t. Removed the fixed header portion from the u2_eth_packet_t. Removed places in code where control uses the fixed header (always unused 0 for word, and -1 for timestamp). Flagged the fixed header stuff for removal (once we get vrt tx)., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 25/148: cleanup, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 42/148: Created a ring data structure held by the ring. It holds an sbuff and its parsed vrt data (header, payload, and len). The impl data handler parses the packets and enqueues them., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 48/148: Added interrupt call from transport::stop so the recv or callback will throw at interruption points. This fixes the issue where the app would hang in the stop method when exiting (we were hanging here: d_data_pending_cond.wait(l), but now wait throws() and we exit)., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 54/148: flag packets which arrive way too early so the device doesn't sit there forever., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 38/148: rx working with vrt header, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 45/148: Re-implemented find.cc with gruel and eth_ctrl_transport class. Added constructor args to the eth control transport to set the timeout and target for the packet filter., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 49/148: Added read_packet with timeout method to ethernet. Now the control recv can timeout and immediately recv., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 21/148: put 64 bit timer for vita49 on the settings bus,
git <=
- [Commit-gnuradio] [gnuradio] 47/148: Handled the case of short packets in eth data transport by using padding., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 70/148: changed debug pins to see incoming data, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 51/148: progress on vita_tx. it compiles now, need to work on vita_tx_control., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 46/148: Created and used a typedef for a vector of sbuffs. Changed the return type for the transport sendv to bool. Not all transports can return the number of bytes sent, and we only care if the transport succeeded or not. This fixes an issue of the usrp2 impl freezing on close after tx, because the return value from sednv was improperly handled., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 66/148: Merge branch 'vita_rx' of http://gnuradio.org/git/matt into wip/usrp2, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 79/148: cleaned up the main ibs state machine, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 71/148: Merge branch 'vita_rx' of gnuradio.org:matt into vita_rx, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 53/148: very basic packet sending works, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 77/148: Merge branch 'master' of gnuradio.org:gnuradio into vita_rx, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 57/148: Removed the ring buffer from the usrp2 impl., git, 2016/08/14