MATLAB and SIMULINK FOR ZYNQ

Although we see a lot of MATLAB use in industry and in academia, it isn’t as popular in the hacker community. That’s probably due to the cost. If you’ve ever wondered why companies will pay over $2000 for the base product, you might delight in the video of a webinar covering using MATLAB and Simulink (a companion product) to program the CPU and FPGA on a Zynq Zedboard. Not interested because of the price? If you aren’t using it for commercial purposes, it isn’t as bad as you think.

MathWorks is one of those companies that likes to market by practically giving away products to students with the hope that they’ll adopt the same tools when they land jobs in industry. Their flagship product, MATLAB, is well-entrenched in the labs and offices of big corporations. We’ve often thought that MATLAB is sort of what FORTRAN would look like if it had been developed in the last 20 years instead of 60 years ago. It is true that a base license for MATLAB is over $2000. However, if you aren’t using it for commercial purposes, and you can’t score a student license, you can get a personal license of MATLAB for about $150. The extra modules are also similarly decreased in price. If you are a student, the price drops to about $100, although numerous schools have licenses students can use at no cost to them.

If you view the video from [Noam Levine], you’ll see you get your money’s worth. If you are wanting to configure the FPGA directly, this isn’t for you. but if you just want to accelerate a program by pushing DSP or other algorithms that can benefit from hardware assistance, MATLAB makes it very easy.

The workflow is aimed at a big corporate team, of course. There are requirements and tools for collaborating in a team. Not that those are bad things, even for a hacker project. The viewpoint is you build a model using Simulink that looks at the system from a very high level.

A GUI lets you indicate what parts of the model are actually in the FPGA and a wizard takes you through building the HDL that will configure the FPGA. The example project is the prototypical blinking LED, but it is still illustrative of how the tool can help you push functions to the FPGA.

Of course, MATLAB is good for lots of things. We’ve seen it decode radio signals from an RTL dongle. We’ve also seen it crunch data to help clients with spinal cord injuries. Is it worth $2000? Bağlı olmak. If your time has value and your project is going to make any money, the productivity gains (once you know what you are doing) probably swamp the cost quickly. A few hundred bucks for the personal edition is an even smaller bite, but then again, there’s no return on it because you can’t use it for any money-making endeavor.

If you just need number crunching and you don’t want to blow a few hundred bucks, there are quite a few good open source alternatives including GNU Octave, Scilab (and Scicos), SageMath, and FreeMat. These are all very similar to MATLAB with respect to syntax and base features. numerous even can run in the cloud so you don’t have to install anything. but they are probably going to lack the advanced toolkits and features you will find available for MATLAB. some of them do, however, have some path for FPGA-based development. In particular, Scicos and Scilab can use Scicos-HDL.