Forum Discussion
Altera_Forum
Honored Contributor
16 years agoClock Divider
I have a input clock 128*Fs(Sampling Frequency). I need derived clocks of Fs, 2Fs, 4Fs, 8Fs, 16Fs ... 64Fs. However, there are 2 ways in my mind to implement it. 1st: 1 module only an...
Altera_Forum
Honored Contributor
16 years agoHi,
1) It doesn't work as expected : - if (count == 2, 4, 6, 8, ...) a = 1;//64*Fs - else if (count == 4, 8, 12,...) b =1; //32*Fs // count == 4,8 already done in the above condition. 2)too numerous counters I give a 3rd solution : one counter (range 5 downto 0 for example) and take each bit that switches on divided frequence : count(0) for signal f/2,count(1) for f/4,
count(2) for f/8
.... May it help you ! EDIT : I see you need F/6 for example : take a counter modulo 6 F/12 take (F/6)/2 : be aware about their "phase".