 Hi everybody. Is it automatic? No. So this is the second talk on FPGA. It's basically the same as the last time but with a bit more information. The motivation behind this talk is really to introduce FPGA as a topic, as an alternative to embedded system and other electronics thing or computing thing that we can do. And then basically try to create some workshop in a hacker space during this summer to try to introduce the technology and the software and the writing application and basically creating project out of it. So my name is Brachy Mamadi-Sharif. I'm French. I work for ASTAR. Next slide. This is me. So I basically studied in UK. I came here in 2007 and I'm currently in a data storage institute. I work for some company doing some thermo imaging with NMTEC and basically you can find me on the internet. So really the motivation behind those talks is to really explain that FPGA is not complicated. Many people basically when we talk about FPGA or certain technology it's very complicated. It's not expensive either. I will show later on some hardware for about $50-$70 to really start programming FPGA. The only difference between what we do with Raspberry Pi or computing is really that we have to think in terms of hardware. FPGA you don't really write like C code. It's more of a language where you think of a circuit then you basically implement things. You have to think in terms of clock, in terms of registers, in terms of hardware really components. So I will show some example show some literature and then basically we have this FPGA community, Singapore Facebook. So I think we have 100 people now. We had a workshop last year I think around October or November and I think there was only 6 or 7 people. So I'd like to have more people this year if people are interested to join and we'll have a second meeting and try to be more practical, have some feedback from the community and basically try to organize maybe more sessions. So I will go through a lot of slides. I think I have four slides but I will go quite quickly into all of them. You see we need to give you a flavor and I've added some part towards the end of the application because now FPGA is using some very hot topic like deep learning and application in the data center. So this could be also some topics that maybe you want to actually tap in in terms of new job or in terms of new career. Everybody is doing C, C++, PHP etc. and actually FPGA can provide some new area of work and research. So basically manufacturers of FPGA the two main manufacturers are Xilis and Altera. There's also some cheaper manufacturers like Lattice and Cypress they provide also some smaller version or smaller package FPGAs. So in my case my really experience is really mainly on Xilis from a Spartan 3 which is one of these very small FPGA here. To a Spartan 6 here which is basically a higher version of this and then basically Xilis provide even more powerful FPGA and I will show some cards later that part of my job in Estar basically we bought some of those cards to implement some algorithms. So from a C code we basically try to implement this into FPGAs to have real projects and real electronic that we sell for we try to commercialize. So FPGA distributors basically there's Digiland, Avinet there's also a lot of small website like Nubato has quite a big range of cards really for the hobbyist up to a more serious FPGA user to some proper Avinet has those really very high powerful Xilis cards. This I don't have a laser but basically here you can see that this is the FPGA in the middle here and then some of them like this one on a Xivo or some FPGA card they have actually a fan on it because they dissipate a lot of power when they're running. So two of the cards that I had here they are Papillo so they are a family of cards from a website I don't actually remember the name of the guy but he basically designed those introduction boards so this Papillo 250 is the one I circulate and this is Spartan 3 so it's quite a small one. So from experience if you start you ought to really size up already from the beginning your design and what you want to do ultimately because it's a bit like computers you start with one meg, two meg and then suddenly you realize that you need more logic cells, more multipliers, more block ram. You want to run the FPGA at a higher clock, you want to do more so the sizing of those FPGA is quite important and a lot of basically wings, I call it wings for those FPGA, add on cards like this one which basically you add and you can have switches FPGA output, those ones have also PS2 surround, VGS serial link and also connectors for some joysticks so actually you can more or less program things which you can interface. So FPGAs tend to be 5V, 3.3V, 1.8V so it's the same as the Arduino versus Raspberry Pi when you connect things to them you ought to be careful with the logic the level of the signals from them. Other boards like the Digiton, Digilent Spartan 3 also some Ethernet board, Ethernet only connector VGA, basically LCD so this becomes like a really small computer and you can basically also implement some Arduino you have some code that basically you run an Arduino on it and some of them you have those P mode on the right side, these are basically a simple interface for loads of sensors in the market that are the specific connectors. The links when you go upstream really go into some more powerful FPGA, basically the FPGA which is the yellow part is really the fabric that you can program all your different logics and Xilinx now have those FPGA when they combine ARM core on the top really single ARM or dual core ARM with the bottom so you really have a CPU ARM and an FPGA on the same die and you really end up with a more or less a small little computer. The advantage of this is that you instantiate an ARM core on that card, on the FPGA and then you basically can program in the programable logic a lot of functionality to accelerate let's say video processing for other things that you want to do. It has some HDMI PCI interface so it becomes quite a big system. So this becomes the card that you have so you can also slot it into your PC and you have all sorts of interfaces and this becomes quite expensive because there are 2.5 thousand US dollars. Xilinx provides a lot of basically tools for you to implement things so I will not go into too much details but for example there's a lot of families so the Zink 7000 family is the 7000 10 20, 15, 20, 30 etc. And at work we have basically the 3 last ones for some of the projects. One of them which I recently attended a course for is actually a specific board like this where you basically run an ARM on this FPGA and it has a software defined radio basically pipeline so you can actually play along with SDR and I know that Mikal is not here tonight but one other person is very keen on this so actually we bought 2 at my workplace so later on we will try to demonstrate this into how to basically use this for SDR A very high end FPGA becomes what they call Ultra Scale so these are really really powerful FPGAs for very high end implementation of algorithm especially deep learning and another type of processing which requires a lot of memory a lot of processing and if you actually look into the DSP slice those 2 cars for example the last one the VCU 110 has 1,800 DSP slice so these are 1,800 units that you can instantiate and do a multiplication in one clock so you can really have a huge, huge compilation engine or some processing this becomes a very expensive car for people who are doing Arduino type of Raspberry Pi type of hobby experiment etc there is some actually code to implement an Arduino like component inside those FPGA and there's a website from this which basically provides the code directly so you basically dump this into your FPGA and it's basically running as an Arduino so people who want a faster Arduino or want to actually understand how the processor in the Arduino is actually emulated from all the ALU, the processing and the highway etc you can basically play with some of this this is the website where you can download so they have basically the binary file that you can directly plug into your FPGA so what's an FPGA? FPGA stands for Field Programmable Gate Array so it's really an array of lots of blocks that you basically interconnect this is really at the physical level of the FPGA but from a programming point of view it's more of a circuit, it's more of you basically define a box which has inputs, outputs, you define the logic inside, the behavior and basically the compiler in the tool assign all the different connections to all different blocks and synthesize and basically implement what is your design so most of the time we use this conflution logic block and a lot of IO so those FPGAs, the latest FPGA can have up to 900 pins so a lot of those can be also used for system when you want a 100 output it's not really possible in other case but some of the FPGA you can really have a lot of bandwidth and you can have buses connected to each other etc so this is really the internal of an FPGA the blocks really are lookup tables, full accumulator and then some flip flop gates these are more the internal aspect inside the FPGA you could do really some design without knowing whatever is actually this part actually is doing you basically implement your system and from the behavior point of view it's working but if you want to optimize sometimes it's useful to do those blocks so ultimately with more and more generation this becomes more and more complex and by having more complexity the compiler actually can really tailor the design into those blocks themselves. Some of the very important block of FPGA these days is this DSP slice which is really an accumulator and a multiplier very fast processing and this becomes very useful when you do single processing, image processing, video processing so these are blocks that really basically improve your throughput or some of your design implementation so these are quite interesting from a DSP point of view the tools so the tools they used to be very expensive but actually now everything is free so the webpack from Xilinx is a free basically tool it looks like this, it's quite easy to actually use you have a project, you have some sources like C, you have the VHDL code, you have some sort of file which specifies the connection of the pins and when you compile it basically generates a bit stream file basically that you upload to the FPGA and it's up and running you can also simulate your circuits and you can also see really where those connections are directly inside your FPGA so it's quite a powerful tool, ultimately all your designs become graphics like this which are really a schematic of technology and things are happening all in parallel, it's cropped so it's really a hardware point of view, it's a bit difficult from a software mindset to actually go into hardware sometimes but if you think of electronic logic gates etc then actually a lot of it becomes sort of easier, latest technology of Xilinx the 7 series is another tool called Vivado, so it's the same more less interface but it can basically handle more advanced FPGA and has a better performance in terms of synthesis and implementation and optimizing things VHDL source so there's actually two main language, one is very low one is VHDL, I will not go into the details now because of time but usually very low tends to be US, VHDL tends to be Europe, VHDL is very low is very close to C in a sense if you read C you can easily understand but whatever time those are very well defined and if you have done some C or some programming language you can have a good guess of what is actually the block or the module do so this is for example an example of a halo world so it's basically creating a register and basically filling in with values and then bit banging basically a pin of the FPGA which becomes a UART and basically I'll put a halo world in a console when it's connected to another computer so these are examples I think I showed last year basically the normal LED flashing, digital clock controlling a step up motor when you want some video let's say VGA, you really need to add some more circuits so you end up designing or actually finding on internet a lot of examples of this VGA generator so it's force you in a sense of with the Raspberry Pi you just plug your HDMI and everything is running here, if you want some video you need to program a video interface then you actually end up understanding more about those interfaces in the first place for you there's a lot of books on internet if you google for the title with PDF you will find those PDF for free there's a lot of also source online to basically share knowledge so these are I wish I would put the presentation online for me as a researcher it's really more of the techniques of the research topics basically when we say we add A plus B in MATLAB with that A plus B it gives you C but actually in FPGA you need to understand how do we do an addition because the FPGA doesn't know how to do that so there's a lot of let's say an FFT, you do an FFT of that vector and you get the spectrum etc in the FPGA you need to program the FFT so there's a lot of digging inside a lot of research topics so actually there's a lot of technique that personally from an electronic background I didn't know and then there's a lot of topic like this. Some of my interest is modeling musical instruments so this is let's say an example of modeling a flute with lots of adders, it's a DC killer, it's basically a filter some filter etc so this model if you input it with some noise it will basically render some flute like sound so in my BNG years a long time ago I did this on the Motorola DSP with an interface so now I'm basically trying to make it on an FPGA so it's the same for this FPGA card but it's very easy to actually look up a couple of components to interface things. For example large multiplication I found this lady who used to be able to do 13 digit multiplication of two numbers in 28 seconds and basically it's the same an FPGA you don't do A plus B equal C you actually have to implement this and to show the results you actually have to convert the binary to a binary coded decimal because basically unless you know how to read those binary numbers which become very huge you need to also have some circuits so for this you end up with a conversion between how many digits I need to show versus how many bits I have and you end up with circuits like this which have the binary at the top and basically you have to implement so each of the small blocks here has to be defined and afterwards it's a whole network of connection between those so these are basically a type of work FPGA doesn't have any output video so for example if you use this VGA666 this is the interface for the Raspberry Pi you can also map those six components of colors and end up trying to generate those nuance of colors these days part of my work also is to look at new topics or deep learning with this convolutional neural network this tends to be a large network of processing layers and nodes etc and this is mainly used using basically need to have some specific hardware because of the shared processing power it requires so a lot of studies that we see now is actually comparing the FPGA to CPU to GPU and then really from work from 2013 to implementation the performance between I think 8.5 giga multiplication and commission per second to 61 we can see that using the technology we can really really have a massive amount of processing for those who are interested in really data centers and CPU Intel both Altera so basically in the future I guess it's now because it's 2015 I think some of those slides we will have a real bridge between processors and FPGA so we won't have to program the FPGA and the processor thing will be basically all together and this is basically data center FPGA acceleration so these are really new topics that maybe for some of you if you are into cloud computing or data center or some other type of processing ultimately FPGA will start to enter those fields and I think I have one minute so I went back quickly the really motivation for me is to try to get people interested in FPGA it's quite a niche topic but by introducing the topic more often having workshop and having sort of maybe hands on session try to have people to basically start to like it as I did I need to put some dates otherwise I think I was going to do that in April and May and I need to shift so I think I need to put a date first early July or something like that then I put a Saturday and then I try maybe every two months to have a Saturday every two months so it's regular and then we see what the idea really is if people are interested in developing specific things related to audio or to video one interesting thing with FPGA is that you don't need the hardware we need to learn and to actually develop things you can really use the tool, you simulate and you can import let's say an image into your design and basically simulators is processing so actually a lot of work can be done without the physical FPGA but ultimately it's nice when the LED blinks and you get some strength and you generate things or you filter something and you find more information Yeah I think for FPGA itself it's really those website you have OpenCore, OpenCore is really a website when you can really find open source I guess I'm not sure if it's open source but people share their source on all sorts of cryptology, library, memory, testing stack overflow, stack overflow from which have specific the Facebook is FPGA this one, FPGA Community Singapore I think we have 110 members I'm not sure if we are very active in a sense but it's a group Also I get sometimes some people who want to enter the group and actually I don't know exactly who they are or haven't met them so maybe send me a message saying I'm interested otherwise I tend to believe that if someone is active in 2000 groups and actually have some of us here in the sense there's also an FPGA development which is quite active, a Facebook group So a lot of students ask you know I'm stuck with this and someone help me Thank you very much Wow 50 slides, no wonder you are working with FPGF