This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > FPGA Technical Tutorials > Programming FPGAs Getting Started with Verilog > Introducing Verilog > Synchronous Logic

Synchronous Logic

FONT SIZE : AAA

The preceding counter example illustrates how easy it is to define some hardware  in Verilog. However, it is missing an important feature that you will find in almost  any Verilog example that you would care to look at. That is, it is not synchronized with a clock.

The example works, but only because it is so simple. The problem that arises,  as soon as projects become even slightly more complex than this, is that signals  take different times to propagate through logic gates, and this means that an output that depends on inputs from many other parts of the system and possibly even  the output itself will take time to settle to its final value. It may have glitchy pulses  that should be ignored by other parts of the system. Such outputs are described as  metastable.

This is why you will have seen some warning messages as you built the project,  not least because the clock input to the counter appears to ISE as a synchronizing  clock input, but we are just using it as a general input connected to a switch.

The solution to this problem of metastable outputs is to use a system-wide  clock (usually tens of megahertz). Everything then happens each time the clock  ticks. This means that any metastable outputs will have had time to settle before  their value is sampled. The <= operator that you used in the counter example in  preference to = ensures that all assignments using <= within an always block  happen at the same time (in the same clock cycle.) This gives time for all the outputs in the system to settle well before the next clock cycle occurs.

  • XC5204-5PQG160C

    Manufacturer:Xilinx

  • FPGA XC5200 Family 6K Gates 480 Cells 83MHz 0.5um Technology 5V 160-Pin PQFP
  • Product Categories:

    Lifecycle:Obsolete -

    RoHS:

  • XC2C128-6VQ100C

    Manufacturer:Xilinx

  • CPLD CoolRunner -II Family 3K Gates 128 Macro Cells 244MHz 0.18um Technology 1.8V 100-Pin VTQFP
  • Product Categories: Embedded - CPLDs (Complex Programmable Logic Devices)

    Lifecycle:Active Active

    RoHS: No RoHS

  • XC2C128-7CP132I

    Manufacturer:Xilinx

  • CPLD CoolRunner -II Family 3K Gates 128 Macro Cells 152MHz 0.18um Technology 1.8V 132-Pin CSBGA
  • Product Categories: Embedded - CPLDs (Complex Programmable Logic Devices)

    Lifecycle:Active Active

    RoHS: No RoHS

  • XC2C128-7TQ144I

    Manufacturer:Xilinx

  • CPLD CoolRunner -II Family 3K Gates 128 Macro Cells 152MHz 0.18um Technology 1.8V 144-Pin TQFP
  • Product Categories: Embedded - CPLDs (Complex Programmable Logic Devices)

    Lifecycle:Active Active

    RoHS: No RoHS

  • XC3S400-4FG320C

    Manufacturer:Xilinx

  • FPGA Spartan-3 Family 400K Gates 8064 Cells 630MHz 90nm Technology 1.2V 320-Pin FBGA
  • Product Categories: FPGAs (Field Programmable Gate Array)

    Lifecycle:Active Active

    RoHS:

Need Help?

Support

If you have any questions about the product and related issues, Please contact us.