Fix mistake in Taylor correction.
This improves accuracy, but there is probably room for further improvement by avoiding accumulation of rounding errors.
This commit is contained in:
parent
7de76c6696
commit
12b896c2df
|
@ -192,8 +192,8 @@ begin
|
||||||
-- Keep phase remainder and work on multiplication by Pi/2.
|
-- Keep phase remainder and work on multiplication by Pi/2.
|
||||||
r2_rphase <= r1_rphase;
|
r2_rphase <= r1_rphase;
|
||||||
r2_dphase <= r1_dphase +
|
r2_dphase <= r1_dphase +
|
||||||
resize(r1_dphase(dphase_bits-1 downto 6), dphase_bits) +
|
resize(r1_dphase(dphase_bits-1 downto 7), dphase_bits) +
|
||||||
signed("0" & r1_dphase(5 downto 5));
|
signed("0" & r1_dphase(6 downto 6));
|
||||||
|
|
||||||
-- Table lookup.
|
-- Table lookup.
|
||||||
r2_sin_data <= unsigned(lookup_table(to_integer(r1_sin_addr)));
|
r2_sin_data <= unsigned(lookup_table(to_integer(r1_sin_addr)));
|
||||||
|
|
Loading…
Reference in New Issue