FPGA 19 - AMD Xilinx VHDL CORDIC Sine/Cosine generator

  Рет қаралды 3,616

FPGA Revolution

FPGA Revolution

Күн бұрын

Пікірлер: 14
@FPGARevolution
@FPGARevolution Жыл бұрын
This episode gives you a quick snapshot into how sine and cosine waveforms can be generated. For those of you that's working on incorporating this into your own projects, please make sure to look at the DSP episode 24 also as the testbench in that episode has a hook in the phase sweep to properly handle the transition from +pi into -pi region keeping the phase jump constant during the transition. In this episode, the transition only guarantees the rotation to continue in the same direction after the transition cross-over. kzbin.info/www/bejne/a5PTZZyPf5pkp68 Also for those asking for the specific formula for the frequency of the synthesized waveform. The resulting synthesized frequency is a function of the sampling frequency, the phase jump and the phase resolution (total number of steps). The phase resolution is fixed in this IP and the total number of steps is 2*PI or 51,472. The equation for synthesizing the exact frequency is Fout = (phase_jump * sampling_frequency) / 51,472 so plug in your required Fout and tune the two parameters in the numerator accordingly.
@FPGAPS
@FPGAPS 3 ай бұрын
Great job! we can also use Ramp function + Lookup table (LUT) to generate the Sin & Cos values.
@oliverlabert
@oliverlabert Жыл бұрын
thanks!
@nikolaykostishen6402
@nikolaykostishen6402 Жыл бұрын
Nice! Thanks!👍👍👍
@FPGARevolution
@FPGARevolution Жыл бұрын
You're welcome!
@testfpga-t7p
@testfpga-t7p Жыл бұрын
Hii, nice video, thanks. I change the logic of rst. i made it active low rst I got the glitch at sincos_tvalid after that sincos_tvalid continuously high. why ? how to calculate the frequency of sin wave. how to achieve sin of different frequency.
@FPGARevolution
@FPGARevolution Жыл бұрын
You're welcome. When you apply your reset sequence, make sure to carefully inspect your logic to make sure it properly handles the control including initial condition and see if any glitch makes sense as a result of that. Regarding frequency of the sine wave, try tuning the sampling frequency and the phase and you will see how the frequency of the sine wave varies accordingly.
@nashatali6030
@nashatali6030 Жыл бұрын
​hi thanks for the video can you tell me exactly what parameters to change in the code to achieve my desired frequency of the sine wave and is their any equation to use @@FPGARevolution
@testfpga-t7p
@testfpga-t7p Жыл бұрын
Hii, i want to achieve the frequency of sinwave 2khz, how can i achieve it ? further i am passing the output of cordic ip i.e sin to dac. how to control sin value its change very fast due to some value missing at dac output ? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity sincos is port ( clk : in std_logic; cos : out std_logic_vector(15 downto 0); sin : out std_logic_vector(15 downto 0); sincos_tvalid : out std_logic ); end entity sincos; architecture arch of sincos is constant clk_period : time := 10 ns; constant PI_POS : signed(15 downto 0) := "0110010010001000"; constant PI_NEG : signed(15 downto 0) := "1001101101111000"; constant phase_inc : integer := 256; signal rst : std_logic := '1'; signal phase_1 : signed(15 downto 0); signal phase_tvalid_1 : std_logic; component cordic_0 is port ( aclk : in std_logic; s_axis_phase_tvalid : in std_logic; s_axis_phase_tdata : in std_logic_vector(15 downto 0); m_axis_dout_tvalid : out std_logic; m_axis_dout_tdata : out std_logic_vector(31 downto 0) ); end component cordic_0; begin process(clK) begin if rst sin ); end architecture arch; @@FPGARevolution
@FPGARevolution
@FPGARevolution Жыл бұрын
You're welcome. Take a look at the pinned comment above.
@FPGARevolution
@FPGARevolution Жыл бұрын
@@testfpga-t7p If you want to interface the output of your synthesized sampled waveform to the DAC, you need to think about the synchronization or the relationship of the sampling frequency between your DAC and your waveform generation. When would you expect to have a sample from your waveform generation and when would you expect your DAC to grab a sample and output it ...
@SsDinesh-t2w
@SsDinesh-t2w 9 ай бұрын
Code is not running
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 268 М.
Lp. Точка Невозврата #12 ИСТОРИЯ ПРОШЛОГО [Мир Архей]• Майнкрафт
30:18
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
FPGA 18 - AMD Xilinx Verilog CORDIC Sine/Cosine generator
4:18
FPGA Revolution
Рет қаралды 6 М.
Beating Moore's Law: This photonic computer is 10X faster than NVIDIA GPUs using 90% less energy
17:03
John Koetsier (tech, AI, & the future)
Рет қаралды 549 М.
FPGA DSP: FIR Filter IP with DDS Compiler in Vivado
8:25
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 239 М.
A Graphene Transistor Breakthrough?
15:23
Asianometry
Рет қаралды 294 М.
How this tiny Motor Survived 1.6 BILLION SPINS
12:33
Carl Bugeja
Рет қаралды 523 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН