Microcontroller in FPGA? This is how to do it ... | Step by Step Tutorial | Adam Taylor

  Рет қаралды 67,538

Robert Feranec

Robert Feranec

Күн бұрын

Wow! I had no idea it is so simple to add a Microcontroller into FPGA. Thank you very much Adam Taylor for great and practical step by step tutorial about how to do it. This tutorial can be useful for beginners or when starting with FPGA. Includes also DDR3, USB UART, VHDL block, Logic Analyzer and how to write Hello word software for the microcontroller.
Previous video with Adam:
- How To Create Difficult FPGA Designs • How To Create Difficul...
Links:
- GitHub of the archived projects, just download and extract: github.com/ATaylorCEngFIET/fe...
- Adam's website and blog with a lots of tutorials www.adiuvoengineering.com/
- The book Adam mentioned www.sensorsthink.com/ and Altium files for the board from the book www.e3designers.com/altium-365
Chapters:
00:00 What is this video about
01:35 What we are going to design
04:08 Starting a new FPGA project in Vivado
05:58 Adding Digilent ARTY Xilinx board into our project
07:48 Adding system clock
10:47 Adding and configuring DDR3 in FPGA
19:41 Adding Microcontroller (MicroBlaze) into FPGA
30:00 Connecting reset
32:24 Adding USB UART
34:00 Assigning memory space ( Peripheral Address mapping )
34:59 Creating and explaining RTL ( VHDL ) code
40:19 Adding RTL ( VHDL ) code into our FPGA project
43:56 Synthesis
45:25 Defining and configuring FPGA pins
52:21 Adding Integrated Logic Analyzer
55:00 Adding GPIO block
58:28 Checking the summary and timing of finished FPGA design
1:03:36 Exporting the design
1:04:43 Writing software for microcontroller in FPGA - Starting a new project in VITIS
1:09:50 Compiling, loading and debugging MCU software
1:11:44 IT WORKS!
1:12:16 Checking content of the memory and IO registers
1:14:31 How to use GPIO driver to read gpio value
1:17:40 Using Integrated Logic Analyzer inside FPGA for debugging
1:24:14 Adam's book and give away
------------------------------------------------------
Would you like to support me? It's simple:
- Sign up for my Hardware design and PCB Layout online courses: academy.fedevel.com/
- You can also support me through Patreon: / robertferanec
- Or sign up for my Udemy course: www.udemy.com/learn-to-design...
It is much appreciated. Thank you,
- Robert

