Dear Group, I have a xilinx xc9536 , a 22 bit counter, and a 5 bit counter. The 22 bit counter is used as a 48mhz clock divider for the other 5 bit counter, hence bit 22 is used as humanly visible clock. The counter stops when it reaches 11111. The problem I am having is that when I apply my digital multi meter to the pins of the counter to check if the count has finished, then the counter seems to suddenly start counting again. I also noticed that if before applying the multimeter I disconnect the oscillator from the chip this will not happen, so it seems the oscillator is making the design unstable. Any ideas? Also, as a beginner, which book do I need to understand the tricks and quirks of xc9536 high speed design. Should I be designing on a behavioural level, or should I use low level? My clock code is as follows reg [21:0] nn; assign cdiv= nn[21]; always @(posedge c0) nn=nn+1; my other clock goes like this always @(posedge clock or posedge reset1) begin if (reset1) aa <= 0; else aa <= aa + 1; end The clocks are physically connected from external pins with a wire. For the oscillator I use gck1. Many thanks.
Beginners question
Started by ●July 25, 2007
Reply by ●July 25, 20072007-07-25
> The problem I am having is that when I apply my digital > multi meter to the pins of the counter to check if the count > has finished, then the counter seems to suddenly start > counting again. I also noticed that if before applying the48 MHz ? With a multimeter ? Just solder a LED instead... or put a resistor at the end of your probe... resistor scope probe is THE low-tech low-cost "but it works!" way for high speed probing ;) A few possible causes : - you're wearing wool or something and generate enough static electricity to zap the circuits ; ground yourself properly before it costs you a replacement board - the parasitic cap of the probe is enough to cause mayhem, ringing, etc> multimeter I disconnect the oscillator from the chip this will > not happen, so it seems the oscillator is making the design > unstable. Any ideas?Well, without clock, all synchronous logic is on blind-deaf mode, and you used synchronous logic for your counter, so...
Reply by ●July 25, 20072007-07-25
Dear User,> 48 MHz ? With a multimeter ? > > Just solder a LED instead... or put a resistor at the end of your > probe... resistor scope probe is THE low-tech low-cost "but it works!" way > for high speed probing ;) >I do use a led, and this is why I divide the clock with 22 bits, so I can actually see the led flashing with different speeds on different counter pins.> A few possible causes : > > - you're wearing wool or something and generate enough static electricity > to zap the circuits ; ground yourself properly before it costs you a > replacement board > - the parasitic cap of the probe is enough to cause mayhem, ringing, etc > > > multimeter I disconnect the oscillator from the chip this will > > not happen, so it seems the oscillator is making the design > > unstable. Any ideas? > > Well, without clock, all synchronous logic is on blind-deaf mode, and you > used synchronous logic for your counter, so...Yes, this is silly of me, of course without a clock it cannot move. I was just wondering if there were any special checks I should make because I am using 50mhz. I think I can use a PIC to simulate a slower clock, I'll try that. And I forgot to mention as well that I have a "done" pin, which goes high when counter reaches "11111". Again, if I touch that pin with a led it will start counting again. This register actually controlls if the clock is multiplexed into the divider counter, when done=1 it stops the oscillator from reaching the divider. Clearing it would cause the counter to continue. Maybe when I touch the "done" pin with a led it acts as a momentary short ground. I can't think why that would be, my led is very low current, it is limitted with a relatively large 10K. I also have some other inputs, which once the clock is on 11111 should not make any difference, but again if I touch them with a led, or even just leave them floating, the counter starts to count again.
Reply by ●July 25, 20072007-07-25
> I was just wondering if there were any special checks I should make > because I am using 50mhz. I think I can use a PIC to simulate a slower > clock, I'll try that.I hate to ask the obvious - but have you simulated the design at this clock rate? I haven't used the xc95xx stuff but certainly when I use a Spartan, simulation is the key to making a deisgn that does what I want it - and if it works, it narrows any problems to the hardware.
Reply by ●July 25, 20072007-07-25
Tonico wrote:> Dear Group, > > I have a xilinx xc9536 , a 22 bit counter, and a 5 bit counter. > The 22 bit counter is used as a 48mhz clock divider for the > other 5 bit counter, hence bit 22 is used as humanly visible > clock. The counter stops when it reaches 11111. > The problem I am having is that when I apply my digital > multi meter to the pins of the counter to check if the count > has finished, then the counter seems to suddenly start > counting again. I also noticed that if before applying the > multimeter I disconnect the oscillator from the chip this will > not happen, so it seems the oscillator is making the design > unstable. Any ideas?<snip> Do you use bypass capacitors from power to ground?
Reply by ●July 25, 20072007-07-25
On Jul 25, 5:30 am, <Tonico> wrote:> Dear Group, > > I have a xilinx xc9536 , a 22 bit counter, and a 5 bit counter. > The 22 bit counter is used as a 48mhz clock divider for the > other 5 bit counter, hence bit 22 is used as humanly visible > clock. The counter stops when it reaches 11111. > The problem I am having is that when I apply my digital > multi meter to the pins of the counter to check if the count > has finished, then the counter seems to suddenly start > counting again. I also noticed that if before applying the > multimeter I disconnect the oscillator from the chip this will > not happen, so it seems the oscillator is making the design > unstable. Any ideas? > Also, as a beginner, which book do I need to understand > the tricks and quirks of xc9536 high speed design. Should > I be designing on a behavioural level, or should I use low > level? > > My clock code is as follows > > reg [21:0] nn; > assign cdiv= nn[21]; > always @(posedge c0) > nn=nn+1; > > my other clock goes like this > > always @(posedge clock or posedge reset1) > begin > if (reset1) > aa <= 0; > else aa <= aa + 1; > end > > The clocks are physically connected from external pins with a wire. > For the oscillator I use gck1. > > Many thanks.I don't quite understand Verilog, but I don't see that the output of your 22-bit counter has any affect on your 5-bit counter. Shouldn't you have something like: if cdiv = 1 aa <= aa + 1; -Dave Pollum
Reply by ●July 25, 20072007-07-25
> <snip> > > Do you use bypass capacitors from power to ground?I do have one 0.1 uF multi layered ceramic (dipped) on the power/gnd pins on the right facet.
Reply by ●July 25, 20072007-07-25
> > I hate to ask the obvious - but have you simulated the design at this > clock rate? I haven't used the xc95xx stuff but certainly when I use a > Spartan, simulation is the key to making a deisgn that does what I > want it - and if it works, it narrows any problems to the hardware. >Is this modelsim?
Reply by ●July 25, 20072007-07-25
Reply by ●July 25, 20072007-07-25
BTW I had to reduce the divider counter to 1 bit, otherwise there are 4 million simulation steps per second timer clock.




