Author Topic: FPGA for beginner  (Read 5580 times)

0 Members and 1 Guest are viewing this topic.

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
FPGA for beginner
« on: August 20, 2024, 08:43:48 pm »
I'm starting out with FPGAs, reading along with online lectures on Digital Design and Computer Architecture from Zurich University. They use a Basys 3 board for labs and eventually designing a MIPS processor. I was thinking of getting an FPGA board and trying some examples myself, but it would be nice to have the board be useful beyond the course, perhaps implementing other processors or working with computer vision/robotics.

Considerations:
Don't want to spend a fortune testing the waters, but also don't wish to outgrow this board after a few months.

One board I have in mind is an Artix A7-lite. It has few buttons/switches/LEDs and no 7-segment displays, unlike the Basys 3. However, it has usb c ports, hdmi, and a bigger FPGA chip for about the same price. I feel that I can always add buttons/displays as needed.

The board I mentioned above likely has worse documentation, which is a downside but not a deal breaker. Same for its inability to simply replicate lecture code written for the Basys: I'm willing to actually understand how this works, rather than copy-pasting.

The biggest issue is my lack of knowledge. Trying to learn fast, but understanding what ports, how many LUTs, how much DDR or QSPI flash I need is beyond me at this point.

Question: what is a good board to choose? Or should I stick to simulations until I can gain some traction?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #1 on: August 20, 2024, 09:50:16 pm »
Here is how it usually goes:
1. Try simulations, it is cool, I want a board.
2. Get a board, blink an LED, it is cool.
3. Go back to the simulation, since it is the only meaningful way of developing a big project.
4. Once it works in the simulation, start working with the real board.

The only real reason to add (2) is if it makes you excited and you want to see something work. But it will not be very useful for the actual development.

One of the reasons for this is that hardware synthesizers are annoyingly good at optimizing logic, so you need to have the project completed to a large degree before it would do anything at all in the hardware. Or you need to create stubs for everything to prevent the logic fro being optimized out.

Also, MIPS is in the past, your life would be much easier if you switch to RISC-V. Basic ISA is 90% the same, so it is not a huge switch.
« Last Edit: August 20, 2024, 09:51:56 pm by ataradov »
Alex
 

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #2 on: August 20, 2024, 10:12:54 pm »
I was only thinking MIPS due to the course material using it, so if I want to follow along I'll need to do the same. I don't mean to say I'll stick to MIPS in future designs, just don't see how to learn otherwise, at least with this course.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #3 on: August 20, 2024, 10:23:35 pm »
MIPS is fine, assuming the course material has toolchains in it. RISC-V is just better because there are a lot of pre-built toolchains, so you don't have to mess with building GCC from the source.

At the same time many courses have been updated for RISC-V, so you may want to look for an updated version of the course.
« Last Edit: August 20, 2024, 10:28:20 pm by ataradov »
Alex
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15439
  • Country: fr
