summaryrefslogtreecommitdiffstats
path: root/sdr_lib/hb_dec.v
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2009-09-24 12:33:22 -0700
committerMatt Ettus <matt@ettus.com>2009-09-24 12:33:22 -0700
commit618ebd292a5b0acf221ef2d4ccf1a19596bc6c86 (patch)
tree2cfa09094702487ab8ad365c940883821dbd5ff4 /sdr_lib/hb_dec.v
parentaa37ca0b3b716e23e51f04b6f199ecacf89fe479 (diff)
downloaduhd-618ebd292a5b0acf221ef2d4ccf1a19596bc6c86.tar.gz
uhd-618ebd292a5b0acf221ef2d4ccf1a19596bc6c86.tar.bz2
uhd-618ebd292a5b0acf221ef2d4ccf1a19596bc6c86.zip
Synchronize the internal phase of the halfband filters to the start of the "run" signal. This is important for MIMO. Bug reported by Christoph Hein and Hanwen .
Diffstat (limited to 'sdr_lib/hb_dec.v')
-rw-r--r--sdr_lib/hb_dec.v5
1 files changed, 3 insertions, 2 deletions
diff --git a/sdr_lib/hb_dec.v b/sdr_lib/hb_dec.v
index b256eb57f..8fb5ba222 100644
--- a/sdr_lib/hb_dec.v
+++ b/sdr_lib/hb_dec.v
@@ -9,6 +9,7 @@ module hb_dec
(input clk,
input rst,
input bypass,
+ input run,
input [8:0] cpi, // Clocks per input -- equal to the decimation ratio ahead of this block
input stb_in,
input [IWIDTH-1:0] data_in,
@@ -25,7 +26,7 @@ module hb_dec
assign do_mult = 1;
always @(posedge clk)
- if(rst)
+ if(rst | ~run)
odd <= 0;
else if(stb_in)
odd <= ~odd;
@@ -34,7 +35,7 @@ module hb_dec
assign write_even = stb_in & ~odd;
always @(posedge clk)
- if(rst)
+ if(rst | ~run)
phase <= 0;
else if(stb_in & odd)
phase <= 1;