Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

sine wave with different frequency using FPGA

Status
Not open for further replies.

Raviraj Sarje

Newbie level 1
Joined
Mar 20, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
hello,
am working on a project waveform generation using fpga , i did sine wave with 1k freq(verilog, vhdl) but now i required sine wave with freq. upto 400khz plz gimmi some tips.
 

Hi!

U want a sine wave generator, with switchable (adjustable) frequency? If this is the case, I'm doing similar project right now.
What technic do u used for sine gen? Can u post your code?

In most sine generators, they using a "base" frequency, so u will need an adjustable clock divider to supply adjustable base frequency to sine gen.
 

I'm using an iteration based code, it's iterates trough the values of 1/4 of a sine wave. - just in my case, I rewriteing the code for 0 to 3.3V output.
 

It's a very "basic", fixed frequency generator. If you want to do anything with variable frequency, you should really learn about the DDS concept mentioned by Ryan. You'll also find various previous edaboard threads related to the topic.
 

If you use Xilinx device, I would start from here: **broken link removed** . This IP is available in Xilinx Core Generator tool.

hello,
am working on a project waveform generation using fpga , i did sine wave with 1k freq(verilog, vhdl) but now i required sine wave with freq. upto 400khz plz gimmi some tips.
 

Hi,
I am generating 25MHz Sine wave using DDS core. Simulation is working perfectly but hardware is not working. I am implementing simple DDS core. Can you please tell me what can be the possible reason?
 

My code for the core is
entity dds_test is
Port (
clk : in STD_LOGIC;
rdy : out STD_LOGIC;
sine : out STD_LOGIC_VECTOR(5 downto 0));
end dds_test;

architecture Behavioral of dds_test is
component dds
port (
clk: IN std_logic;
rdy: OUT std_logic;
sine: OUT std_logic_VECTOR(5 downto 0));
end component;

begin
Sine_wave : dds
port map (
clk => clk,
rdy => rdy,
sine => sine);

end Behavioral;

and simulation results are
 

O.K., the simulation looks plausible. So what's happening with the hardware design?
 

i am assigning that 'rdy' pin to a led but led is not glowing on fpga.
 

If I understand right, your DDS design has all fixed parameters and no programming interface, so RDY is actually useless. But is should work if present. Reasons that I can imagine:
- DDS core is hold in reset
- IO pins not assigned correctly
- intended configuration not loaded

There are means to check each point separately.
 
  • Like
Reactions: capcas

    capcas

    Points: 2
    Helpful Answer Positive Rating
yes, you are right all parameters are fixed. And what do you mean by DDS core is in Reset state? how i can check it?
 

If you omitted SCLR, the DDS core can be only hold in reset by the global FPGA power-on reset. Do you check, if the intended FPGA design is loaded at all? Is it clocked correctly? Are any other parts beside the DDS core working? Output pins driving out?
 

It's good to add a heartbeat signal to every design to verify that the bit file loaded like FvM said. Just divide your clock to 2 Hz and have it clock a T flipflop and send that signal out to the LEDs. If you don't see your heartbeat, you have bigger problems than the DDS IP core
 

[/COLOR]I just checked it that core is working perfectly but led is not glowing. Can you please tell me where the problem can be?
 

If you have access to Chipscope, I would add an ILA core and see what's going on inside the FPGA.

[/COLOR]I just checked it that core is working perfectly but led is not glowing. Can you please tell me where the problem can be?
 

It's good to add a heartbeat signal to every design to verify that the bit file loaded like FvM said. Just divide your clock to 2 Hz and have it clock a T flipflop and send that signal out to the LEDs. If you don't see your heartbeat, you have bigger problems than the DDS IP core

If you have access to Chipscope, I would add an ILA core and see what's going on inside the FPGA.

Both good advice. A slow divided clock (2 Hz or some such) blinking a led is handy visual feedback during development. And chipscope is useful if you have to do some more invasive checking on the internals of your design. The blinky led is all of 5 minutes work, the ILA may be a little more work but will get you more debugging capabilities in return.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top