Re: FPGA for beginner
« Reply #4 on: August 20, 2024, 10:27:39 pm »
Yep. Now of course there's a large gap between blinking a LED and implementing a CPU, so I'd suggest starting with the basics (if you're a beginner) and not run in all directions right from the start.
 
The following users thanked this post: boB

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #5 on: August 20, 2024, 10:55:32 pm »
At the same time many courses have been updated for RISC-V, so you may want to look for an updated version of the course.
It's a 2024 course unfortunately. Perhaps I need to look for another one...

Yep. Now of course there's a large gap between blinking a LED and implementing a CPU, so I'd suggest starting with the basics (if you're a beginner) and not run in all directions right from the start.
As in, do not buy a board to start out?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #6 on: August 20, 2024, 11:02:07 pm »
Buy a board and do simple stuff that has much shorter iteration cycles. So, the time from simulator to the board is much shorter and you will actually use the board.

Like that 7 segment display is multiplexed. If you are new to the digital design, making it show some numbers is not a trivial task. So, start with doing that and begin very comfortable doing it.
Alex
 
The following users thanked this post: anvoice

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #7 on: August 20, 2024, 11:08:12 pm »
Buy a board and do simple stuff that has much shorter iteration cycles.

Like that 7 segment display is multiplexed. If you are new to the digital design, making it show some numbers is not a trivial task. So, start with doing that and begin very comfortable doing it.
Sounds good.

Would the A7-lite without on board gadgets work for that assuming I add some 7-segments, or is the basys preferable?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #8 on: August 20, 2024, 11:14:03 pm »
For a beginner, the more stuff is on the board, the better. Adding displays is more annoying and takes more time that you might think.
Alex
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15439
  • Country: fr
Re: FPGA for beginner
« Reply #9 on: August 20, 2024, 11:33:29 pm »
Yep. Now of course there's a large gap between blinking a LED and implementing a CPU, so I'd suggest starting with the basics (if you're a beginner) and not run in all directions right from the start.
As in, do not buy a board to start out?

Nope. Just start with simple stuff, not right away with a CPU.
As to the board, there are many out there. You don't need a "beefy" FPGA, so you can start with something modest. What else is on the board is entirely up to you. Having at least a few LEDs is useful. More than this, depends on how comfortable you are with electronics and wiring/soldering stuff. A 7-seg LED display is always nice to have when starting with FPGAs.
 

Offline daisizhou

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: cn
Re: FPGA for beginner
« Reply #10 on: August 21, 2024, 12:35:44 am »
I'm starting out with FPGAs, reading along with online lectures on Digital Design and Computer Architecture from Zurich University. They use a Basys 3 board for labs and eventually designing a MIPS processor. I was thinking of getting an FPGA board and trying some examples myself, but it would be nice to have the board be useful beyond the course, perhaps implementing other processors or working with computer vision/robotics.

Considerations:
Don't want to spend a fortune testing the waters, but also don't wish to outgrow this board after a few months.

One board I have in mind is an Artix A7-lite. It has few buttons/switches/LEDs and no 7-segment displays, unlike the Basys 3. However, it has usb c ports, hdmi, and a bigger FPGA chip for about the same price. I feel that I can always add buttons/displays as needed.

The board I mentioned above likely has worse documentation, which is a downside but not a deal breaker. Same for its inability to simply replicate lecture code written for the Basys: I'm willing to actually understand how this works, rather than copy-pasting.

The biggest issue is my lack of knowledge. Trying to learn fast, but understanding what ports, how many LUTs, how much DDR or QSPI flash I need is beyond me at this point.

Question: what is a good board to choose? Or should I stick to simulations until I can gain some traction?

Why don't you draw a circuit board yourself?Draw the schematic yourself, then give it to JLC to make the PCB, and finally buy the components for assembly
daisizhou#sina.com #=@
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #11 on: August 21, 2024, 12:39:29 am »
This is the winner of the worst advice ever.
Alex
 
The following users thanked this post: rstofer, glenenglish, cfbsoftware, gpr, pcprogrammer

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #12 on: August 21, 2024, 12:45:09 am »
Thanks for the suggestions everyone.

I'm leaning towards the microphase A7-lite at the moment. I realize the 100T chip may be more than a beginner needs, but as long as I can add the needed hardware (I'm comfortable soldering and building circuits) maybe I can take advantage of some of its more advanced features eventually. Of course, I understand I'd be doing more work up front.

Why don't you draw a circuit board yourself?Draw the schematic yourself, then give it to JLC to make the PCB, and finally buy the components for assembly

Is that... cost efficient? I'm fine with soldering, but my PCB design is on an amateur level and buying all the components the thing needs to function (usb c ports, etc.) seems like it will offset any cost advantages.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11780
  • Country: us
    • Personal site
Re: FPGA for beginner
« Reply #13 on: August 21, 2024, 12:53:25 am »
Is that... cost efficient?
There are no cost advantages. In single quantities FPGA alone will cost you way more than the entire board. And there is zero chance a beginner would be able to design a board with 324-BGA IC.

This is on the same level as telling someone to design and build their own car because it would be cheaper.
Alex
 
The following users thanked this post: boB

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #14 on: August 21, 2024, 01:02:35 am »
Sounds about right.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4538
  • Country: nz
Re: FPGA for beginner
« Reply #15 on: August 21, 2024, 01:06:33 am »
Depends on how fancy a car you want!

 
The following users thanked this post: boB, pcprogrammer

Offline Rainwater

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
Re: FPGA for beginner
« Reply #16 on: August 21, 2024, 01:08:53 am »
Why don't you draw a circuit board yourself?Draw the schematic yourself, then give it to JLC to make the PCB, and finally buy the components for assembly
That's about the same as building a car from blocks of aluminum for the engine and some sand to make the windshield.
I would recommend getting a prototypeing kit.
The radio shack kit is the best for non-rf stuff. Over the years, i have not found anything equilivent to it.
Good luck finding a complete set. I can provide a parts list if there is a need
Te books are copyrighted, so im sure their available for download somewhere.
https://www.ebay.com/b/Electronics-Learning-Lab/158698/bn_71609432
This is what i got in the early 90s and still dev on today. Still have all the original chips(including the ones i burnt).
At most, i would suggest getting some level shifter to convert voltage levels until you're more comfortable doing it with discrete hardware and protection circuits
"You can't do that" - challenge accepted
 
The following users thanked this post: EEexpert

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15439
  • Country: fr
Re: FPGA for beginner
« Reply #17 on: August 21, 2024, 01:21:39 am »
Not only cost, but as a beginner, when running into any "bug", you will always wonder whether this is a problem with your board design/soldering or whether it's a problem in your HDL. Awful situation.

That's something you can think of doing much later on, when you have built more skills.
 

Offline EEexpert

  • Newbie
  • Posts: 4
  • Country: fi
Re: FPGA for beginner
« Reply #18 on: August 21, 2024, 02:13:42 am »
I would recommend getting a prototypeing kit.

That's really good advice.
The one who wants to explore FPGAs should get to know that FPGAs alone are not that usefull without other chips/components connected to them. And design of logic in FPGA heavily depends on what and how external electronics are connected, so prototyping kit and wires is a must have!
« Last Edit: August 21, 2024, 02:17:39 am by EEexpert »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: FPGA for beginner
« Reply #19 on: August 21, 2024, 03:06:06 am »
Don't worry about size too much. You can do advanced projects on a smaller FPGA, you just can't do large projects - a RV32I core might take up 10% of a XC7A35T, or 3% of a XC7A100T.

Think of it this way - paying extra for a 4TB SSD offers minimal benefit when you never use more than 1TB of data.

A larger FPGA does offer some advantages as the logic utilization grows (>50%), but it is also gives slower to implementation times.

Side note - a XC7A35T is a XC7A50T with a few fuses blown, so if the GUI says your design uses 80% of the logic you are only really using 60% of the physical resources, allowing you to successfully implement designs that might normally expect to have contention.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline daisizhou

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: cn
Re: FPGA for beginner
« Reply #20 on: August 21, 2024, 03:43:12 am »
Looking at this FPGA chip, I don't know why, but the failure rate of this model is always high. I have replaced many of them
daisizhou#sina.com #=@
 
The following users thanked this post: boB

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4411
  • Country: nl
Re: FPGA for beginner
« Reply #21 on: August 21, 2024, 06:22:18 am »
Maybe a board like this one on Aliexpress suits your needs. Not cheap, but cheaper then an Artix-7 100 one, and it has a display on it.

But don't forget about buying a programmer for it too.

Making your own board is not as simple as some would make you believe, especially when big BGA ic's are used. Easier to stick to development boards like the one you have in mind, but it does require adding extra hardware via the headers if needed and there you have to be aware of the voltage specifications of the FPGA. No 5V on these, so no old fashioned TTL ic's but newer versions that work on 3.3V or even lower voltages.

If you still like the Microfase A7-Lite, you can always search online for schematics of boards that do have displays on them and just copy the needed parts of those designs.

But like others wrote, there is no need for a huge FPGA. Lots of designs work in older Spartan-6 or Spartan-7 series of FPGA's. Or even from other vendors. Risc-V cores are used on boards like Tang Nano 9K.

Offline anvoiceTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: us
Re: FPGA for beginner
« Reply #22 on: August 21, 2024, 08:56:11 am »
This is what i got in the early 90s and still dev on today. Still have all the original chips(including the ones i burnt).
At most, i would suggest getting some level shifter to convert voltage levels until you're more comfortable doing it with discrete hardware and protection circuits

I have two of those actually. I also have level shifters, though I'll have to check if they can do the correct levels.

Maybe a board like this one on Aliexpress suits your needs. Not cheap, but cheaper then an Artix-7 100 one, and it has a display on it.

But don't forget about buying a programmer for it too.

I have a programmer of some kind (bought years ago so history is gone on Aliexpress, and I'm travelling so can not verify). Do you know if you need a Xilinx specific one or if any generic JTAG programmer will do? I also have a logic analyzer from years back that I never used, hopefully that will come in handy.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4411
  • Country: nl
Re: FPGA for beginner
« Reply #23 on: August 21, 2024, 09:03:09 am »
I have a programmer of some kind (bought years ago so history is gone on Aliexpress, and I'm travelling so can not verify). Do you know if you need a Xilinx specific one or if any generic JTAG programmer will do? I also have a logic analyzer from years back that I never used, hopefully that will come in handy.

I'm not sure, but think that the Xilinx (AMD) software wants a dedicated programmer. Maybe others with more experience can chime in on this.

A logic analyzer is always handy when working with digital signals.

Offline gpr

  • Contributor
  • Posts: 31
  • Country: gb
Re: FPGA for beginner
« Reply #24 on: August 21, 2024, 02:26:21 pm »
btw, how safe is it to buy something like FPGA devboard on aliexpress, considering there are a lot of clones and fakes of everything there?

I'm also thinking about getting devboard to start with FPGA, keeping opensource toolchain in mind, and trying to find some inexpensive board to start with.
Right now looking at olimex with ice40, pretty well supported it seems: https://www.mouser.co.uk/ProductDetail/909-ICE40HX8K-EVB
It has some drawbacks, like requiring external SPI programmer, but overall 26£ price is hard to beat.

FPGA devboards prices make me sad, everything under 50£ is in "nano" category with only a few pins available. Something capable of running riscV (and especially linux) is 100£ and more.

There are also different versions of Tang/gowin boards everywhere, but I'm not sure how well they are supported and documented, I have an impression they are not very usable without proprietary gowin tools.

Any advice is appreciated.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf