aboutsummaryrefslogtreecommitdiffstats
path: root/usrp2/sdr_lib/round_sd.v
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2011-10-12 16:11:12 -0700
committerMatt Ettus <matt@ettus.com>2011-10-26 15:57:22 -0700
commit9ac4cb33c830c626311817fb43c210070f518d11 (patch)
tree3033f19fed1b019bc76f4f47a7a7c216712fa197 /usrp2/sdr_lib/round_sd.v
parentdd54bf0909025396986db2c045b0f1da2c4df657 (diff)
downloaduhd-9ac4cb33c830c626311817fb43c210070f518d11.tar.gz
uhd-9ac4cb33c830c626311817fb43c210070f518d11.tar.bz2
uhd-9ac4cb33c830c626311817fb43c210070f518d11.zip
dsp_engine: don't use SD rounding in 8 bit mode, so we can have a flat noise floor.
Diffstat (limited to 'usrp2/sdr_lib/round_sd.v')
-rw-r--r--usrp2/sdr_lib/round_sd.v5
1 files changed, 3 insertions, 2 deletions
diff --git a/usrp2/sdr_lib/round_sd.v b/usrp2/sdr_lib/round_sd.v
index aeeb3502f..94584f6ef 100644
--- a/usrp2/sdr_lib/round_sd.v
+++ b/usrp2/sdr_lib/round_sd.v
@@ -2,7 +2,8 @@
module round_sd
#(parameter WIDTH_IN=18,
- parameter WIDTH_OUT=16)
+ parameter WIDTH_OUT=16,
+ parameter DISABLE_SD=0)
(input clk, input reset,
input [WIDTH_IN-1:0] in, input strobe_in,
output [WIDTH_OUT-1:0] out, output strobe_out);
@@ -15,7 +16,7 @@ module round_sd
sign_extend #(.bits_in(ERR_WIDTH),.bits_out(WIDTH_IN)) ext_err (.in(err), .out(err_ext));
add2_and_clip_reg #(.WIDTH(WIDTH_IN)) add2_and_clip_reg
- (.clk(clk), .rst(reset), .in1(in), .in2(err_ext), .strobe_in(strobe_in), .sum(sum), .strobe_out(strobe_out));
+ (.clk(clk), .rst(reset), .in1(in), .in2((DISABLE_SD == 0) ? err_ext : 0), .strobe_in(strobe_in), .sum(sum), .strobe_out(strobe_out));
round #(.bits_in(WIDTH_IN),.bits_out(WIDTH_OUT)) round_sum (.in(sum), .out(out), .err(err));