Author Topic: Cyclone V flashing LEDs and clock (Verilog)  (Read 1963 times)

0 Members and 1 Guest are viewing this topic.

Offline pmamatsisTopic starter

  • Contributor
  • Posts: 22
  • Country: gr
Cyclone V flashing LEDs and clock (Verilog)
« on: May 23, 2016, 06:17:01 am »
Hello everyone,
   i wanted to ask a 'dummy' type of question. I am trying (using Verilog) to flash the LED on my board (Terasic Cyclone V GX Starter Kit) and i am using a counter in my design (as suggested in my previous post by some people) in order to perform the clock down. From my understanding up to now (by reading the pdf board manual with the technical specifications) this board has a 50MHz clock which you can clock up or down using a PLL. Since i don't know how to use the PLL in order to clock down i have used a counter...if i wanted to use the PLL but i didn't wanted to use a Quartus MegaFunction is there any other way to synthesize the PLL? Do you believe that it is up to my level these kinds of questions?

I am sorry if my question sounds dummy but please go easy one me. I found out this world of FPGAs and AVRs etc. on an older age.  ;D

Best regards and
thank you so much in advance.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Cyclone V flashing LEDs and clock (Verilog)
« Reply #1 on: May 23, 2016, 06:26:32 am »
MegaFunctions are the way in which the dedicated hardware blocks in the FPGA are called up and configured. You'll need to use one to incorporate a PLL.

The wizard generates all the files you need in order to incorporate the dedicated hardware just like any other component. (Sorry, I can't help you with this... I speak VHDL and not Verilog).
 
The following users thanked this post: pmamatsis

Offline pmamatsisTopic starter

  • Contributor
  • Posts: 22
  • Country: gr
Re: Cyclone V flashing LEDs and clock (Verilog)
« Reply #2 on: May 23, 2016, 06:55:04 am »
MegaFunctions are the way in which the dedicated hardware blocks in the FPGA are called up and configured. You'll need to use one to incorporate a PLL.

The wizard generates all the files you need in order to incorporate the dedicated hardware just like any other component. (Sorry, I can't help you with this... I speak VHDL and not Verilog).

Hi @AndyC_772,
   first of all let me thank you for your quick response. Oh!!! I see!!! This means that after adding a MegaFunction to my design for use the PLL i will be able to see the Verilog code that Quartus software will be using in order to synthesize the PLL, right? I only hope to understand even 1% of it!!! ;D

Since i am now starting out with this (of course is a bit late to ask this question because i have already bought books about it...) why do more people using VHDL instead of Verilog? I have read the various resources on the internet for comparing both design languages but for a n00b's eyes like me i would expect more people to use Verilog because it's more "C-like"...

Best regards.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Cyclone V flashing LEDs and clock (Verilog)
« Reply #3 on: May 23, 2016, 08:18:28 am »
You can read the code generated by the Wizard if you like, but you don't really need to. The code mostly contains the values for the parameters you've entered via the GUI, and if you're hoping for a complete equivalent circuit of the PLL written in Verilog, I'm afraid you'll be disappointed.

I'm not sure 'most' people use either one language or the other. I've heard it said that Verilog is more popular in the US, while VHDL is more popular in Europe, but I've no concrete evidence to back that up.
 
The following users thanked this post: pmamatsis

Offline John_ITIC

  • Frequent Contributor
  • **
  • Posts: 514
  • Country: us
  • ITIC Protocol Analyzers
    • International Test Instruments Corporation
Re: Cyclone V flashing LEDs and clock (Verilog)
« Reply #4 on: May 23, 2016, 08:40:25 pm »
Th Megawizard will generate the needed HDL to interface with the PLL hardware. You'll include this in your project and can also tell the Megawizard to generate an instantiation .v file, which you'll paste into your design. Essentially, this will have the 50 MHz clock input, the PLL output as well as a 'locked' output that tells you that the PLL has locked. In general, if you want to flash an LED then using a down-counter would be the correct approach though.
Pocket-Sized USB 2.0 LS/FS/HS Protocol Analyzer Model 1480A with OTG decoding.
Pocket-sized PCI Express 1.1 Protocol Analyzer Model 2500A. 2.5 Gbps with x1, x2 and x4 lane widths.
https://www.internationaltestinstruments.com
 
The following users thanked this post: pmamatsis

Offline pmamatsisTopic starter

  • Contributor
  • Posts: 22
  • Country: gr
Re: Cyclone V flashing LEDs and clock (Verilog)
« Reply #5 on: May 24, 2016, 06:00:41 am »
Th Megawizard will generate the needed HDL to interface with the PLL hardware. You'll include this in your project and can also tell the Megawizard to generate an instantiation .v file, which you'll paste into your design. Essentially, this will have the 50 MHz clock input, the PLL output as well as a 'locked' output that tells you that the PLL has locked. In general, if you want to flash an LED then using a down-counter would be the correct approach though.

Good morning John_ITIC,
   thank you for your reply too. Of course i don't believe that i am going to understand even 1% of the generated HDL code behind the PLL in my current level of knowledge but i am just curious as to see what kind of HDL gets generated for a PLL MegaFunction. ;D

Thank you all for your answers...my journey continues!!! ;D

Best regards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf