Clock muxing done on an FPGA

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
I have a system with 2 clock inputs. I want the user to be able to choose which clock to use (with external pullups connected to the clock selector line).

I know that the below gated clock is bad practice when done on an FPGA.

Code:
selected_clock <= first_clock when clock_seclector = '1' else second_clock ;

process (selected_clock) is
begin
   if rising_edge (selected_clock) then
      Q <= D ;
   end if ;
end process ;

How can the above "be done the right way" on an FPGA ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…