lpm_counter bug?

Hi,

I'm using Quartus 4.1 Web Edition to program a MAX7000S CPLD.

I'm using an lpm_counter as a programmable divider with data[] and sload inputs, and cout output. I'm not using the q[] outputs. Originally, I connected cout directly back to sload, but I had intermittent problems. I routed cout to an I/O so I could look at it on the 'scope, and it was oscillating at very high frequency. To fix this, I had to put a DFF between the cout and the sload. This works, but now I need two dividers, and I can't spare another DFF. Is there another way to do it?

Reply to
Andrew Holme
Loading thread data ...

I don't see the behavior of the cout and the sload documented.

I would expect your tools would report a race condition if the cout IS dependent on the sload. But, assume for the moment the sload affects the cout such that an sload with a data[] value of all ones would force a cout even if the original count was less.

To get around the problem, tie sload to "the q[] value of all ones" to eliminate the cout dependence on sload.

between

Reply to
John_H

Hi Andrew,

There was a problem with Q II 4.1 which didn't synthesize lpm_counter correctly, but not when targetting this device. Still, you might want to check it out:

formatting link

-- Pete

Andrew Holme wrote:

Reply to
Peter Sommerfeld

Hi Peter,

Thanks, I came across that article myself. I didn't think it applied because the MAX7000S isn't listed - as you point out, and also I'm not using synchronous clear or asynchronous set. It does sound spookily similar though. Perhaps I should try it anyway...

Reply to
Andrew Holme

Andrew Holme wrote: [snip]

I should've mentioned -

  1. I'm using the lpm_counter as a down counter.

  1. I think (fairly sure, but not 100%) the problem goes away if you add a clock enable input - this forces it to use a different template or something.

Reply to
Andrew Holme

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.