FPGAs for Beginners
FPGAs for Beginners
  • 49
  • 323 812
My favourite state machine, always blocks: one or many? and simplifying your SystemVerilog Style!
Hi, I'm Stacey, and in this video I talk about my favourite state machine, how many always blocks I use, and how I simplify my coding style!
FPGA basics video: ua-cam.com/video/9umFgzntXTw/v-deo.htmlsi=Fgi7EgW261NkUvat
Github Code: gist.github.com/HDLForBeginners/14d21e8c044455bbe500b9f74987bab7
Cliff Cumming's paper: www.sunburst-design.com/papers/CummingsSNUG2019SV_FSM1.pdf
0:00 Intro
0:28 State machine overview
1:06 Labelling Clock cycles
2:50 Next State block
3:23 Always block islands
4:18 Waveform-Code development loop
5:35 Current state block
7:25 Next state block
9:10 Example output using framework
11:07 Why tie output behaviour to a framework
14:05 Coding how you think
15:22 State transition detection
15:52 Using transition detection to pre-load data
17:13 Other state machine event detection examples
17:58 Error detection example
20:00 Example code and how I would clean it up
25:33 My state machine in modules I've written
27:36 Cliff Cummings state machine paper
29:09 Outro
Buy me a coffee to support my channel: www.buymeacoffee.com/FPGAsforbeginners
Code: gist.github.com/HDLForBeginners/14d21e8c044455bbe500b9f74987bab7
Переглядів: 2 488

Відео

