Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

VHDL Code Help

Hi everyone, I'm new FPG and VHDL, I am trying write this code:

Pushing a SW1 will turn on the 4 LEDs on the board one by one from up to down every 2 seconds until all LEDs are lit.

Your help is highly appreciated.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What do you expect us to do? We don't write the code for you, but we can help you when you have something written.

    I suggest drawing the circuit you want and then think about how to code it. Mabe try to make the leds go on and off on a button push first, then you can add the effects later.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ) why do not start reading books, look for reference design, surf Altera website for university program materials

    what behaviour do you expect?

    1. Switch -> will it be simple like light switcher? what about bouncing? do you need register?

    2. LEDs -> could you draw a time-diagram for yourself?

    3. timer -> implement it later, on the start of project rely on LED switch every clock-cycle. You should use clock your scheme won't be pure combinatorial.

    If you able to answer this question you probably write code. So others can take a look .