Design Article
Comment
KarlS
The GUI approach looks good for tying things together, but a couple things a ...
markgsaunders
I agree. It is time that changed IMHO. Don't stop believing!!!
HW/SW co-development (with finally some emphasis on software)
Mark Saunders, Cypress Semiconductor
12/29/2011 8:27 PM EST
I’ve been in the embedded business for a good few years now, and I still cannot figure out whether “co-development” refers to a manager’s dream of hyper-efficient project scheduling or an instrument of torture for software developers. It probably just means that software is developed in parallel with the hardware platform design but if this isn’t a synonym for torture, I’m not sure what is.
In the embedded world, it is very common to write software for a board or chip that is simultaneously in the process of being designed. Sometimes the target is a complex ASIC design in simulation environments from EDA vendors like Mentor Graphics or Cadence Design Systems.
Sometimes it is for powerful FPGA designs, from companies like Xilinx or Altera, with embedded microprocessor cores interfacing to standards-based and custom IP blocks.
And sometimes it is for programmable systems-on-chip, that integrate programmable digital and analog functionality with microcontroller, like the PSoC devices. These are all powerful environments that enable fabulous innovation and have one torture-inducing feature in common; the hardware can change at a moment’s notice and the software developer will have to react.
I’m not suggesting we slow down the pace of innovation just to give software engineers a breather. Quite the reverse, actually. Hardware tools need to be better integrated with software IDEs in order to accelerate time-to-market. Designers need more tools and methodologies that isolate the application from hardware changes. I’m not talking about major communication blocks being added or removed from the design.
If that’s your problem, your software engineers should probably be working on something else because your hardware design is no where near ready for them! I am talking about minor changes to defined functional blocks occurring late in the design cycle, things like register addresses that move, bit meanings that get re-defined, buffers that change size, and so on. All of these “minor” edits cause ripple down into the software that can result in product defects and substantially re-work long after the reason for the hardware change is forgotten.
Software Engineers! It is time we stopped letting the tail wag the dog. Here are three ideas to change how we develop applications for moving targets. Don’t embark on your next project without them!
Idea #1: Don’t Write the HAL. Generate it!
The first change we need is for the hardware development tool to generate a software interface, often called a hardware adaptation layer (HAL). The HAL should include boot code that reliably initializes the programmable hardware and provide APIs to enable software control of the system. More than just simplifying firmware development, the HAL abstracts away the implementation from the interface. This means that small changes to the hardware can be implemented without perturbing the firmware.
There is nothing new in the idea of a HAL and many experienced designers have written intelligently about the need for consistent, intuitive naming conventions for constants, functions and variables. But, for programmable devices like FPGAs, CPLDs and PSoC, I would extend those requirements to include the need for the HAL to be generated by the hardware design tool itself. How else can the software engineers be guaranteed a reliable interface?

Figure 1: A snapshot of a PSoC Creator workspace showing the API files (HAL) for a system controller design using a FanController block and a pair of Comparators (Comp_Hi and Comp_Lo).
In a static or slowly-moving environment, such as a fixed-function MCU or large-scale ASIC project, it is reasonable to consider the HAL to be an independent suite of APIs and to modify it as part of a hardware design change.
But with modern programmable devices the hardware can change multiple times a day. Manual HAL maintenance is simply incompatible with this methodology and would guarantee errors in the implementation, not to mention a good deal of torture for the software engineers! In my opinion, automated HAL generation should be a must-have requirement for any programmable platform.
Next: Page 2



kalpak
1/18/2012 9:57 AM EST
CoDesign seems difficult and the project degenrates into HW vs SW, because most managers tend to think of themselves of either HW or SW guy/ gal.
If the manager can think in both then CoDesign approach will have overcome a major hurdle.
Sign in to Reply
markgsaunders
1/20/2012 4:51 PM EST
I agree. It is time that changed IMHO. Don't stop believing!!!
Sign in to Reply
KarlS
1/23/2012 3:41 PM EST
The GUI approach looks good for tying things together, but a couple things a still needed.
One argument for HDL/text design entry is source control which is missing, also a hw/sw IDE needs either an interpreter or simulator for the HDL to run in the same IDE as the code to observe the interaction.
Current simulators generate human readable timing diagrams, the thing missing is an HDL parser and a program that creates OOP objects that model the hardware blocks and controls so the interface mechanism can be modeled.
The whole thing would then resemble program debug and changes to either would be available to all parties.
MS Visual Studio C# and C++ have string parsing and handling tools that make this a straight forward process.
If only there was a way to apply Intellisense to the HDL entry. But then the parser output could be used to check the module port declarations during design entry rather than HDL compile time.
Sign in to Reply