Tutorial: Digital to FPGA 101

  Рет қаралды 14,060

rj45 Creates

rj45 Creates

Күн бұрын

A tutorial for electronics enthusiasts new to FPGAs explaining how to run a Digital design on an FPGA with open source tools. Covers simulation in Verilator, building and compiling it, as well as getting a UART setup so that you can talk to it.
Get the source code here: github.com/rj45/rj32/tree/mai...
Get the program I am using here: github.com/hneemann/Digital/r...
If you would like to support this work and encourage me to make more videos:
ko-fi.com/rj45_creates
apio: github.com/FPGAwars/apio
compiling from source:
www.clifford.at/icestorm/
projectf.io/posts/building-ic...
NandLand fpga info channel: / nandland
-- Table of Contents ---
00:00:00 - Intro
00:01:30 - What's covered?
00:05:00 - Required tools
00:07:15 - Tool Descriptions
00:13:07 - What do we need to do?
00:15:16 - Digital Circuit Demo
00:18:01 - Marking Un-Exportable Circuits
00:24:50 - Exporting to Verilog
00:26:38 - Generating the PLL Verilog
00:31:00 - UART Verilog
00:34:14 - Block RAM Verilog
00:36:52 - Linting with Verilator
00:40:25 - Building a Verilator Simulation
00:50:53 - Tracing with Verilator and GTKWave
00:53:55 - Building the FPGA Bit Stream
01:01:42 - Uploading to the FPGA
01:04:40 - Conclusion

