Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

2-bit counter

Altera_Forum
Honored Contributor II
1,419 Views

Hi all 

 

I need to design a 2-bit counter which output will change from 00-01-10-11 every time another counter counts up to a X value. I prefer VHDL but Verilog is fine too.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
387 Views

Hi MorfiuM, 

 

Did you consider using the lpm_counter? 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
387 Views

Hi Scott 

 

I checked it out but since I am a very beginner I don't know how to use the file for what I need it to do. 

Thanks 

 

Mick
0 Kudos
Altera_Forum
Honored Contributor II
387 Views

Hi Mick, 

 

> I don't know how to use the file for what I need it to do. 

 

Best place to get your feet wet is in the MegaWizard: 

 

1. Double-click somewhere in you schematic file. This will open the "Symbol" 

dialog window. 

 

2. In the "Libraries" explorer pane, navigate to: quartus->megafunctions->arithmetic. 

You'll see the extra path information, but it should be clear to you. 

 

3. Double-click: lpm_counter. 

 

4. Then just let the wizard guide you along ... flavor to your particular taste ;-)  

 

The end result will be a counter symbol you can place in your schematic. 

 

Regards, 

--Scott
0 Kudos
Reply