8 in clock mux
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
8 in clock mux

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA
Author Message
Morten Leikvoll
Guest





Posted: Wed Dec 21, 2005 11:23 pm    Post subject: 8 in clock mux Reply with quote

Below is the code I use to mux 8 asynchronous clocks on a Spartan3. I guess
this method is safer than using LUT muxes as long as SEL is static in all
clock domains. Now, what would be the best way to cut all timing analysis
from the input clocks to the output clock? Of course I also want to specify
a new period on the output clock (preferably without routing it outside the
chip and back).

---
entity clkmux8 is
Port
(
CLK0 : in std_logic:='0';
CLK1 : in std_logic:='0';
CLK2 : in std_logic:='0';
CLK3 : in std_logic:='0';
CLK4 : in std_logic:='0';
CLK5 : in std_logic:='0';
CLK6 : in std_logic:='0';
CLK7 : in std_logic:='0';
SEL : in std_logic_vector(2 downto 0);
CLKOUT : out std_logic
);
end clkmux8;

[...blabla...]

mux10:MUXCY port map (S=>SEL(0),O=>tclk10,CI=>CLK1,DI=>CLK0);
mux11:MUXCY port map (S=>SEL(0),O=>tclk11,CI=>CLK3,DI=>CLK2);
mux12:MUXCY port map (S=>SEL(0),O=>tclk12,CI=>CLK5,DI=>CLK4);
mux13:MUXCY port map (S=>SEL(0),O=>tclk13,CI=>CLK7,DI=>CLK6);

mux20:MUXCY port map (S=>SEL(1),O=>tclk20,CI=>tclk11,DI=>tclk10);
mux21:MUXCY port map (S=>SEL(1),O=>tclk21,CI=>tclk13,DI=>tclk12);

mux30:MUXCY port map (S=>SEL(2),O=>CLKOUT,CI=>tclk21,DI=>tclk20);
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB