T
temo_aldorado
Guest
Hello group
I'm new to verilog, so please bear with me. For couple days now, Iâm trying to implement this simple freq detection on MAXII cpld for my diy audio dac, and by now Iâm quite frustrated.
Thing is, I have 2 master clocks, one for 44.1khz sampling rate (22.57Mhz) and second for 48khz (24.57Mhz). I need to detect incoming bit clock from I2S interface, and set flag accordingly. Incoming bit clock is synchronous derivative from one of two master clocks (mst1_clk/2 or /4 or /8) or (mst2_clk/2 or /4 or /8) so 6 flags to set total
How could this could be implemented using least amount of LCâs
I have all of those derivative frequencies generated on board, so my idea was just comparing incoming bit clock with them, like setting 16 bit register on every edge of one of mst_clkâs and then comparing output. But till now code is ether non synthesizable or takes too much LCâs. So basically what I need is either a hole new approach (probably) or just a small piece of synthesizable verilog code, that compares 2 frequencies and outputs flag if they match
Thanks for reading
I'm new to verilog, so please bear with me. For couple days now, Iâm trying to implement this simple freq detection on MAXII cpld for my diy audio dac, and by now Iâm quite frustrated.
Thing is, I have 2 master clocks, one for 44.1khz sampling rate (22.57Mhz) and second for 48khz (24.57Mhz). I need to detect incoming bit clock from I2S interface, and set flag accordingly. Incoming bit clock is synchronous derivative from one of two master clocks (mst1_clk/2 or /4 or /8) or (mst2_clk/2 or /4 or /8) so 6 flags to set total
How could this could be implemented using least amount of LCâs
I have all of those derivative frequencies generated on board, so my idea was just comparing incoming bit clock with them, like setting 16 bit register on every edge of one of mst_clkâs and then comparing output. But till now code is ether non synthesizable or takes too much LCâs. So basically what I need is either a hole new approach (probably) or just a small piece of synthesizable verilog code, that compares 2 frequencies and outputs flag if they match
Thanks for reading