Modulus 12

  • Thread starter =?ISO-8859-1?Q?Andr=E9s?=
  • Start date
?

=?ISO-8859-1?Q?Andr=E9s?=

Hi VHDL people,

is it possible to implement a MOD 12 operation
in Hardware ?

The Lattice Synthesizer is not able to use any direct implementation.

Suggestions are welcome.

Best regards

Andrés
 
A

Allan Herriman

?

=?ISO-8859-1?Q?Andr=E9s?=

Andrés said:
Hi VHDL people,

is it possible to implement a MOD 12 operation
in Hardware ?

The Lattice Synthesizer is not able to use any direct implementation.

Suggestions are welcome.

Best regards

Andrés

Something additional:

I am using a counter that counts up.

Every time the counter value mod 12 gets zero I want
to make a signal 'l_show_burst_complete' HIGH.

I am implementing a back-to-back write for an DDR SDRAM controller.

Rgds
Andrés
 
A

Allan Herriman

Something additional:

I am using a counter that counts up.

Every time the counter value mod 12 gets zero I want
to make a signal 'l_show_burst_complete' HIGH.

I am implementing a back-to-back write for an DDR SDRAM controller.

That's rather different. You should just make a divide by 12 counter,
and reset it at the same time you reset your main counter.

Regards,
Allan
 
T

Tuukka Toivonen

12 = 4 * 3.

Mod 2**N is trivially easy, and mod 2**N-1 is reasonably easy, once
you understand the maths.

And, to get mod 12 from mod 4 and 3, you use typically "chinese remainder theorem"
or "mixed radix conversion". However, they require multiplications but if you're
lucky those can be done with a few bit shifts. Something to type into Google...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top