Forum Discussion

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

counting input signals

hello there,

I'm quite new to the fpga world, and i have run into a problem. The idea is that I want to count incoming impulses on pin1 per second (frequency varies from 200~ to 1000hz) , and then display that number on a 7segment display.

Im using the schematic layout thing.

1.I made a counter, that converts 50Mhz onboard clock to 1Hz signal.

2.A second counter (10bit) counts the impulses on pin1, and resets when it receives aclr signal ( the 1Hz signal)

3.A latch, that allows data to flow through when it receives the same 1Hz signal. aswell as a bcd converter to display the numbers.

Now the problem is clock skew > data delay. failed paths.. why oh why does this happen. I think that quartus somehow thinks of my pin1 signals as a second clock or something. What can i do ?

13 Replies

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

    --- Quote Start ---

    Got it!

    Is there a preset element in the schematic builder for that?

    --- Quote End ---

    Hi,

    such elements are available. You have two choices :

    1. When you double click in your schematic a windows opens. On the left side you couls see a folder called : ....../libraries. Under the subfolder "primitives" you find a folder "storage".

    There you can select "dff" for a register and place the symbol in your schematic. When you connect the register to a bus Quartus recognice the number of register automatically.

    2. You can use the Megawizard Plug-in Manager:

    Under Tools choose "Megawizard Plug-in Manager". Under Storage choose LPM_FF and go through all the tabs. The Megawizard generates a symbol for the register. Again double click into your schematic. You will find the symbol foe the register in the folder "Projec

    t".

    Kind regards

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

    Awesome, everything works! thank you so much.

    Now maybe somebody could tell me how to control a 7 segment led display? I don't understand how to select and controls pins, so that they would act as GND when I need them to?