Hi everyone!!My name is Dror, i am an electronic engineer student (final year) and i work at a company as a hardware/software developer. I learned some FPGA in school but just the basics and nothing too serious. We are currently running a control system that has 2 axis motors with stabilization, the system reads sensors and communicates via Ethernet and UART's (written in C#). The controller at this moment is Beaglebone Black, and it is great for the current application, but we want to boost it to be able to analyze video and have some image processing ability. I have an ALTERA DE0-NANO board to get some experience and get in to the FPGA world. My question is (since i am noob at FPGA) how hard will it be to get the same idea to be written in the FPGA, to run parallel readings from different sensors and have the main algorithm for the control part. Can i write a code in FPGA that will be similar to C# as far as the construction of the code? as an object oriented? Any help will be great! even some knowledge sources to read about the abilities of FPGA as a programmable controller. Thanks, Dror.
Well, when writing code for FPGA you need to think about the hardare. You describe the hardware and everything you need must be in your design. You cannot create a new "object" when the design is running. But, without knowing your algorithms, it is possible to redesign the control system. Object oriented design is not really VHDL. You might think of the entities as objects, but my advice would be to take the control algorithm with the parameters from the current design and create an VHDL equivalent. If you hope to copy and past the code, this is not the case. As for resources to read, I don't know. Maybe use your favorite web search engine and search for FPGA control system.
--- Quote Start --- Well, when writing code for FPGA you need to think about the hardare. You describe the hardware and everything you need must be in your design. You cannot create a new "object" when the design is running. But, without knowing your algorithms, it is possible to redesign the control system. Object oriented design is not really VHDL. You might think of the entities as objects, but my advice would be to take the control algorithm with the parameters from the current design and create an VHDL equivalent. If you hope to copy and past the code, this is not the case. As for resources to read, I don't know. Maybe use your favorite web search engine and search for FPGA control system. --- Quote End --- Thank you for the quick response! I know that this will not be the case for copy and paste. I will need to change everything to VHDL, my main issue that i want to solve is how to read and write data in a UART configuration, and how to do all the calculations with numbers like floating point and such. for instance, can i create an entity that converts byte array to floating point and vice versa? maybe there is something like that ready that someone has made before? or maybe create an entity for UART and than use couple of them to send and receive data from an external sensor or device? right now i use C# so everything is easy like taking a floating point variable and convert it to byte array to be able to send it in the serial communication. Will it be easy to do such things in VHDL? as well as getting input from a camera sensor and use the information to identify objects as targets? Again, i'm very new to the VHDL world so i don't know if the things i need is even possible to get from a FPGA board, i know that it can do anything but i won't program the whole thing from scratch, i don't have the knowledge for that. Thanks, Dror.
I think you can find floating point ip (maybe free?) as for a UART, this is relatively easy to implement, search this forum for uart. You can instantiate multiple of these entities, but that does not take care of signal levels etc. So maybe you can find all the components you need and you only need to create the glue logic to put it all together. This is a bit like making a pcb; you get all the ic's and then you solder them together. But the question you might want to ask is why use an FPGA. You have ip to read from a camera, but more image processing examples are available on computer (I think).
Or you might want to investigate MathWorks (the MATLAB/SIMULINK) folks and their HDL-CODER (google: mathworks hdl coder).You can express your algorithms at a high level in MATLAB/SIMULINK, and then generate HDL code (verilog or VHDL) for the design. If you are a software / control systems person, and not a hardware FPGA designer, this might be a good way to go. The 'student' pricing is very reasonable for your explorations as a 'student', but a full commercial license for the tools is $$$$ (like Quartus Lite vs full license). Disclaimer: I have no relationship with MathWorks, just familiar with their products.
HDL coder might indeed be worth a try, I have looked at it some time ago and it looked promising. But I could not get a licence in the time I had to try it, so I cannot tell you about the performance of the translation. I don't think that tool had IO blocks, so you will have to find/create your own uart and camera input (I think)
Hi, others here answered in a good way but I got just curious, why C#, is this language offering some performances in BBB design?What is actual controller? You speak about two axis motor then about a video. Is this on BBB now? About FPGA translation it seems more far from clean: What type of video processing did you think to perform and to do what? How you need communicate to external devices and what kind of information transfer. About control system is not better use an internal cpu and leave quite untouched working code? Why you need parallel processing? Terasic DE0 Nano is a good starting point but there is an equivalent with internal ARM core: http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=205&no=941 or a bigger one with internal dual core and video, on that a video scaling is running in parallel of linux showing how to parallel process on both ARM core and external hardware complex video tasks.
this one has complete HDMI interface on board and comprensive demo over parallel audio/video processinghttp://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=205&no=836 Regards