Пікірлер: 47
@jecelassumpcaojr890
@jecelassumpcaojr890 2 жыл бұрын
Great job getting all this to work! Note that RTL means "register transfer LEVEL" in contrast with "transaction level modelling", "gate level", "switch level" or "transistor level" designs. People are normally sloppy and use RTL to mean "Verilog or VHDL", but strictly speaking RTL is only one of the many possible hardware design styles that these languages support (though by far the most recommended one). In RTL all the registers in the systems are driven by a single clock and in any cycle only a subset of the registers are enabled for updating. Between the registers you have combinational logic with a path selected by multiplexers.
@rj45Creates
@rj45Creates 2 жыл бұрын
Ah, okay, that's good to know. I just saw it as a common naming convention for folders and didn't think to look it up. Thanks for clarifying that for me!
@vsdsas
@vsdsas Жыл бұрын
@@rj45Creates why you stop posting
@eddyfontaineyoutu100
@eddyfontaineyoutu100 2 жыл бұрын
Thanks for this nice demo ! 👍 Cheers, Eddy.
@phillipneal8194
@phillipneal8194 8 ай бұрын
Excellent ! Thank you. That was lots of hard work.
@matheusisrael4121
@matheusisrael4121 2 жыл бұрын
man, this channel is a gold mine bro... i was looking for a channel that could help me learn more about building image on a screen, processors, vintage computers you know, to learn each day more about enginnering. By the way, i'm a Enginnering student from São Paulo (Brazil), and man.... you are already my favorite channel now haha. i'm gonna watch all those videos and share this with my friends 'cause this is amazing... for sure. Just Thank you for exist, you are inspiring a 20 years guy to learn more about computers and maybe in the future make new positive things to the society. Congratulations, and a great "Hello world!" from Brazil man!
@rj45Creates
@rj45Creates 2 жыл бұрын
Thanks, glad I could be helpful!
@reborok
@reborok 2 жыл бұрын
such a niche channel but thank god it exists. love the content, would love more :D best part of every! video "helloooooo... welcome welcome" :D. keep it up
@rj45Creates
@rj45Creates 2 жыл бұрын
Thanks! I have been side tracked for the time being with other things but hopefully my attention will swing back soon :-)
@damny0utoobe
@damny0utoobe 2 жыл бұрын
A very modern FPGA 101 course/tutorial
@rj45Creates
@rj45Creates 2 жыл бұрын
Thanks :-)
@RyanThompsonrthomp
@RyanThompsonrthomp 2 жыл бұрын
Love this video. Thank you!
@rj45Creates
@rj45Creates 2 жыл бұрын
You're welcome, glad you found it helpful :-)
@robertparenton7470
@robertparenton7470 Жыл бұрын
Thank You!
@BryanChance
@BryanChance 2 жыл бұрын
I love this stuff. I got into devops and software engineering but this seem more interesting. -:/
@Quacksometi
@Quacksometi Жыл бұрын
It's now been a year hope u make a new video anytime soon
@tombouie
@tombouie 9 ай бұрын
Thks
@leonardochiruzzi7642
@leonardochiruzzi7642 2 жыл бұрын
It sounds interesting, I'll wait for YT to activate the automatic translator for me, because I didn't understand anything. One thing I didn't like is having to do the Makefile file "by hand" for compilation. I'll try later. Thanks!
@rj45Creates
@rj45Creates 2 жыл бұрын
Thanks! FuseSoC can generate the Makefile for you. I have been tinkering with it in the fusesoc folder of my github repo. I may do a tutorial on it in the future. Another option is litex but that would be a whole series of videos.
@morthim
@morthim 2 жыл бұрын
this is a pretty great video. i was able to understand most of it first time through, which is uncommon for some more technical video content creators. there are some difficulties from the complex variety of tools, it isn't entirely clear what each tool necessarily does, but that is just cause you are approaching it from a bit more explicit a level of knowledge than i'm prepared for. is there a site or forum which gathers together interoperable tools related to fpgas generally, and which you think is a good source of information? the GTK tool is neat, but it is mostly just a signal cascade chart. is there something which gives more conventional readings? so you can see and step through the transformation of variables.
@rj45Creates
@rj45Creates 2 жыл бұрын
So, the tutorial is on the open source tools specifically. There's only a limited number of them and they are pretty new. Searching for open source FPGA synthesis should bring them all up. Many of the tools are related to one another. As for gtkwave, I am only aware of that one tool for doing that that's open source. There might be closed source alternatives, but I am not familiar with them.
@kayakMike1000
@kayakMike1000 2 жыл бұрын
My FPGA dev boards is one of those Artix 7's, I think I have a bucket of external RAM. Going to be interesting to learn this... DDR3!
@rj45Creates
@rj45Creates 2 жыл бұрын
This video specifically covers the open source toolchain, which for now is mainly Lattice ICE40 and ECP5 FPGAs. I think yosys has initial support for Artix 7, but I am not sure if nextpnr works with it yet, it's still early days for Xilinx support. But, I think you can synthesize with yosys and have Vivado do the rest. DDR3 will be a challenge, if you don't want to use a DRAM controller from Xilinx, then really LiteDRAM is the only option. It's a huge learning curve to learn how to use it but it's the most mature and stable open source DRAM controller I know of.
@jeanclaudejosephbadji5418
@jeanclaudejosephbadji5418 2 ай бұрын
Thank you for your video. But Please use black background on your future videos...
@johntilghman
@johntilghman 2 жыл бұрын
Are any PMODS needed or should have for this?
@djsbriscoe
@djsbriscoe 2 жыл бұрын
Will this tutorial work with a Lattice iCEstick? I'm doing the Digikey tutorial first (which uses the iCEstick ICE40HX1K) but i'd like to continue with this tutorial next.
@rj45Creates
@rj45Creates 2 жыл бұрын
How you upload to the FPGA is different, and the two parameters for nextpnr to tell it which chip and package you are using will be different. Otherwise it should all be the same.
@asmi06
@asmi06 2 жыл бұрын
I have another question for you - have you considered doing something more modern - like RISC-V RV32I CPU? It's quite simple (less than 40 opcodes if my memory serves me), yet you can use a full-blown gcc C cross-compiler and the rest of GNU toolchain to write software for it. You will still need a very short startup sequence in assembly (set up the stack, initialize interrupt(s), clear BSS and stuff like that), but everything else can be 100% C or even C++ if you so desire. Also if you ever want to work with more serious FPGAs, Xilinx Vivado/Vitis IDEs work in Linux as well as Windows (and I think they work better in Linux), and their free version supports most FPGAs you will likely ever use (those devices which require paid version cost a fortune by themselves such that license cost is comparable to a price of a single such device). I work with their devices for a number of years now, and they cover pretty much everything I ever want to design (aside from the very low-end, where ice40U and such are more competitive).
@rj45Creates
@rj45Creates 2 жыл бұрын
RISC-V doesn't come in a 16-bit variety, and I wanted to design my own CPU with my own ISA because that's more fun than building yet another RISC-V core. Designing an ISA and building a C compiler for it so far has been heaps of fun. As for the proprietary tools, maybe one day I will play with them. I am not necessarily opposed. But for now I am much preferring low cost FPGAs to keep the cost of my hobby to a minimum. I don't plan to do this professionally so I don't have that as a reason to learn the proprietary tools.
@asmi06
@asmi06 2 жыл бұрын
@@rj45Creates Well working with FPGAs was a hobby for me as well, until one day I was approached by a person on the forums who then became my first commercial client, and after that others followed. So you never know what is waiting for you at the next turn ;)
@asmi06
@asmi06 2 жыл бұрын
@@rj45Creates As for RISC-V, I just like this ISA because it's small and simple yet very efficient. And if you do design it in Digital - I'm pretty sure you will become the first person to do so :)
@rj45Creates
@rj45Creates 2 жыл бұрын
@@asmi06 RISC-V is a very heavy influence in the design of my ISA, as I also find the design extremely well thought out and about the simplest instruction set I have studied so far. And I am sure such videos would be quite popular. But I am not really interested in building yet another RISC-V core for FPGA. There are already several very good open source cores out there. And well, I am not the kind of person to prefer a well worn path.
@okbriel
@okbriel 7 ай бұрын
Come back !
@naikrovek
@naikrovek 2 жыл бұрын
"fiffo" :)
@rj45Creates
@rj45Creates 2 жыл бұрын
I guess feye-foh is another common pronunciation :-)
@morthim
@morthim 2 жыл бұрын
"i presume you are using Digital" i just googled that, and got trash. what company makes "Digital"?
@rj45Creates
@rj45Creates 2 жыл бұрын
Digital is open source, it's maintained by one person. You can find a link to it in the description of most of my videos. And yes, it's not a very google friendly name unfortunately.
@asmi06
@asmi06 2 жыл бұрын
Sorry, but I have to disagree with you on make (especially "no nonsense" part). In my 20+ years long career as developer I'm yet to meet a developer who can actually write a make file for a reasonably complicated project (not "hello world") without extensive googling. That is a sign of bad system. I use it myself too for both hardware and software projects, but not because it's good, but because it's ubiquitous, which was important for me as some of the places I worked at did not have Internet connection to my work PC for security reasons, so I couldn't just install what I wanted there.
@rj45Creates
@rj45Creates 2 жыл бұрын
Yeah, I guess I go on to copy and paste magic incantations I found on the internet, so point taken. I just always use make, and probably for the reason you state: it's ubiquitous.
@kayakMike1000
@kayakMike1000 2 жыл бұрын
Well... You never met me... But writing make files is sorta my job. And I learned by extensive googling and copy/pasting from other projects. So I guess you could make the argument that I already did the extensive googling, but remembered most of what I had to figure out.
@asmi06
@asmi06 2 жыл бұрын
@@kayakMike1000 The fact that there is such a job as writing make files again goes to show how convoluted the system is. There is no such job as creating projects in Visual Studio, or Eclipse, or IDEA, or even for reactjs, nodejs or angular. Developers just do it whenever they need to, with no fuss nor googling required.
@kayakMike1000
@kayakMike1000 2 жыл бұрын
@@asmi06 well.... Sorta. I am a build engineer, make is one of ten or so build systems I know very well. There are lots of tools that generate makefiles, knowing these tools is pretty important. Mostly, though, being a good build engineer is really understanding how to use your compiler and linker.
@y_x2
@y_x2 Ай бұрын
I have a lot of experience with FPGA, the explanation is very confusing... An UART is very simple! When you know how things works it's easier to design from scratch...
@Thoughtflux
@Thoughtflux Ай бұрын
Can you point me to a resource you recommend? I'm just starting off with fpga..
@ivankraft5702
@ivankraft5702 Жыл бұрын
I got this "ERROR: Module `\pll' referenced in module `\fpga101' in cell `\pll_i0' is not part of the design." after "make fpga101.bin"
XDC 2019 | Everything Wrong With FPGAs - Ben Widawsky
1:03:20
X.Org Foundation
Рет қаралды 12 М.
Microcontroller on FPGA (Microblaze, UART, GPIO) - Phil's Lab #108
24:36
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 5 МЛН
Software Emulators vs FPGAs
27:08
What's Ken Making
Рет қаралды 273 М.
[001] Making a Retro Video Display Processor
13:42
rj45 Creates
Рет қаралды 5 М.
EEVblog #496 - What Is An FPGA?
37:44
EEVblog
Рет қаралды 758 М.
The Man Who Solved the World’s Most Famous Math Problem
11:14
Newsthink
Рет қаралды 654 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 136 М.
FPGA Implementation Tutorial - EEVblog #193
1:00:44
EEVblog
Рет қаралды 194 М.
Driving a VGA Display?! Getting started with an FPGA! (TinyFPGA)
11:26
FPGA Design | Beyond dev boards: your own custom PCB
10:45
Psychogenic Technologies
Рет қаралды 9 М.
iCEBreaker breaks the ice with open source FPGA tools
11:40
scanlime
Рет қаралды 13 М.
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27