diff options
| author | Matt Ettus <matt@ettus.com> | 2011-05-13 13:06:16 -0700 |
|---|---|---|
| committer | Matt Ettus <matt@ettus.com> | 2011-06-08 10:52:52 -0700 |
| commit | d35bbdf5a68dd8227354b4352043867f43b20b09 (patch) | |
| tree | c315c90c43019840ce1a41931db0f93eaa7ef445 /usrp2/sdr_lib/small_hb_dec.v | |
| parent | e0654430583fb4980165adbcfd04aa9bf04c429b (diff) | |
| download | uhd-d35bbdf5a68dd8227354b4352043867f43b20b09.tar.gz uhd-d35bbdf5a68dd8227354b4352043867f43b20b09.tar.bz2 uhd-d35bbdf5a68dd8227354b4352043867f43b20b09.zip | |
dsp: increase gain of small_hb_dec because it used to scale down by factor of 2. Clip if needed.
Diffstat (limited to 'usrp2/sdr_lib/small_hb_dec.v')
| -rw-r--r-- | usrp2/sdr_lib/small_hb_dec.v | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usrp2/sdr_lib/small_hb_dec.v b/usrp2/sdr_lib/small_hb_dec.v index ecafc2b68..14e6d755c 100644 --- a/usrp2/sdr_lib/small_hb_dec.v +++ b/usrp2/sdr_lib/small_hb_dec.v @@ -106,18 +106,22 @@ module small_hb_dec else if(go_d3) accum <= accum + {prod}; - wire [17:0] accum_rnd; + wire [18:0] accum_rnd; + wire [17:0] accum_rnd_clip; + wire stb_round; - round_sd #(.WIDTH_IN(36),.WIDTH_OUT(18)) round_acc + round_sd #(.WIDTH_IN(36),.WIDTH_OUT(19)) round_acc (.clk(clk), .reset(rst), .in(accum), .strobe_in(go_d4), .out(accum_rnd), .strobe_out(stb_round)); + clip #(.bits_in(19),.bits_out(18)) clip (.in(accum_rnd), .out(accum_rnd_clip)); + reg [17:0] final_sum; always @(posedge clk) if(bypass) final_sum <= data_in_d1; else if(stb_round) - final_sum <= accum_rnd; + final_sum <= accum_rnd_clip; assign data_out = final_sum; |
