What is a Clock in an FPGA?

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ค. 2017
  • NEW! Buy my book, the best FPGA book for beginners: nandland.com/book-getting-sta...
    Learn how a clock drives all sequential logic in your FPGA, from Flip-Flops to Block RAMs. The clock tells you how fast you can run your FPGA. This video demonstrates how to properly deal with multiple clock domains inside your design. I present an example showing how to turn a 40 MHz clock into a 10 MHz clock using Clock Enable pulses.
    Link to the EDA Playground Verilog code and simulation:
    www.edaplayground.com/x/vud
    Link to the Crossing Clock Domains page on my website:
    www.nandland.com/articles/cro...
    Support this channel! Buy a Go Board, the best development board for beginners to FPGA: www.nandland.com/goboard/intr...
    Like my content? Help me make more at Patreon!
    / nandland
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 64

  • @barrypjones
    @barrypjones 7 ปีที่แล้ว +14

    As a beginner I find myself going to your website and your videos to try and figure out what my teacher was talking about....thanks for explaining in a clear simple manner......you should teach...... :)

  • @FabioPanc8
    @FabioPanc8 6 ปีที่แล้ว +17

    "Kchunk" love it

  • @JGunlimited
    @JGunlimited 7 ปีที่แล้ว +1

    The example code & simulations are very helpful!

  • @Casperdroid5
    @Casperdroid5 2 หลายเดือนก่อน

    Amazing videos! Thank you so much! Go board was the best purchase for me to learn about FPGA

  • @AxElKo440
    @AxElKo440 5 ปีที่แล้ว +2

    Don't know how to thank you, I was looking for an answer how a distribution of clocks works. You explained it very well and clear.

    • @Nandland
      @Nandland  5 ปีที่แล้ว +2

      There's always Patreon! Patreon.com/nandland. It really helps!

  • @parkerd2154
    @parkerd2154 6 ปีที่แล้ว +26

    11:41 *slaps cat off table* lol

  • @karthikreddy8841
    @karthikreddy8841 7 ปีที่แล้ว +4

    Its an awesome presentation thanks for your video....waiting for more.

  • @letstalkscience6494
    @letstalkscience6494 3 ปีที่แล้ว

    Thank you very much!! Loved your video and learnt so much!! Keep up the great stuff!!

  • @harbiemohair7005
    @harbiemohair7005 7 ปีที่แล้ว +1

    thanks a bunch... I watched your initial videos from 2015 and I was you had an updated version. On finding this, I concluded you are the bomb. Now I can deliver better and informed understanding on FPGAs. Yes, grow your beard back.

  • @baconsledge
    @baconsledge 7 ปีที่แล้ว +2

    great video as always!

  • @georgehowell9307
    @georgehowell9307 7 ปีที่แล้ว +2

    Haha, I've done excatly that! used an baud clk signal to drive a FIR, opps :(. The videos are great, really clear and detailed, thanks. Nice cat swip, ha.

  • @madan2241
    @madan2241 6 ปีที่แล้ว +1

    nice explanation for beginners

  • @RachelGamblin
    @RachelGamblin ปีที่แล้ว

    Very helpful and clear!

  • @chatgpt94274
    @chatgpt94274 7 ปีที่แล้ว +1

    great explanation

  • @tatahoda
    @tatahoda 5 ปีที่แล้ว

    I love your website

  • @rahulmahbubani1392
    @rahulmahbubani1392 6 ปีที่แล้ว +1

    so much value thank's man

  • @irgski
    @irgski 6 ปีที่แล้ว +2

    Important point: Since the enable signal is generated from the base 40MHz clock, using enable true in conjunction with the rising edge of the 40MHz clock happens at the 2nd edge since the enable happens - in real time - after the first rising edge of the base clock.
    Remember propagation delays as well as setup and hold specs in the “real world”!

  • @knki_95
    @knki_95 5 ปีที่แล้ว

    Thank you very much!

  • @TheKnaheesh
    @TheKnaheesh 5 ปีที่แล้ว +1

    Thank you sir :)

  • @shravan8848
    @shravan8848 2 ปีที่แล้ว

    I love your videos

  • @Hfgh564
    @Hfgh564 2 ปีที่แล้ว

    Thank you!

  • @S_P_S
    @S_P_S 2 ปีที่แล้ว

    Sir, your videos are just awesome. I am learning a lot about FPGAs from your video tutorials. I have a query regarding the crossing clock domain. As you said, we have to deal with it gingerly while transferring data faster domain to slower domain and vice-versa. In these cases, can we use a FIFO buffer?
    And also, Thanks a lot for this initiative. Keep making such videos.

    • @Nandland
      @Nandland  2 ปีที่แล้ว +1

      If only I made a video about just that topic... oh wait! th-cam.com/video/eyNU6mn_-7g/w-d-xo.html

  • @josemartins90
    @josemartins90 5 ปีที่แล้ว +1

    Thank you for your videos man! Could you do one on timing closure?
    btw, where is the image at 3:06 from? I think I've seen it in some book.. but I can't quite place it...

    • @Nandland
      @Nandland  5 ปีที่แล้ว +1

      I'll add it to the list. I found it via google image search.

  • @takaharanio1227
    @takaharanio1227 2 ปีที่แล้ว

    Hey great video, i can finally understand more about the inner working of CTS. But i have a question. What does it mean when you say the 10MHz clock cannot be used internally? Does it means i cant create one module of 10MHz ADC clock like you did and channel it throughout the FPGA for other sequential circuit that requires it?If it can be used externally where it is place? As another pin? Anyone can clarify?

  • @MilanKarakas
    @MilanKarakas 5 ปีที่แล้ว +1

    Damn TH-cam - I wish to give more than one like.

  • @rileystewart9165
    @rileystewart9165 2 ปีที่แล้ว

    I'm curious how I would generate a 25.2MHz VGA clk from my 50MHz Ext Osc. The ratio is 63/125, but I can see any sensible way to apply any non-power of two division to a clock. So far I have just been using ALTPLL.

  • @ilyeshouhou9998
    @ilyeshouhou9998 2 ปีที่แล้ว

    can you please tell me why the test signal increment at the falling edge of clock_EN and not the rising edge ? THANK YOU

  • @mahadevbhat9704
    @mahadevbhat9704 4 ปีที่แล้ว

    Hey is it possible to generate 100MHz clock from FPGA and give it PMOD headers to use it outside.if possible,how?

  • @yerdyi
    @yerdyi 6 ปีที่แล้ว

    Would it be more power efficient to use a PLL to divide the main clock versus the example you gave of dividing the clock manually in verilog?

    • @Nandland
      @Nandland  6 ปีที่แล้ว +1

      Just to be clear I'm not dividing the clock... I'm using a clock enable. And to answer your question definitely clock enable is more power efficient. PLLs take 10-100s of mW of power. They're more useful for creating clocks that are out of phase with eachother and have no relationship. E.g. 100 MHz and 121 MHz or something like that a PLL is good for.

  • @shubhamchoudhary4855
    @shubhamchoudhary4855 5 ปีที่แล้ว

    in the adc code : condition should be r_Clock_count

  • @sakuranooka
    @sakuranooka 3 ปีที่แล้ว

    Ok, I hear the message, and I want to adapt my code to follow your recommendation. So, until now, I did reuse the divided-down clock "clk_div" to drive another process, whose first statement (in VHDL) was "if rising_edge(clk_div) then". What would the beginning of the process now look like when using the clock-enable approach?

    • @Nandland
      @Nandland  3 ปีที่แล้ว +1

      If rising_edge(clk) then
      If (clk_en) then
      Do stuff

  • @wmhilton-old
    @wmhilton-old 7 ปีที่แล้ว

    Did you say there's a way to go *faster* than the main 25Mhz clock on the Go board? I'm curious because I'd love to construct my own Ethernet interface circuitry eventually.

    • @Nandland
      @Nandland  7 ปีที่แล้ว +3

      Not without replacing the main oscillator on the Go Board. There's no PLL on this particular FPGA.

  • @dans.8198
    @dans.8198 3 ปีที่แล้ว

    I would expect r_Test to increase on the rising edge of o_ADC_Clock, but instead it is delayed. What’s happening here ?

  • @DanEllis
    @DanEllis 3 ปีที่แล้ว

    I'm confused. You said don't use o_ADC_Clock as a clock, because it's an output from a flip-flop, so why is it okay to use r_Clock_En as a clock? Isn't that also the output of a flip-flop?

  • @sureshdharmaratna840
    @sureshdharmaratna840 7 ปีที่แล้ว +1

    super

  • @oussamamlika3053
    @oussamamlika3053 5 ปีที่แล้ว

    I would not rely on a default assignment in a clocked process with non-blocking assignment. Your code will be subject to race conditions and may have a different behaviour depending on the simulator.

    • @Nandland
      @Nandland  5 ปีที่แล้ว

      Hm, not sure exactly what code you're referring to... but I've done default assignments in clocked processes for years and never had a problem across Lattice, Altera, and Xilinx FPGAs and synthesis tools.

  • @limbique
    @limbique 3 ปีที่แล้ว

    "The ADC clock is not used internally, because it's the output of a flop-flop" You've tried to explain why, but I still don't get it right I think. Does it has to do with timing? (like the output of a flipflop is that current edge unreliable?

  • @JagjitBrawler
    @JagjitBrawler ปีที่แล้ว

    I have a pretty dumb question, and I’m super new to digital design as I come moreso from a software/programming background, so please bear with me lol.
    You talked about how you’ve made projects for interfacing with a camera. Why would you want to design something with an FPGA to do stuff like that as opposed to using a microcontroller like arduino?
    I guess this question sort of applies to a lot of digital systems work in general. If a lot of this stuff can be implemented in software and/or with microcontrollers, why design use FPGA’s instead?

    • @Nandland
      @Nandland  ปีที่แล้ว

      If you can do it in a microcontroller, you should. FPGAs are more complicated and take more engineering effort to do the same task. However sometimes you can't use a microcontroller, they're just not fast enough. I doubt you could get an Arduino to process data fast enough from a high pixel / frame rate camera.

  • @harrellt1405
    @harrellt1405 4 ปีที่แล้ว

    hello sir, tell me if im wrong but i thought o_ADC_Clock is suppose to be 10 MHz but instead it is 20MHz( it operates 1 cycle every 2 cycles of 40MHz wave).

    • @miguellora9147
      @miguellora9147 4 ปีที่แล้ว

      I believe a clock so high can heat a lot, and burn the circuit.

  • @aptech2933
    @aptech2933 7 ปีที่แล้ว

    Can you do machine vision with this board?

    • @Nandland
      @Nandland  7 ปีที่แล้ว +4

      Almost certainly no. I don't know what's required for that, but it's probably something a lot more powerful and a lot more expensive.

  • @tarekamrani7516
    @tarekamrani7516 4 ปีที่แล้ว

    Great

  • @rickyzhang
    @rickyzhang 2 ปีที่แล้ว

    Is it a latch when r_Clock_Count == 1 or 3?

  • @Kilohercas
    @Kilohercas 2 ปีที่แล้ว

    Interesting. Based on my understanding its not always good to use logic for clock prescsler. It will be not as clean as from PLL. Jitter performance should be much better. And when you run 100MHz 16MHz adc you need few ps jitter in order not to generate tones that are not in your signal

  • @m1geo
    @m1geo 2 ปีที่แล้ว

    Using a flop output as a clock input is such a schoolboy error. This burns lots of folks when they first start playing with FPGAs. It usually works in the simple "flashing an LED" examples, but, then burns you for anything more complex!

  • @viscoreviscore2417
    @viscoreviscore2417 3 ปีที่แล้ว

    how r_Clock_Count went back to 0 ? Can someone tell me its a mystery to me!

    • @viscoreviscore2417
      @viscoreviscore2417 3 ปีที่แล้ว

      OK..I figured it out...Its actually very interesting. I've never seen anyone using that kind of technic.
      Since we use b'00 wide register the max number is 3, when its going to hit 4 its going to overflow and turn everything to b'00

    • @Nandland
      @Nandland  3 ปีที่แล้ว

      @@viscoreviscore2417 Indeed.

  • @RajeshGanesan92
    @RajeshGanesan92 4 ปีที่แล้ว

    5:20 You are wrong about processors doing one instruction at a time. In fact, modern processors have hundreds to thousands of inflight instructions. And basically the processors are also made out of millions of combinational logic gates and sequential logic elements i.e. flip-flops. So, potentially all those millions of flip-flops in a processor can also toggle in any given cycle. But in either a processor or an fpga, the percentage of all flip-flops that might toggle in any given cycle is less than 50% statistically.

  • @jonathanstein6056
    @jonathanstein6056 3 ปีที่แล้ว

    The duty cycle created here is uneven.

  • @georgehowell9307
    @georgehowell9307 7 ปีที่แล้ว

    Oh, and by popular vote, you need to grow your beard back.

  • @johnteran8889
    @johnteran8889 7 ปีที่แล้ว +18

    Grow back your beard. We miss it.

    • @susanneschmitz9390
      @susanneschmitz9390 6 ปีที่แล้ว

      I've been watching this video for 5 min thinking that he looks much younger and different in this video and I only realized why, because of your comment :-D