Skip to content

Commit 577f1ec

Browse files
committed
Merge branch 'devel'
2 parents d36ff55 + e86ec02 commit 577f1ec

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

hdl/modules/position_calc/position_calc.vhd

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -351,16 +351,13 @@ architecture rtl of position_calc is
351351
-----------
352352
type t_input is array(3 downto 0) of std_logic_vector(g_input_width-1 downto 0);
353353
signal adc_input : t_input := (others => (others => '0'));
354-
signal adc_input_abs : t_input := (others => (others => '0'));
355354

356355
type t_input_valid is array(3 downto 0) of std_logic;
357356
signal adc_input_valid : t_input_valid := (others => '0');
358-
signal adc_input_abs_valid : t_input_valid := (others => '0');
359357
signal iq_valid : t_input_valid := (others => '0');
360358

361359
type t_input_tag is array(3 downto 0) of std_logic_vector(c_adc_tag_width-1 downto 0);
362360
signal adc_input_tag : t_input_tag := (others => (others => '0'));
363-
signal adc_input_abs_tag : t_input_tag := (others => (others => '0'));
364361

365362
type t_input_tag_en is array(3 downto 0) of std_logic;
366363
signal input_tag_en : t_input_tag_en := (others => '0');
@@ -644,16 +641,6 @@ begin
644641

645642
gen_without_downconv : if (not g_with_downconv) generate
646643

647-
-- With no down-conversion (no CORDIC for coordinate conversion)
648-
-- we might have negative amplitudes and mis-representation will occur.
649-
--
650-
-- To fix that, we must take either the absolute value of output of the
651-
-- filters or take the absolute value before the first filter. Here we
652-
-- have opted for the primer.
653-
adc_input_abs(chan) <= std_logic_vector(abs(signed(adc_input(chan))));
654-
adc_input_abs_valid(chan) <= adc_input_valid(chan);
655-
adc_input_abs_tag(chan) <= adc_input_tag(chan);
656-
657644
cmp_tbt_cic : cic_dyn
658645
generic map (
659646
g_input_width => g_input_width,
@@ -675,8 +662,8 @@ begin
675662
-- rate, so we don't have to
676663
-- change them downstream
677664
ce_out_i => ce_tbt_cordic(chan),
678-
valid_i => adc_input_abs_valid(chan),
679-
data_i => adc_input_abs(chan),
665+
valid_i => adc_input_valid(chan),
666+
data_i => adc_input(chan),
680667
ratio_i => c_tbt_ratio_slv,
681668
data_tag_i => tbt_tag_i,
682669
data_tag_en_i => tbt_tag_en_i,
@@ -711,9 +698,9 @@ begin
711698
rst_i => rst_i,
712699
ce_i => ce_adc(chan),
713700
ce_out_i => ce_fofb_cordic(chan),
714-
valid_i => adc_input_abs_valid(chan),
715-
data_i => adc_input_abs(chan),
716-
data_tag_i => adc_input_abs_tag(chan),
701+
valid_i => adc_input_valid(chan),
702+
data_i => adc_input(chan),
703+
data_tag_i => adc_input_tag(chan),
717704
-- Don't use CIC synchronization feature
718705
data_tag_en_i => '0',
719706
data_mask_num_samples_beg_i => (others => '0'),

0 commit comments

Comments
 (0)