Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

size of counter in LUTs

Altera_Forum
Honored Contributor II
1,255 Views

Hi! 

 

I created the simplest possible 6-bit counter (with both megafunction and behaviorally). 

 

In both cases Quartus shows that the counter will take 6 ALUTs. 

 

From the Stratix IV handbook (which I use) I see that each ALUT contains: 6-input LUT, registers, an adder, etc. 

 

Why doesn't Quartus implement the 6-bit counter using the 6-input LUT in one ALUT? Why does it need 6 of them? 

 

This is important to me because my design uses 192 such counters and the potential for saving is huge. 

 

Alex
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
530 Views

6 bit counter needs six registers. These have to be borrowed from 6 ALUT units.  

 

If you need 192 such counters then you will be using > 1000 registers. 

If you are short of registers then you can implement counting in RAMs. 

e.g. you can use only few counters and several RAM arrays to represent 192 counters then store the current count in its RAM array and read last value.
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

Thanks! 

 

You are right. Additionally the LUTs contained in a ALUT is a 6-bit input, but 1-bit output.  

 

The counter is a 6-bit-in and 6-bit-out function. 

 

So 6 such LUTs are needed.
0 Kudos
Reply