AXI-Stream Arbiter example
Переглядів 1,8 тис.2 місяці тому
Hi, I'm Stacey, and in this video I go over my AXI-Stream Arbiter example Collaboration: ua-cam.com/video/78tkdc6Lq_8/v-deo.html Toolbox: github.com/HDLForBeginners/Toolbox/tree/main Ethernet video: ua-cam.com/video/zTsHbEIOM2A/v-deo.html UART video: ua-cam.com/video/hVMeU2ThgNw/v-deo.html AXI Stream video: ua-cam.com/video/GyYmSZZor1s/v-deo.html Generate statement video: ua-cam.com/video/3tUp6...
Collaboration with Robert Feranec and new open source SystemVerilog toolbox
Переглядів 2,4 тис.2 місяці тому
Hi, I'm Stacey, and in this video I talk about my collaboration with Robert Feranec and new open source SystemVerilog toolbox Collaboration: ua-cam.com/video/78tkdc6Lq_8/v-deo.html Toolbox: github.com/HDLForBeginners/Toolbox/tree/main Ethernet video: ua-cam.com/video/zTsHbEIOM2A/v-deo.html UART video: ua-cam.com/video/hVMeU2ThgNw/v-deo.html Buy me a coffee to support my channel: www.buymeacoffe...
The Critical FPGA Basics: Always blocks, Inferred latches, and why the FPGA needs a clock, anyway?!
Переглядів 4 тис.2 місяці тому
Hi, I'm Stacey, and in this video I talk about everything from asynchronous logic, why the FPGA even needs a clock, and inferred latches! 0:00 Intro 0:38 Always blocks 8:27: Why the FPGA needs a clock, and static timing analysis 13:00 Registers and their function 16:00 Synchronus and Asynchronus logic 18:40 Asynchronus loopback paths and inferred latches 23:50 Avoiding inferred latches 27:05 Su...
5000 Subscribers! Answering your frequently-asked questions!
Переглядів 2,1 тис.Рік тому
Hi, I'm Stacey, and in this video I answer some of your questions! Online language learning: hdlbits.01xz.net/wiki/Main_Page chipdev.io/ edaplayground.com/ www.makerchip.com/ Risc-V courses: www.edx.org/learn/computer-science/the-linux-foundation-introduction-to-risc-v www.edx.org/learn/design/the-linux-foundation-building-a-risc-v-cpu-core www.edx.org/learn/computer-programming/the-linux-found...
Free FPGA training and resources!
Переглядів 6 тис.Рік тому
Hi, I'm Stacey, and in this video I share some free webinar series! Links: bltinc.com/homepage/xilinx-training/blt-webinar-series/ www.doulos.com/webinars/ www.intel.com/content/www/us/en/developer/learn/webinars.html Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
Zynq Part 3: Combining my own HDL with the Vivado block diagram!
Переглядів 9 тис.Рік тому
Hi, I'm Stacey, and in this video I show how I add my own logic beside the block diagram in Vivado. Github Code: github.com/HDLForBeginners/Examples/tree/main/ZynqSeries Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
ILA in a Zynq: View signals in hardware!
Переглядів 7 тис.Рік тому
Hi, I'm Stacey, and in this video I show you how to add an ILA in a zynq! (Also works for other Vivado-based Xilinx devices! Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
Zynq Part 2: Zynq Vitis Example with PL Fabric GPIO and BRAM
Переглядів 16 тис.Рік тому
Hi, I'm Stacey, and in this video I go over part 2 in my zynq series, using Vitis! Part 1: ua-cam.com/video/UZ3FnZNlcWk/v-deo.html Github Code: github.com/HDLForBeginners/Examples/tree/main/ZynqSeries Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
Zynq Part 1: Vivado block diagram (no Verilog/VHDL necessary!)
Переглядів 26 тис.Рік тому
Hi, I'm Stacey, and in this video I show the vivado side of a basic Zynq project with no VHDL/Verilog required. Not Sponsored, I just use this software a lot! Download vivado here: www.xilinx.com/support/download.html Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
Is chatGPT going to take my job? How well can chatGPT write Verilog?
Переглядів 2,7 тис.Рік тому
Music and Editing by @CapoXProductions Buy me a coffee to support my channel: www.buymeacoffee.com/fpgasforbeginners
AXI Part 3: AXI-Lite testbench (briefly)
Переглядів 2,4 тис.Рік тому
AXI Part 3: AXI-Lite testbench (briefly)
AXI Introduction Part 2: AXI-Lite state machine example explained!
Переглядів 5 тис.Рік тому
AXI Introduction Part 2: AXI-Lite state machine example explained!
AXI Introduction Part 1: How AXI works and AXI-Lite transaction example
Переглядів 19 тис.Рік тому
AXI Introduction Part 1: How AXI works and AXI-Lite transaction example
Reading from and writing to file: My PDM testbench from start to finish.
Переглядів 2,4 тис.2 роки тому
Reading from and writing to file: My PDM testbench from start to finish.
When and how to use the Multiplier IP core
Переглядів 4,5 тис.2 роки тому
When and how to use the Multiplier IP core
FPGA Audio to my PC over Ethernet! PDM Microphone and CIC filter explained!
Переглядів 9 тис.2 роки тому
FPGA Audio to my PC over Ethernet! PDM Microphone and CIC filter explained!
Handling Ethernet FIFO overflows in SystemVerilog! How to keep packets intact above line rate!
Переглядів 9 тис.2 роки тому
Handling Ethernet FIFO overflows in SystemVerilog! How to keep packets intact above line rate!
Receiving packets over Ethernet using Python
Переглядів 7 тис.2 роки тому
Receiving packets over Ethernet using Python
How to use the clocking wizard IP: creating a 50Mhz clock from 100Mhz
Переглядів 7 тис.2 роки тому
How to use the clocking wizard IP: creating a 50Mhz clock from 100Mhz
A quick and easy Ethernet Frame state machine, explained from start to finish!
Переглядів 11 тис.2 роки тому
A quick and easy Ethernet Frame state machine, explained from start to finish!
Digilent Nexys A7-100T Review!
Переглядів 2,8 тис.2 роки тому
Digilent Nexys A7-100T Review!
My Linux + Vivado development environment!
Переглядів 3,9 тис.2 роки тому
My Linux Vivado development environment!
Bloopers
Переглядів 8312 роки тому
Bloopers
Flashing a LED with Vivado and a Nexys A7 FPGA board: Step by step walkthrough!
Переглядів 7 тис.2 роки тому
Flashing a LED with Vivado and a Nexys A7 FPGA board: Step by step walkthrough!
Setting up a Nexys board in Linux!
Переглядів 2,5 тис.3 роки тому
Setting up a Nexys board in Linux!
Polynomial example part 2! Final window code with pipelining!
Переглядів 2,2 тис.3 роки тому
Polynomial example part 2! Final window code with pipelining!
Tips for working on a engineering design team as an intern or new graduate!
Переглядів 2 тис.3 роки тому
Tips for working on a engineering design team as an intern or new graduate!
Fixing failed timing, a practical example in verilog!
Переглядів 5 тис.3 роки тому
Fixing failed timing, a practical example in verilog!
FPGA unboxing and chat: Why I started this channel and future plans!
Переглядів 1,5 тис.3 роки тому
FPGA unboxing and chat: Why I started this channel and future plans!

