Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

Name: Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

Software: ISE

Language: VHDL

Code Function: Using ISE to design a 14-bit sine wave signal generator based on the Xilinx DDS IP core; control the number and frequency of the output sine wave signals by manipulating the enable signal and the internal frequency control register of the DDS IP core, and perform simulation verification.

1. Project Files

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

2. Program Files

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

DDS IP Core

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

3. Program Compilation

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

4. Testbench

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

5. Simulation Diagram

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

Partial Code Display:

LIBRARY ieee;
   USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
--DDS
ENTITY DDS_top IS
   PORT (
      clk_in      : IN STD_LOGIC;--Clock
ena : IN STD_LOGIC;--Enable signal
fre_ctrl    : IN STD_LOGIC_VECTOR(15 DOWNTO 0);--Frequency control word
   wave         : OUT STD_LOGIC_VECTOR(13 DOWNTO 0)--Output waveform
   );
END DDS_top;
ARCHITECTURE behave OF DDS_top IS
--Instantiate module
   --DDS IP module
COMPONENT DDS_14bit
  PORT (
    ce : IN STD_LOGIC;
    clk : IN STD_LOGIC;
    pinc_in : IN STD_LOGIC_VECTOR(15 DOWNTO 0);
    sine : OUT STD_LOGIC_VECTOR(13 DOWNTO 0)
  );
END COMPONENT;
   
BEGIN
  --DDS IP module
   i_DDS_14bit : DDS_14bit
      PORT MAP (
         clk   => clk_in,--Clock
ce => ena,--Enable signal
         pinc_in  => fre_ctrl,--Frequency control word
         sine  => wave--Output waveform
      ); 
   
END behave;

Design of a Sine Wave Signal Generator Based on FPGA: VHDL Code and ISE Simulation

Leave a Comment