Пікірлер: 122
@bernardomoreira4191
@bernardomoreira4191 2 жыл бұрын
The quality of this channel doesn't drop! These are very interesting topics you keep bringing on! Congrats!
@RobertFeranec
@RobertFeranec 2 жыл бұрын
Thank you very much Bernardo
@mitchelllague5499
@mitchelllague5499 2 жыл бұрын
@@RobertFeranec hey man I am looking to become a PCB designer and I was wondering if you could answer a few questions for me?
@RobertFeranec
@RobertFeranec 2 жыл бұрын
@@mitchelllague5499 please, to ask questions, the best is to use our forum here: designhelp.fedevel.com/
@myetis1990
@myetis1990 2 жыл бұрын
I'm not surprised because two hardware heroes come together, and the outcome is delightful as ever. a lot of details were learned and caught a good idea to observe PL logic using gpio IP on runtime. Thank you, Robert and Adam, keep up good work.
@Ali-wf9ef
@Ali-wf9ef 2 жыл бұрын
Adam Taylor is amazing, to do all that and not get an error is not easy
@kawrx2002
@kawrx2002 2 жыл бұрын
I was thinking the same thing, I get errors from fairly simple RTL modules. But to be fair, he said he did a dry run the day prior. I would expect anyone with this opportunity so qualified would do exactly that.
@firedeveloper
@firedeveloper 2 жыл бұрын
Your videos are very helpful every day on my job, nice work!!!
@billbrown9073
@billbrown9073 Жыл бұрын
Thanks guys, great video! I just purchased Adam's book as a thank you!! (and to encourage Adam to do more videos!) :)
@tuttocrafting
@tuttocrafting 2 жыл бұрын
I don't have time to fully watch the video but the spots I've seen so far are awesome!
@yanchen533
@yanchen533 2 жыл бұрын
Amazing! As a recent grad entering the embedded software world this video is simply amazing. Would love to take a deep dive into the book! Thank Adam for sharing your knowledge and Robert for organising this!
@marceloniendicker8335
@marceloniendicker8335 2 жыл бұрын
Thanks From Brasil 🇧🇷 Robert. Great job 👏🏻 👏🏻👏🏻
@kamalibrahim7322
@kamalibrahim7322 2 жыл бұрын
Thank you for your informative video. It really helped.
@jajajaj666
@jajajaj666 Жыл бұрын
Thanks! waiting for more 🎉🎉
@Ali-wf9ef
@Ali-wf9ef 2 жыл бұрын
the TerosHDL editor is amazingly useful. thanks
@St0RM33
@St0RM33 2 жыл бұрын
this channel is awesome, in 2 years: How to build an AI supercomputer core, step by step tutorial ;p
@electronichome1153
@electronichome1153 2 жыл бұрын
Many thanks, Robert!
@DavidTLutz
@DavidTLutz 2 жыл бұрын
Fantastic video. Thank you to both Adam and Robert. I will be studying the details this project along with the video for some time - not to mention other videos of both you and Adam. Will look forward to other videos as the future unrolls.
@FPGASystems
@FPGASystems 2 жыл бұрын
Nice collaboration! Good tutorial
@WillCodeForFood.1905
@WillCodeForFood.1905 2 жыл бұрын
Great video!
@nicholasroos3627
@nicholasroos3627 2 жыл бұрын
Great primer on the topic.
@user-xb5zu6zu7j
@user-xb5zu6zu7j 2 жыл бұрын
Pleasure to watch. Adam is a FPGA legend! Thank you for the video Robert.
@vincei4252
@vincei4252 2 жыл бұрын
Thank you for this! I can't tell you how awesome your content is. Kudos to you and the guest presenter. I'd be very interested in the Altium book that was mentioned at the end of the podcast. Cheers!
@HynaCZE
@HynaCZE 2 жыл бұрын
Great video. There is also opensource alternative - project LiteX. It was not much trouble to run a RiscV with ethernet and DDR3 even for me (minimal fpga skills).
@mamuneebbagdali6934
@mamuneebbagdali6934 2 жыл бұрын
Hello ... I need some help regarding this ...
@MaxWattage
@MaxWattage 2 жыл бұрын
This is great, becuase both Xilinx and Intel have priced their software tools, DDR IP, and VHDL-200x support, beyond the financial reach of the individual, despite the fact that the ONLY use for their software is to enable people to design their chips into products which they then massively profit from. The first FPGA manufacturer to give engineers free software tools will eat all their competitors, becuase every new engineer will learn using their FPGAs, and will then want to keep using that brand when they work for a bigger company.
@tritranminh2808
@tritranminh2808 2 жыл бұрын
Omg, thank you so much, really thank you.
@kawrx2002
@kawrx2002 2 жыл бұрын
Great video! I knew what HLS was conceptually but am now less intimidated at trying to create a basic design from scratch. Glad you hosted Adam Taylor and asked some good questions to clarify.
@ligius3
@ligius3 2 жыл бұрын
Cool project!
@simeonbash5954
@simeonbash5954 2 жыл бұрын
That was excellent!
@imjamesiong
@imjamesiong 2 жыл бұрын
is the best fpga understand after many years just because this two hours! this two hours is covering pass few years ....
@ZayMeisters
@ZayMeisters 2 жыл бұрын
The content on this page is second to none. Thank you!
@lucadaidone9550
@lucadaidone9550 2 жыл бұрын
As always, great video! This looks like a great project to start learning about fpga and get hands on experience with Vivado!
@orion6831
@orion6831 2 жыл бұрын
Thank You!
@xtasy2k7
@xtasy2k7 2 жыл бұрын
Awesome. I’ve always been curious about how to do this! Thank you 😊
@gregreynolds5686
@gregreynolds5686 2 жыл бұрын
Really good content - many thanks for sharing this - it reveals a whole world of possibilities.
@swerrock
@swerrock 2 жыл бұрын
Wow! Definitely mind blowing live demo. It is quite interesting to see how fpgas work in almost 1 hour record.
@simox04_yt66
@simox04_yt66 2 жыл бұрын
Wow guys, great video, keet it up
@MommeSherif
@MommeSherif 2 жыл бұрын
Really thank you
@sexysmeksi
@sexysmeksi 2 жыл бұрын
great video! Good luck
@nambot
@nambot 2 жыл бұрын
So good!
@bzboistinkerings4255
@bzboistinkerings4255 2 жыл бұрын
Good topics to cover. I always learn something new watching your videos!
@kureigu69
@kureigu69 2 жыл бұрын
Super interesting video. Been wanting to get back into FPGAs for a while now and this gives me confidence!
@svanbeek1970
@svanbeek1970 2 жыл бұрын
great video :-)
@phonezawthein1990
@phonezawthein1990 2 жыл бұрын
Thank u very much.
@Revision369
@Revision369 2 жыл бұрын
great thank you
@vatsan2483
@vatsan2483 2 жыл бұрын
Wow!! loved the tutorial.. especially FPGA using IP was actually new!! and intergrating embedded with FPGA was epic.. loved this tutorial
@tuskiomisham
@tuskiomisham 2 жыл бұрын
Hey, This is what I'm working on rn!
@RicardoPenders
@RicardoPenders 2 жыл бұрын
Thank you so much for sharing this on KZfaq, this is so valuable.
@Gator96100
@Gator96100 2 жыл бұрын
I did plan to get into FPGA programming for a long time. That tutorial seems simple enough to get started.
@spyral98
@spyral98 2 жыл бұрын
Very helpful video! Definately made me more interested in the FPGA field!
@souheil.allaoui
@souheil.allaoui 2 жыл бұрын
Thanks for this video! So interesting, definitely will try it!
@01dahall
@01dahall 2 жыл бұрын
Another great video, Robert! Keep it up :)
@christossoteriou3453
@christossoteriou3453 2 жыл бұрын
Very helpful to see how a professional goes through a complex (for me) design
@AaronMatlock
@AaronMatlock 2 жыл бұрын
Can't wait for you to get into how signal timing is tuned when a fpga is used and a pcb doesn't have space to do so.
@DM-fw5su
@DM-fw5su 2 жыл бұрын
Thanks very much for this very informative video. I have Arty A7-100T, this guide is largely identical. One major point is that in order to use SSTL135 it needs to move the (pin) bank. But that means the FPGA pin is not the pin for sw_in_0[2] since that is specifically connected (via PCB layout) to FPGA pin C10 (on A7-100T). Now when I generate bitstream with it setup to the default of LVCMOS33 I do not get an error (your video indicated I would if there was a problem). When I inspect the block diagram I see that this is electrically connected to led_fsm_0 and ila_0 and axi_gpio_0. All these block design artefact's are FPGA implemented components. The only thing that appears to connect to ddr3_sdram (which is the part creating a cause of the voltage concerns) is the Memory Interface Generator which is provided and configured by Xilinx wizards with no custom modification to that area of the design afterwards. Then I run the board and C language program from Vitis IDE (part of Vivado 2021.2) and it just works. So I am a little confused what the difference might be with the Arty S7 Spartan-7 board because my block diagram should be the same as yours. I just looked at the Arty-S7-25-Master.xdc and compared to Arty-A7-100-Master.xdc and it does indeed look to be an electrical signal matter specific to the S7 PCB layout (that I can only assume was improved with in the A7 design, these files are at github.com/Digilent/digilent-xdc/ Okay one last point the clock speed of the A7 can run slightly faster so that was a difference I noted. The final working design has sys_clock=100MHz, MIG=200MHz and MicroBlaze=83.333MHz now because of this it maybe necessary just before you perform the final generate bitstream to go back and inspect the axi_uartlite_0 settings, IP Configuration -> AXI CLK Frequency as my initial version the async serial was not working properly (corrupted info displayed). To correct this I change the "AXI CLK Frequency" to "manual" then back to "auto" and the wizard chose a new value. I assume this is a hardware clock divisor based on parameters (such as MicroBlaze clock speed) that is then fixed in FPGA implementation logic. With this change a project respin and the serial was working. Thanks again for your video.
@alimoaz
@alimoaz Жыл бұрын
Hi I am also using the same board. Apparently, I am also using the LVCMOS33 for that pin. But the problem is that I am getting errors. Did you follow the exact guideline by adam? Also I could not understand what you did there in clock configuration
@balintillenyi8009
@balintillenyi8009 2 жыл бұрын
It was a very useful tutorial video about embedded system designing. Please continue to make more similar videos..... :) Thanks a lot!
@Paez.Edward
@Paez.Edward 2 жыл бұрын
Thank you very much Robert, it's really interesting. Thank you Adam too 🎉More fpga please 😁😁😁
@user-lv1wl9ug3c
@user-lv1wl9ug3c 2 жыл бұрын
Nice Video
@dr.mostafadarvishi9774
@dr.mostafadarvishi9774 Ай бұрын
Thank you Adam Taylor and @RobertFeranec for the nice video. Just a quick question, what is the name of the VSCODE extension that we should install to be able seeing the Module documentation that Adam should in minute 39:44 of the video?
@siamackbeigmohammadi9170
@siamackbeigmohammadi9170 2 жыл бұрын
Nice to see you two on the same video! Robert, it would be also nice if you switch sides in another session on 1.5 hour dive into high-speed PCB design.
@abdulbary3668
@abdulbary3668 2 жыл бұрын
Both of you are amazing, thank you so much. #respect.
@pedrolealdossantos
@pedrolealdossantos 2 жыл бұрын
Very good one! Liked the "live" new feature, very rare to work first time
@sexysmeksi
@sexysmeksi 2 жыл бұрын
subscribed!
@muhandes8453
@muhandes8453 2 жыл бұрын
2 Hardware Heros!!!!!
@Scwan15021983
@Scwan15021983 2 жыл бұрын
thx robert & adam if possible pls make much more such amazing fpga videos 👍 love it 🤗
@MrZANE42
@MrZANE42 2 жыл бұрын
Lovely video! Will have to try FPGAs some day, currently it's mostly various Cortex-M MPUs that goes into the designs.
@michaelk.1108
@michaelk.1108 2 жыл бұрын
Great video! I'm downloading the tools.... Thank you for your time and for this great tutorial!
@rbluejr52
@rbluejr52 2 жыл бұрын
Great Tutorial! This video has opened doors for me to explore how FPGAs work, research the difference between ARM technologies and FPGA technology, as well as give me an idea of how many microcontrollers I can fit on one FPGA chip.
@josevalentinantoniorestrep3854
@josevalentinantoniorestrep3854 2 жыл бұрын
Good and practical application of FPGA. Easy explained.
@sexysmeksi
@sexysmeksi 2 жыл бұрын
good luck everybody
@sevensolutions77
@sevensolutions77 2 жыл бұрын
Very great video. At the beginning, i couldnt believe, that you can do all that in one and a half hour 👍
@RobertFeranec
@RobertFeranec 2 жыл бұрын
Me too
@phillipmaser132
@phillipmaser132 Жыл бұрын
Very Nice Robert. How hard is it to route DDR3 and DDR4 memory with Altium? Is Metro Graphics a better software fit than Altium? I have a client that wants to run a 28 Gbit project, with many PCB layers and matching impedance possibly 50 ohms on the DDR memory. Possible a fast ethernet fiber application... Any ideas or courses or notes? Rise time and Vias layout. By Pass capacitors, many of them ... Switching regulators.
@jorgeaqr
@jorgeaqr 2 жыл бұрын
You can even add linux to the FPGA processor :)
@matejgenci2307
@matejgenci2307 2 жыл бұрын
Amazing video, finally MicroBlaze and AXI makes some sense!
@MaChEtE-yn5cm
@MaChEtE-yn5cm 10 ай бұрын
Отличное видео, интересно, есть ли у altera что-то похожее
@sexysmeksi
@sexysmeksi 2 жыл бұрын
i liked the video
@electromatic2014
@electromatic2014 2 жыл бұрын
I died at 1:11:50 !!!, We all were pretty excited it worked, maybe he knows what he's doing! :)
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
A friend who watched the video said Robert and I giggled like school boys when it worked.
@olivierbetschi9770
@olivierbetschi9770 2 жыл бұрын
Very interesting and useful video. What would be the procedure to have the code on the board instead of providing it through USB ? Is there an SD card or some flash memory available ?
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
With a MicroBlaze there are a few options if the program is small enough you can merge the ELF to the block ram and the program will execute on the FPGA is programmed. If you want to use DDR you need to use the merge to merge a boot loader that can cross load from NVRAM to DDR RAM. Xilinx do provide support for that as well so it is pretty straight forward.
@nadeeragunarathna2410
@nadeeragunarathna2410 2 жыл бұрын
Thanks for the video. Please do a Fpga programming tutorial for beginners.
@abhisheksingh-db4kk
@abhisheksingh-db4kk 2 жыл бұрын
Can u make a single videos on DDR3 protocol only explaining each pin signal
@sreejeshk.n3740
@sreejeshk.n3740 2 жыл бұрын
Hey Adam, Is the book available in India?
@luigif6643
@luigif6643 2 жыл бұрын
Robert have you think about FPGA+embedded Linux? Would be a great topic.
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
Now that would be interesting to do, we could do that on a Zynq - Adam
@pingwinlt
@pingwinlt 2 жыл бұрын
now i am trying to learn vivado and it is interesting sometimes it hurts but i will do it. It's only a matter of time. very little information is available.
@antilogicnz
@antilogicnz 2 жыл бұрын
Awesome video, I tried to add a microblaze to a demo board ages ago and it all just fell to bits. you have inspired me to have another go. i suspect the tools have come along way since i last attempted it.
@ZaidEngComp
@ZaidEngComp 2 жыл бұрын
I want to download soft copy of the book, can i?
@xNorbiful
@xNorbiful 2 жыл бұрын
Thanks for that great video! I pretty sure that many of us would find interesting designing a custom board completely from scratch in Altium Designer exactly for that project instead of using a factory evaluation board. Maybe you should made a video of that stuff in the near future....
@maks886
@maks886 2 жыл бұрын
WOW
@bennguyen1313
@bennguyen1313 2 жыл бұрын
Would love to hear an overview how you constrain the design for timing. Not much was mentioned about it here, but I understand it's one of the more difficult aspects.. and that of writing the proper testbenches!
@Avionics1958
@Avionics1958 2 жыл бұрын
I love your channel can you also do some projects with Basys3? I have a Basys3 board😏
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
It is the same for the Basys3 - just select the basys3 in place of the s7-50 - there is no DDR on the basys3 though you can use the BRAM in place of it and recreate what we had easily. There is a workshop on my site about building pong with the Basys3
@Avionics1958
@Avionics1958 2 жыл бұрын
@@AdiuvoEngineeringTraining thanks I am going to give it a go. I hope I can find the right connections 😏
@Avionics1958
@Avionics1958 2 жыл бұрын
@@AdiuvoEngineeringTraining i would like to get my hands on your give away board🙂
@ucolly
@ucolly 2 жыл бұрын
My compiler doesn't like "printf" if I want to print my GPIO data... I have to use "xil_printf"
@jordanhindes769
@jordanhindes769 2 жыл бұрын
Would you do a video on guard rings in opamp design ? Again great video as usual :)
@philipacovington
@philipacovington 2 жыл бұрын
Interesting video! FPGAs are really great for those interesting in retro-computing or learning how a CPU works. I am implementing Ben Eater's 8-bit computer in an FPGA in a series of videos on my channel for anyone interested.
@bernhardneubuser8163
@bernhardneubuser8163 2 жыл бұрын
Robert, I just watched your old video about Xilinx sending a lawyer after a youtuber. What made you change your mind to again produce content on Xilinx devices?
@RobertFeranec
@RobertFeranec 2 жыл бұрын
I still do not like Xilinx - I still remember very well what they did. But I do like to learn new things.
@yonatanelizarov6747
@yonatanelizarov6747 9 ай бұрын
How 81mhz is quarter of 200mhz?
@antonegorov6196
@antonegorov6196 2 жыл бұрын
Fantastic! The code is inside a microcontroller which is also a code.
@johntilghman
@johntilghman 2 жыл бұрын
What a great video, any chance of more? Maybe a walkthru like this but using Xilinx ZYNQ FPGA to get Linux running on a 7010?
@Spiderelectron
@Spiderelectron 2 жыл бұрын
Thank you so much for this tutotial! I made more prgress in these 90 minutes than in all the hours I spent on the official stuff! 1:29:11 COM32 - This is one thing I hate about windows. It's USB enumeration is stuck in the 1990's
@romancharak3675
@romancharak3675 2 жыл бұрын
I wish I could read the text and diagrams (to blurred) - the audio was difficult to understand, also. Frustrating, because I'm sure the content was very interesting.
@IIlab
@IIlab 2 жыл бұрын
Its all right, but where Xilinx FPGA IC on digikey or mouser? 52 weeks for production is very badly joke
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
Did you try building it yet Robert ? Adam
@RobertFeranec
@RobertFeranec 2 жыл бұрын
Adam, not yet. I have couple of ideas how I could make a video about following this tutorial. The board is ready on my table.
@tanyamorales8593
@tanyamorales8593 2 жыл бұрын
🌷 Promo-SM!!!
@MichaelHarto
@MichaelHarto 2 жыл бұрын
I thought i read "microtransaction in FPGA"😂
@jeanrodrigues6249
@jeanrodrigues6249 2 жыл бұрын
MCU
@jimjjewett
@jimjjewett 2 жыл бұрын
It would be helpful to cover (or at least point to) why you would want to use an FPGA instead of a cheaper chip. As best I can tell, the answer is either when you have a very parallel problem (so you can use thousands of logic cells instead of just a few cores), or when you have such tight timing constraints that you need to move some processing from software to hardware, but won't need enough units to justify an ASIC. Am I missing something?
@genkidama7385
@genkidama7385 2 жыл бұрын
$500 microcontroller lets do it !
@AdiuvoEngineeringTraining
@AdiuvoEngineeringTraining 2 жыл бұрын
I can see your point, of course in reality the Micro is used in commercial FPGA applications for the serial processing - we would deploy the rest of the FPGA the parallel processing systems e.g image processing, signal, filtering or very deterministic control. You will find many micro's in FPGA to do the things which are best performed by a processor, being an engineer is abut picking the right tool for the job. Of course if all you need is a micro then it is overkill.
@vitalyl1327
@vitalyl1327 2 жыл бұрын
$10 FPGAs are already big enough to host quite capable soft cores
3 Simple Tips To Improve Signals on Your PCB - A Big Difference
43:53
Robert Feranec
Рет қаралды 112 М.
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 48 МЛН
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 50 МЛН
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 6 МЛН
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 15 МЛН
How To Design and Manufacture Your Own Chip
1:56:04
Robert Feranec
Рет қаралды 14 М.
The History of the FPGA: The Ultimate Flex
18:08
Asianometry
Рет қаралды 335 М.
FPGA/SoC Board Bring-Up Tutorial (Zynq Part 1) - Phil's Lab #96
30:15
This is the BEST Board to Learn RISC-V Assembly.
17:52
Low Level Learning
Рет қаралды 81 М.
Ground in PCB Layout - Separate or Not Separate? (with Rick Hartley)
1:03:20
EEVblog #496 - What Is An FPGA?
37:44
EEVblog
Рет қаралды 755 М.
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 48 МЛН