Get Started With FPGAs and Verilog in 13 Minutes!

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 98

  • @VorpalForceField
    @VorpalForceField 7 місяців тому +12

    I have wanted for years to dive into FPGA's ... Excellent demo ..!! Thank You for sharing ... Cheers :)

  • @rieduciumaratonas
    @rieduciumaratonas 7 місяців тому +3

    At last after so many years and unused modules I managed to do something with FPGA. Thank you for this breakthrough!

  • @DavidKyazze-Ntwatwa
    @DavidKyazze-Ntwatwa 18 днів тому

    I just bought a nano 9k and this is an amazing video! Nice editing. Thank you for teaching me I really want to master fpga

  • @float32
    @float32 8 місяців тому +23

    I started as a software person and went to verilog. The first thing I learned is that abstraction uses up all the LUTs and routing. My friend works for an FPGA company and said they never use abstractions, for the core IP stuffs. Makes sense.

    • @goodn1051
      @goodn1051 7 місяців тому +2

      just curious, what example of a company is an "FPGA company"

    • @float32
      @float32 7 місяців тому

      @@goodn1051 Altera, Xilinx, etc.

    • @vitalyl1327
      @vitalyl1327 7 місяців тому +3

      Abstraction can be zero-cost. I generate pipeline register chains and FSMs from a high level code all the time, and the result is usually better than what I'd write manually. Same goes for things like AXI bus handling, arithmetic ops scheduling on a long pipeline, etc.

    • @vitalyl1327
      @vitalyl1327 7 місяців тому

      ​​@@goodn1051e.g., quite a few HFT shops are FPGA-first..Though now there are some ASIC firsr ones as well.

    • @stickyfox
      @stickyfox 7 місяців тому +1

      Everything in industry is licensed, and you're lucky if you ever get a peek inside the code. Most designers never do any actual coding.

  • @ClintTheriault
    @ClintTheriault 6 місяців тому +2

    This dev board looks like a cool board to use as a base to make a ISA CGA 2 HDMI graphics card for old 1980's era PCs. I've been looking at something like this for my final Electronics Engineering project.

  • @thanatosor
    @thanatosor 6 місяців тому +7

    Yes FPGA... the Excel of Hardware.

  • @JoaoCarlos-df1zw
    @JoaoCarlos-df1zw 8 місяців тому +20

    The explanation of FPGA was great! Still find they are pure magic though

    • @OneMilian
      @OneMilian 7 місяців тому +4

      Same here, maybe houses are full of fpgas who build all the hardware you own in the future, like you bought a sound system, bahm its build right into your house

    • @poisonouspotato1
      @poisonouspotato1 7 місяців тому +8

      ​@@OneMilianI had a stroke trying to read this

    • @poisonouspotato1
      @poisonouspotato1 7 місяців тому

      You are contradicting yourself. He explained FPGAs like he expected us to already know how they work.

    • @OneMilian
      @OneMilian 7 місяців тому +1

      @@poisonouspotato1 get well & healthy soon!!

    • @poisonouspotato1
      @poisonouspotato1 7 місяців тому

      @@OneMilian it took me a day to figure out what you meant. Also, no, you can't make speaker membranes from fpga chips without some sci-fi tech magic ooze.
      Fix your grammar.

  • @svofski
    @svofski 8 місяців тому +4

    neat, I have this exact board waiting to get used

  • @lutfijd
    @lutfijd 8 місяців тому +4

    Just got my tang nano 9k yesterday, perfect timing for this video!! it does suck how they connect lines to low instead of high.

    • @enginerdy
      @enginerdy 7 місяців тому +1

      It’s common for digital outputs to have more ground drive current capability than high drive current. This is because the low side N FET in the IO pin is easier to drive.

    • @conorstewart2214
      @conorstewart2214 7 місяців тому

      How does it suck? What difference does it actually make in practice? Very little, once you know about it and you can figure it out just from looking at the schematic.
      Active low vs active high is a very easy concept to understand.

    • @lutfijd
      @lutfijd 7 місяців тому +1

      @@conorstewart2214 yes it is a simple concept and as enginerdy pointed it makes sense to make it so. I guess what i was trying to convey is that its annoying to have to set a pin to 0 for something to turn on and 1 to turn off, conventionally its the other way around. as you said, not a biggy.

  • @MultigrainKevinOs
    @MultigrainKevinOs 3 місяці тому

    Really fantastic video, that is such a clear and easy way to understand what is going on with FPGAs. Thanks!!

  • @xXOphidianXx
    @xXOphidianXx 2 місяці тому

    Ich danke Dir für das tolle Video, hat mir nochmal das Verständnis gefestigt.

  • @pkraveendranath4081
    @pkraveendranath4081 6 місяців тому

    Very helpful video for a beginner! Thank you very much. Please continue and let us have more practical examples that use the GPIO pins too!!

  • @alicewyan
    @alicewyan 8 місяців тому +1

    This is exactly the video I needed, at the exact moment I needed it, as I have the smaller 1k version on its way from China :)

  • @IoanFesteu
    @IoanFesteu 5 місяців тому +1

    Thank you for your intro to FPGA! Another great video! I am wondering if one can implement an 1D or even 2D Cellular Automata with this board?

  • @ukwebb
    @ukwebb 6 місяців тому

    Love your little nod to the awesome BBC micro with its schematic :)

  • @erichpoly4434
    @erichpoly4434 7 місяців тому +2

    I don't know if you have a video about Analog FPGA. However, it would be cool

    • @DoctorVolt
      @DoctorVolt  7 місяців тому

      I have never heard of Analog FPGAs..

    • @erichpoly4434
      @erichpoly4434 7 місяців тому

      @@DoctorVolt I confused it with FPAA. However, the question is whether you are making or have made videos about it.

    • @conorstewart2214
      @conorstewart2214 7 місяців тому

      @@erichpoly4434 there are no commonly used or available FPAA. They just don’t really exist yet (in any usable or accessible capacity) so how do you expect him to make a video on it?

  • @foldi001
    @foldi001 4 місяці тому

    Pretty easy. Good video. Thanks!

  • @Promilus1984
    @Promilus1984 7 місяців тому +2

    Have been wondering about Tang Nano 9k to house FT816 softcore modified to work in Commodore and Atari range of machines in place of original 6502 (and variants) but to use on-board PSRAM as real 16b local memory in 16b mode. Basically trying to do *slightly* improved SuperCPU ... Original device was based on WDC 65C816 processor @ up to 20MHz iirc, but 65C816 uses 8bit data bus anyway (much like 68008 or 8808) and also uses it to get address bits 16 through 23 (kind of like 8051 does multiplex data and address on one port for external memory interface). Which is ok from as close pin compatibility as possible, but is messy. With FPGA I can route all extended memory (24b space save first 64K) to PSRAM exposing only regular 6502 interface to GPIOs (obviously with level translators) and that also means I can get real 16b data interface to provide better performance in 16b mode.

    • @thanatosor
      @thanatosor 6 місяців тому

      have you tried with Tang Nano 20k + NESTang on it ?

  • @ProfessorLinux
    @ProfessorLinux 7 місяців тому

    Very informative. Thank you.

  • @treideme
    @treideme 7 місяців тому

    Really good video. Thanks.

  • @theforthdoctor7872
    @theforthdoctor7872 8 місяців тому +1

    Outstanding

  • @johanneswack4017
    @johanneswack4017 7 місяців тому +1

    Just watched your video. During watching, made my Aliexpress order... Looks like fun, but what can this device, what an Arduino can't do?

    • @DoctorVolt
      @DoctorVolt  7 місяців тому +1

      On an FPGA, everything is done in parallel, like on an actual circuit. On a Microcontroller, the steps are done one after the other. So FPGAs are much faster and there are less timing issues.

    • @conorstewart2214
      @conorstewart2214 7 місяців тому +2

      An arduino is just a microcontroller, it executes code an instruction at a time. An FPGA in comparison can implement digital logic, you can make digital circuits inside of it, you can even make processors like the one found in an arduino within an FPGA.
      A major advantage of using an FPGA instead of a microcontroller is that you can have multiple things happening at once with precise timing. Each thing you want to do can be implemented as its own block and they can all operate simultaneously since they are all separate circuits. You could have one section driving a motor, another reading from a sensor, another driving a display and they all work at the same time, so latency is minimised (only the latency of that block) and timing can be very precise and no task can interfere with each other since they are separate circuits.
      Compare that with a microcontroller where it can only do one thing at once and the processing power is split between everything it is trying to do. If you want to control a motor, read a sensor and drive a display, then the arduino can only do one thing at once, so you have to either do each task in sequence or split them up, so you do a bit of each task at a time and keep on switching what task you do. This does work but it does mean that precise timing is difficult and latency is higher. A common way to let microcontrollers do multiple things is by using a Real Time Operating System (RTOS) but this is just organising how the processors time is split up, it can still only do one thing at once. This generally leads to variable latency, since if there are a lot of higher priority tasks needing done then lower priority tasks can be waiting a while until they get done.
      A related example of advantages of FPGAs is that everything can be done in parallel. In an arduino you can only do one addition at a time. On an FPGA you can set up multiple adders and have them perform many additions at once in parallel, the same applies to any other thing you want to do. So if you had 6 sensors and you needed to calculate something based on the sensor reading, the arduino would have to read each sensor and then calculate it one at a time whereas an FPGA can be set up with an individual circuit for each so that they are all done simultaneously.
      An important use of FPGAs is that they can implement any digital protocol if the FPGA is fast enough. So if you need to use an uncommon protocol and no common microcontrollers support it in hardware then you can implement it in an FPGA instead. Or if you implement a processor (maybe a RISC-V processor) in an FPGA then the peripherals are very modular, you can design custom peripherals or you can add any you need, so if your application needs 6 uart (serial) but no SPI or I2C then you just attach 6 uart blocks to it, or if you need to control 10 stepper motors then you can just add on 10 individual stepper motor control blocks. You only need to add what you need so you can basically create the ideal microcontroller for your application. Another advantage of most FPGAs is that they have a lot of available pins.
      You can find FPGAs in things like reconfigurable accelerator cards for computers or networking equipment. They are also used for testing chip designs before they are made. Often it is better to get an Application Specific Integrated Circuit (ASIC) made as they run faster and with lower power and they are cheaper in bulk amounts, like hundreds of thousands if not millions of chips but they are very expensive if you just need a small amount which is why people use FPGAs. FPGAs are often used in robotics. FPGAs are also often used in oscilloscopes or logic analysers as they can handle and process the measurements at high speeds. As another example each channel on an oscilloscope or logic analyser can be handled separately with its own circuit if you wanted.
      FPGAs do have some disadvantages though. They are generally considerably more expensive than microcontrollers, they aren’t very fast (compared to a classic arduino they are fast, but not compared to most STM32 microcontrollers for example) but their speed is rarely an issue since they can do everything in parallel, also more expensive FPGAs are faster generally. They also tend to use more power than doing the same thing on a microcontroller would use but again that depends on the use case, it is possible to simplify some tasks on an FPGA so they use very little hardware which doesn’t use much power especially if the task doesn’t need a processor in the first place.
      As a hobbyist the cost of FPGAs isn’t much of an issue, especially if you only need small ones. The cheap FPGA dev boards aren’t much more expensive than microcontrollers. Also as a hobbyist you will only be making a small amount of something (likely only one) so again the cost of FPGAs isn’t much of an issue. They are definitely worth learning and using though and can actually save you money too, instead of buying an expensive microcontroller of SBC just so it can do everything you need you could just use an FPGA instead and make it do everything you need.
      As for FPGA development boards sipeed are very good, they have everything from tiny ones with ~1000 LUTs and very little else to reasonably sized ones like the 138k with 138k LUTs and can plug into a PCs PCIe connectors and has DDR3 RAM built into the board with a built in processor too. A good middle ground is the 20k and 25k ones, they are big enough to implement decent processors on or a lot of logic and they have memory built in, like DDR3 or SRAM. The 9k is enough to implement processors on too though.
      For getting started you should start with learning digital logic first and then learn how to use the FPGA.

  • @liliansirbu840
    @liliansirbu840 4 місяці тому

    can you do a an example using PSRAM Memory Interface? thanks.

  • @davemorphling7432
    @davemorphling7432 7 місяців тому

    where do you set the clock rate and thus the sensitivity of the button? I mean, what's stopping the counter to be increased by 1000 times after one press? is the logic only triggered on edge transitions?

    • @DoctorVolt
      @DoctorVolt  7 місяців тому

      Yes, always @(posedge btn1) begin...

  • @kuro68000
    @kuro68000 8 місяців тому +1

    Thanks for this. I'm going to try this FPGA. I've looked at stuff like Quartus but it's just gigabytes of proprietary crap.

  • @timc3600
    @timc3600 7 місяців тому +1

    Is it bad that I recognised the BBC Micro Circuit Diagram within a second of it being put on screen.

    • @DoctorVolt
      @DoctorVolt  7 місяців тому

      Yes, it was the BBC Micro.

    • @timc3600
      @timc3600 7 місяців тому +1

      @@DoctorVolt I spent many days looking at that circuit diagram when I was young. I learned so much from that platform.
      Nice work on the Dev board.

  • @SurvivalSquirrel
    @SurvivalSquirrel 8 місяців тому +2

    1:33 3 primary modes? I count 5 ;-)

  • @ravirajchilka
    @ravirajchilka 7 місяців тому

    Can you make some projects for beginners?

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

    Can you make guitar pedal using fpga. İncluding reverb echo distortion chorus

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

      Sure, connect a ADC and a DAC to it and use its internal DSPs to apply any effect you want to your guitar riffs.

  • @Dudleymiddleton
    @Dudleymiddleton 8 місяців тому +1

    Field Programmable Gate Array

  • @DisgruntledPigumon
    @DisgruntledPigumon 6 місяців тому

    Can these cheap FPGAs do the same as the expensive ones that are used for emulating old game consoles?

    • @DoctorVolt
      @DoctorVolt  6 місяців тому +1

      Yes, of course. I am currently working on this.

  • @OMNI_INFINITY
    @OMNI_INFINITY 3 місяці тому +2

    *If anybody wants a useful project to make on FPGA, a diode ladder filter emulation that can connect to MCU would be handy. Those filter emulations are still too burly for doing much more than running them in a synthesizer on an MCU.*

  • @lutfijd
    @lutfijd 7 місяців тому +1

    how did you access the schematic of 9ktang at @6:43? is it in the gowin program?

    • @DoctorVolt
      @DoctorVolt  7 місяців тому +2

      With a quick search on Google

    • @lutfijd
      @lutfijd 7 місяців тому +1

      @@DoctorVolt lol ok ;(, found them first link on google ;)

    • @conorstewart2214
      @conorstewart2214 7 місяців тому

      All schematics, examples and other information are on the sipeed wiki or their GitHub.

  • @vincanityl
    @vincanityl 7 місяців тому +2

    MCU do not emulate circuits. MCU are a processor (usually RISC) that have peripherals built into them. They do not emulate circuits. FPGA emulate circuits. They have these gates that based on programming set a logic operator to them. Also based on programming, they chain together. Hence the programmable gate array part. MCU is pure hardware. FPGA is basically hybrid hardware simulator. You can program an MCU on a FPGA but not the other way. Hence why there are SoC designs with both. Typically the FPGA reconfigures the MCU

    • @thanatosor
      @thanatosor 6 місяців тому

      Yeah, this is why FPGA is interesting. People tend to mistake MCU with it because they share the same level of hardware.

  • @poisonouspotato1
    @poisonouspotato1 7 місяців тому +4

    0:20 you say this like its some inherently bad thing.
    Also people should stop normalizing being forced to create an account to use an IDE without good alternatives

    • @alexcrouse
      @alexcrouse 7 місяців тому +1

      And they don't tell you how big the download is, and it's like 200k/s download... Not doing that on my wifi hotspot right now, guess i have to wait till i get home!

  • @jaapjethee
    @jaapjethee 8 місяців тому +2

    You asked what you can make, how about making the 1 bit cpu UE-1 that Usagi electric is working on in his channel. It should de simple enough i think... Well not for me.

    • @MechanicaMenace
      @MechanicaMenace 8 місяців тому +1

      In HDLs it's not really any harder making a 64 bit processor compared to a 1 bit one. I think something like the SAP-1 (what Ben Eater made on breadboards) would be cool and more capable. And would leave plenty of room to implement peripherals like say sprite based video...
      Not shitting on what Usagi is doing btw.

    • @jaapjethee
      @jaapjethee 8 місяців тому +1

      @@MechanicaMenace true but is it easier to understand. For me i dont even understand how usagi's cpu works but i thought this might help. But why not do both to show the difference;)

    • @MechanicaMenace
      @MechanicaMenace 8 місяців тому +1

      @@jaapjethee it's not really easier to understand, just easier to build out of the building blocks (i.e. valves/tubes) Usagi is using. Whereas the SAP-1 was specifically designed to be easy to understand.

    • @conorstewart2214
      @conorstewart2214 7 місяців тому +1

      @@jaapjethee a 1 bit cpu isn’t really easier to understand, it is very easy to understand basic 8 or 32 bit processors once you break it down and look at what the individual sections do.

    • @conorstewart2214
      @conorstewart2214 7 місяців тому

      @@MechanicaMenace one of my first FPGA projects was following Ben’s videos and implementing his processor on a lattice FPGA. It was definitely worthwhile and it was good to figure out how you need to implement things differently on an FPGA vs with chips on a breadboard. For example the fact that you can’t use tristate buffers within an FPGA and you need to use multiplexers instead.
      Similarly “Nand to Tetris” is good although you use their own hdl and only simulate it, but after doing it that way it should be easy to implement it on an FPGA.

  • @Atmatan
    @Atmatan 7 місяців тому

    Yeahhhhhhh.
    I'm going to leave this to the people it actually makes sense to.
    Nice pipe dream but I comprehend very little of this.
    Thanks though.

  • @hval9085
    @hval9085 7 місяців тому

    build an oscilloscope based on Tang Nano 9k

    • @DoctorVolt
      @DoctorVolt  7 місяців тому

      That's not possible, because the Tang Nano has no analog inputs.

  • @OMNI_INFINITY
    @OMNI_INFINITY 3 місяці тому

    Thanks!