Many engineers use MATLAB and Simulink to help them develop signal-processing and communication applications. They want to simulate their algorithms and processing steps first, and implement them only after they have confidence that the designs will work as expected. "As a result, we have seen a trend toward executable specifications," said Arun Mulpur, signal processing and communication marketing manager at the Mathworks. "Specs that used to exist only on paper are becoming 'live.' As often as possible, engineers choose to maintain specifications within their design flow and within the tools they use to create designs." In this way, the models become a project's working specification.
The development of executable specifications frees engineers from developing algorithms for a specific DSP. "Today's design may put floating-point software on a DSP from one vendor," explained Mulpur. "But, suppose for some reason the next generation of my product must use a 16-bit fixed-point processor from another vendor. If I had written assembly-language or C code, I would have to rewrite most of it." Instead, when engineers start with an executable spec, they can easily retarget an application and automatically generate C or HDL code. "Executable specs insulate engineers from a target platform's details, whether they plan to use a specific DSP or an FPGA, and they allow easy conversion of floating-point designs to bit-true cycle-accurate fixed-point designs," he said.
Getting engineers to write an executable spec does not push them into brand-new territory, though. Many engineers already have used MATLAB to create and test algorithms and they might have used Simulink to design and test systems. "Systems have gotten so complex that once you simulate in MATLAB or Simulink, you do not want to hand off a project to an implementation team to code the whole thing in assembly language, C or HDL," said Mulpur. "By automatically generating code and ensuring that the code accurately captures intellectual efforts that went into the model, you avoid unnecessary rework and prevent errors from creeping into your designs. Thus, both your models and the generated code can serve as a 'golden reference' for your implementation teams."
But if engineers create code automatically, how do they verify that it accurately reflects the original MATLAB or Simulink reference model — the specification? "Verification used to take place at the last step, just before you shipped a product," said Mulpur. "Today, verification takes place at each step of the design. That helps explain why engineers have taken to modeling and simulation in such a fundamental way."