On 3/4/08, Michael Meeuwisse <[EMAIL PROTECTED]> wrote: > > On 4 Mar 2008, at 17:37, Timothy Normand Miller wrote: > > > Ok, here's how it works... > > > > > Interesting. I tried some numbers and it seems to get pretty close to > whatever we need. I don't know if it's close enough, but if Howard > says so.. ;)
Not bad, but there are a few comments I have. First, don't bother with sanity checks in the hardware. It's the software driver developer's responsibility to put in the appropriate checks or indeed never generate bad numbers in the first place. There are rare occasions, where a bad value could physically fry something, where you might want to put in a check, but I don't think that's the case here. Also, your pre-divider looks like it's going to divide by 2N, not N. For N=1, you just want to mux in the clock. For N=2, you toggle a register _every_ cycle. For even numbers, it's easy. For odd numbers, you alternate counting floor(N/2) and ceil(N/2). So, for N=2, the counts are 1, 1, 1, 1.... For N=3, the counts are 1, 2, 1, 2, 1, 2... Actually, you probably want to subtract 1 from all of the numbers I just gave, but you get the idea. Also, there are other optimizations we can make, but we'll start here. You probably have a similar bug with your divide-by-2-to-the-M post-divider. For the DCM feedback, we don't care about the phase of this clock relative to anything else, but we do need a feedback. I think you can just wire CLK0 directly to CLKFB. > So anyway, I figure we don't have this implemented yet, and it's time > I get laughed at* for trying to write something in Verilog. See > attached. *Any* comments are most welcome, I'm not even sure if I get > the concept of wires completely yet. ;) Ask questions. We'll answer. :) -- Timothy Normand Miller http://www.cse.ohio-state.edu/~millerti Open Graphics Project _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
