diff options
author | Josh Blum <josh@joshknows.com> | 2012-03-01 18:33:49 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-16 11:29:17 -0700 |
commit | d6da6c4145d4f7411004e0c8176f029cbe998c09 (patch) | |
tree | f3ccead3e303ead2d3aa9f3a5cff2ec5fe26377c /usrp2/control_lib/settings_readback_bus_fifo_ctrl.v | |
parent | 74ceca35897d46e5a2a314c22259c84ae2201f73 (diff) | |
download | uhd-d6da6c4145d4f7411004e0c8176f029cbe998c09.tar.gz uhd-d6da6c4145d4f7411004e0c8176f029cbe998c09.tar.bz2 uhd-d6da6c4145d4f7411004e0c8176f029cbe998c09.zip |
fifo ctrl: added time compare for timed commands
Diffstat (limited to 'usrp2/control_lib/settings_readback_bus_fifo_ctrl.v')
-rw-r--r-- | usrp2/control_lib/settings_readback_bus_fifo_ctrl.v | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usrp2/control_lib/settings_readback_bus_fifo_ctrl.v b/usrp2/control_lib/settings_readback_bus_fifo_ctrl.v index a83ac8e8c..89efd2203 100644 --- a/usrp2/control_lib/settings_readback_bus_fifo_ctrl.v +++ b/usrp2/control_lib/settings_readback_bus_fifo_ctrl.v @@ -117,7 +117,7 @@ module settings_readback_bus_fifo_ctrl assign in_command_ticks = in_ticks_reg; assign in_command_data = in_data_reg; assign in_command_hdr = in_hdr_reg; - assign in_command_has_time = has_tsf; + assign in_command_has_time = has_tsf_reg; always @(posedge clock) begin if (reset) begin @@ -229,6 +229,11 @@ module settings_readback_bus_fifo_ctrl assign out_command_ready = (out_state == LOAD_CMD); + wire now, early, late, too_early; + time_compare time_compare( + .time_now(vita_time), .trigger_time(out_ticks_reg), + .now(now), .early(early), .late(late), .too_early(too_early)); + always @(posedge clock) begin if (reset) begin out_state <= LOAD_CMD; @@ -246,8 +251,7 @@ module settings_readback_bus_fifo_ctrl end WAIT_CMD: begin - //TODO wait condition here - out_state <= ACTION_EVENT; + if (now || late) out_state <= ACTION_EVENT; end ACTION_EVENT: begin // poking and peeking happens here! |