КОМЕНТАРІ

  • @FPGAPS
    @FPGAPS 4 години тому

    Very nice! You can also see the RTL schematic in Vivado

  • @narenthatharaju11
    @narenthatharaju11 5 годин тому

    Thankyou

  • @deeps474
    @deeps474 2 дні тому

    thanks!

  • @near--zero
    @near--zero 2 дні тому

    You might be surprised how few tutorials on youtube cover this level of detail; excellent job you've answered many questions for me!

  • @cccmmm1234
    @cccmmm1234 5 днів тому

    Hi Stacey. I see you are using System Verilog here. Do you still use old-school verilog too? If so, when?

    • @FPGAsforBeginners
      @FPGAsforBeginners 4 дні тому

      Hi, I don't use verilog much anymore. The only case would be if a client specifically requests it. For example if they have an existing module that needs to be modified and they want it to remain verilog.

    • @cccmmm1234
      @cccmmm1234 4 дні тому

      @@FPGAsforBeginners Thanks.

  • @LuciaCleveland-o4l
    @LuciaCleveland-o4l 5 днів тому

    Orn Camp

  • @orzamarius3537
    @orzamarius3537 7 днів тому

    Hello! Thanks for the video! Wouldn't be interested to do a video about ADC, FMC and how to use them? Thanks!

  • @aakarshithasuresh3096
    @aakarshithasuresh3096 7 днів тому

    Thank you Stacey! great video and I love the cliff cummings paper, sunburst papers for FIFO design and CDC are good too......😁

  • @emwave100
    @emwave100 8 днів тому

    I have wanted to do an FPGA project for quite awhile now and haven´t gotten around to it. I wanted to create maybe a small 8-bit microcontroller with the alu and a large enough instruction set to be considered general purpose, with registers, and control, etc. There are several companies that offer fpga development boards, could you recommend one to me that would be sufficient to complete my goals? I would like to code in Verilog preferably but VHDL would be fine also.

  • @jiteshnayak7338
    @jiteshnayak7338 8 днів тому

    This video was so freaking good it was so clear and to the point thanks for this

  • @productivemonk5261
    @productivemonk5261 8 днів тому

    Could be combined into one synchronous always block, don’t need three blocks.

    • @mn1233
      @mn1233 6 днів тому

      @FpgasForBeginners - can you comment on concurrency of your islands?

    • @cccmmm1234
      @cccmmm1234 6 днів тому

      @@productivemonk5261 could be, but I also prefer multiple blocks. This separates the state change logic from the decision-making and output control. As Stacey says, this is way easier to understand (for others or yourself trying to remember what you did 6 months later). But, hey, if you have a different approach that works for you then go for it.

    • @FPGAsforBeginners
      @FPGAsforBeginners 4 дні тому

      @@mn1233 Not sure what you mean by concurrency. Ultimately one/many is a style choice, so to objectively say many is better than one is difficult. Although the cliff cummings paper makes a good argument. Ultimately it is the designers choice. My goal with this video is to lay out why I choose many, and this style has served me well over the years.

  • @productivemonk5261
    @productivemonk5261 8 днів тому

    My favorite statemachine is synchronous and not pseudo synchronous like your statemachine. The synthesized result is mostly the same, but one extra clock cycle per state. It’s my preferred method.

  • @danielmagnus5239
    @danielmagnus5239 8 днів тому

    Thanks for showing this webpage, and that you provided an actual link to it. It was very easy to get started and get hands on.

  • @guest7329
    @guest7329 8 днів тому

    Great tutorial😊 does state_counter consume more energy because of state transitions (for counter value itself) for states that don't use it?

    • @cccmmm1234
      @cccmmm1234 5 днів тому

      Computations in always_comb blocks only consume power if the incoming data changes. Remember what it is: it is just a cloud of combinational gates. There is no activity unless the input to that changes. Thus, what really causes the power consumption is when there is an assignment in a clocked block (always_ff ). When that happens, then the contents of the flip flops might change and the downstream combinational logic will change. Does that make sense?

    • @guest7329
      @guest7329 5 днів тому

      @@cccmmm1234 I meant "latching new values into counter register" in states where it not used

    • @cccmmm1234
      @cccmmm1234 4 дні тому

      @@guest7329 If the updated value is being stored, then yes, that would consume a bit more power because this would cause the counter to keep counting. Remember these are electronic circuits. What eats power is switching from 0 to 1 or 1 to 0. If there was an if() or something else preventing the value from updating that would prevent this. However, the if() circuit would add more gates which might defeat the purpose. For something as small as this I would not worry, but changing large amounts of state often can be a worry.

    • @FPGAsforBeginners
      @FPGAsforBeginners 4 дні тому

      Theoretically it would, but it would be negligible when looking at the design as a whole. If coding specifically for power usage (at the detriment of area, etc), it would be possible to add a gate on the counter that only counts in certain states. I usually try to size the counter appropriately (so that it is not unnecessarily big) to minimise resources. However I find that this design is particularly human-friendly, and that positive outweighs the negligible increase in power usage.

  • @ignacioosorio7942
    @ignacioosorio7942 8 днів тому

    I'm so happy to have found this channel! Thanks for your content!

  • @cccmmm1234
    @cccmmm1234 8 днів тому

    LFSRs are very interesting structures with many uses. Eg. GPS codes.

  • @cccmmm1234
    @cccmmm1234 8 днів тому

    Almost 10k subs. Catching fire!

  • @cccmmm1234
    @cccmmm1234 8 днів тому

    Everyone should have a favorite state machine! Thanks Stacey, educational as always.

  • @TahaAlars
    @TahaAlars 9 днів тому

    Amazing work as usual, thank u for the great effort 😊

  • @MrHeatification
    @MrHeatification 9 днів тому

    As a colleague engineer I love your content

  • @FPGAsforBeginners
    @FPGAsforBeginners 9 днів тому

    Hi Everyone and thanks for checking out my new video! I'm really happy with this one! Phew! It has taken a month of prep and 3 recording attempts to get it exactly as I like it, but now I can happily say I've distilled my favourite state machine (and surrounding topics) into 30 min! Hope you enjoy!

  • @MuhammadAbdullah-n4w
    @MuhammadAbdullah-n4w 9 днів тому

    amazing videos

  • @johndick996
    @johndick996 9 днів тому

    Thank you for your job ❤

  • @hassanhaq604
    @hassanhaq604 10 днів тому

    Hi, I am having a problem while creating application project. I have followed both the parts carefully, but when creating a project on Vitis IDE, while selecting a template at 4:20 both the next and finish buttons are disabled except for the blank C and empty C++ project, and by doing so I do not have platform and configs libraries and headers

  • @BoneohSanitarium
    @BoneohSanitarium 18 днів тому

    Hi, Stacey! I just finished trying this in Vivado + Vitas v 2024.1.1 and it seems that the two sides of the BRAM are not connecting to each other. Any ideas of how to debug it? Thanks!

  • @saeidreza6736
    @saeidreza6736 19 днів тому

    These three Zynq series are quite useful but they are good only for people who already have some experience with the device and the tool not for the beginners. It is also presented too fast. Please go slower in your next videos and present it with more explanations. Also having your face video is distracting especially when you have to move it from right to left and left to right, either omit it or make it much smaller. I think adding an XADC block to your design for the next video clip would be a very helpful topic. Overall, a great work!

  • @wisnueepis3593
    @wisnueepis3593 21 день тому

    Hi Stacey! you have been doing a great job on fpga explanation, could you please make some video to explain how KEEP and DON'T TOUCH keywords working in vivado. I barely can't find a good explanation on internet. thanks

  • @liliansirbu840
    @liliansirbu840 22 дні тому

    I would like to ask a question that make me confused regarding big or little endian you mentioned. Lets assume that the package to be transmitted to the interface PHY has a number of bits in a sequence p0, p1, p2, p3...pN. How should I transmit them using MII interface format: p0->tx[0], p1->tx[1], p2->tx[2], p3->tx[3] in one clock or pN-3->tx[0], pN-2->tx[1], pN-1->tx[2], pN->tx[3] in one clock? Thank you.

  • @curoamarsalus7822
    @curoamarsalus7822 22 дні тому

    Thank you for the video! Very helpful!

  • @inspirenation8177
    @inspirenation8177 22 дні тому

    Maam, please add more videos , love your methods and way of explanation. Thank You

  • @MonsieurSw4g
    @MonsieurSw4g 23 дні тому

    what is the idea of using numpy.arange(1000) instead of just using range(1000) ? i've never seen that before, the execution time if 2 times slower and the space complexity is O(N) compared to range which is O(1) because it's just a generator.

  • @mrshodz
    @mrshodz 23 дні тому

    Nice explanation.

  • @مروانعبدالخالقذنون

    Dear teacher I have built a module using PL part only to calculate the summation of Bytes. Now, I try to use the Zynq with axi-gpio to read the final value of the summation. I test each circuit individually, it is works correctly. The problem is that when I connected them together (the PL with PS), I did not get any results by the Zynq at the serial monitor. Please, if you can help. Thanks.

  • @martind4721
    @martind4721 26 днів тому

    please keep up the good work, i just stumbled on your AXI explanat ion video and it taught me more then a year long vhdl mentor at my company (he had a lot of knowledge, but was a bad teacher)

  • @BoneohSanitarium
    @BoneohSanitarium 29 днів тому

    Thank you, Stacey! Great job helping the folks like me that are new to FPGA!

  • @BoneohSanitarium
    @BoneohSanitarium 29 днів тому

    Excellent! Thank you, Stacey, great job. You're explanation of the processing of the 'how' and 'why' are super!

  • @cheneymx
    @cheneymx Місяць тому

    this video helped me quite a lot. Thx!

  • @marwanal-yoonus280
    @marwanal-yoonus280 Місяць тому

    Dear teacher Please, I have a problem during reading the status of an output switch on Zybo Z7-10. I use Vitis to program the Zynq processor with Gpio connected to a slid switch. I make the switch (input2) status as a condition as shown in the program below if (D == 1) ; The following program works only when the input2 signal that was connected to Gpio IP starts from ("1") but the program does not work when input2 signal starts from ("0"). ////////// while (1) { D = XGpio_DiscreteRead(&input2, 1); // input2 from a slide switch if (D == 1) { sum_all = XGpio_DiscreteRead(&input, 1); // input is a 32-bit data printf("%x " , sum_all); sleep (1); } else { XGpio_DiscreteWrite(&output, 1, 0); // output is a LED printf("No_Signal "); sleep (1); } } ///////////// i.e. the program works only when I change input2 from "1" to "0" but does not work when the input2 start changes from "0" to "1".

  • @andyashton7061
    @andyashton7061 Місяць тому

    Excellent video as always! I would love it if you could show how to do a FIR filter, showing multiplication/accumulating and rounding, and pointer handling, without timing errors! Thanks so much 🙂

  • @abhishek1831994
    @abhishek1831994 Місяць тому

    Why do you need to use create_clock constraint? What does this actually create? The top module has name clk. But what does sysclk do? Isn't it sufficient to mention the Pin and IO std.

  • @lontongtepungroti2777
    @lontongtepungroti2777 Місяць тому

    thank you for the amazing explanation:) love the enthusiasm

  • @luigimattei7698
    @luigimattei7698 Місяць тому

    Thanks a lot from Italy

  • @animco3291
    @animco3291 Місяць тому

    amazing ✨✨

  • @boyillahareeshreddy3410
    @boyillahareeshreddy3410 Місяць тому

    Hi, I’ve been following your videos, and they are really good. I wanted to ask for a favor, if you don’t mind. Could you please make another video on STA with a real-time example, such as a FIFO or some protocols? In that video, it would be great if you could explain how to solve timing issues like negative slack, setup, and hold time violations.

  • @bofa-zi4fj
    @bofa-zi4fj Місяць тому

    Could you please make a tutorial on how to re-upload a .mem file after making changes to it so that we don’t need to re-generate a bitstream? Many thanks!