I’m working on project where I need to make the system clock externel, start with this simple project. I want to implement a selector between two clocks ( clk and clk1) to the output clk_out0, where clk is the system clock and clk1 is a simple signal that I emulated in this project using the sw1 of the nexys4 ddr fpga board.I use the sw0 of the board to switch between the two clocks.
when I select the clk1 ,that comes from sw0, the clk_out0 works perfectly , Unfortunately,when I select the system clock I get a steady signal of 1.8 V ,theclk_out1 ,which is supposed to be the system clock, is also at 1.8V.
Question
Billel
Hi every body
I’m working on project where I need to make the system clock externel, start with this simple project. I want to implement a selector between two clocks ( clk and clk1) to the output clk_out0, where clk is the system clock and clk1 is a simple signal that I emulated in this project using the sw1 of the nexys4 ddr fpga board. I use the sw0 of the board to switch between the two clocks.
when I select the clk1 ,that comes from sw0, the clk_out0 works perfectly , Unfortunately, when I select the system clock I get a steady signal of 1.8 V , the clk_out1 ,which is supposed to be the system clock, is also at 1.8V.
Can anyone tell me what is wrong in the program?
here is the vhdl program:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity padd is
port (
clk:in std_logic;
clk1:in std_logic;
selector:in std_logic;
clk_out1 : out std_logic;
clk_out0 : out std_logic
);
end padd;
architecture padd of padd is
begin
process(clk)
begin
if selector ='0' then
clk_out0<= clk;
else clk_out0<= clk1;
end if;
end process;
clk_out1<= clk;
end padd;
and this is the xdc configuration
Thanks.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.