Software synthesized for embedded
His San Jose, Calif.-based company is just beginning to ship SynthOS, a tool that can automatically generate a small, customized real-time operating system (RTOS) from high-level abstract primitives. The company announced a U.S. patent last week on technology related to automatic source code generation for an operating system.
As with hardware synthesis, the idea of software synthesis is to take input from a higher level of abstraction and automatically generate source code at a lower level of abstraction. "I came from a hardware background, although I've done a lot of software," Zeidman said. "I liked the idea of hardware synthesis so I took it and applied it to software."
Zeidman, a longtime consultant who teaches classes on hardware design at CMP Media's Embedded Systems Conference, clearly has his feet in both the hardware and software worlds. He has designed ASICs, FPGAs and pc boards and written two books on the Verilog language. But he has also worked extensively with embedded software and RTOSes.
The idea for SynthOS, in fact, came from one of Zeidman's consulting projects in the embedded software world. Working for a large consumer product company, Zeidman and his associates developed firmware for a flat-panel display and wrote a home-grown operating system for a small processor. Writing the spec took about a month, and writing the code took about a week but debugging the code was months of work.
"Coding this project was really simple, but every time we added a new task, we had to create a new semaphore in the operating system," Zeidman recalled. "Then we had to make sure that when a task called a new task, it checked the mutex [mutual exclusion object] first. People forgot to do that, so we had a system that worked most of the time but failed intermittently."
SynthOS, he said, provides a correct-by-design methodology that should make for minimal debugging. Had it been available for the flat-panel display project, Zeidman said, the entire project might have taken nine months, as opposed to a year.
Zeidman developed the technology behind the patent in the late 1990s. "I put it on the shelf for two or three years and came back and hired people to develop a full-fledged product," he said. Zeidman Technologies (www.zeidman.biz), founded in December 2002, has three full-time staffers and several part-time contributors.
SynthOS today is production-ready and has signed its first customer, Zeidman said. And the patent award helps push things forward. "Since [SynthOS] is somewhat easy to reverse-engineer, the patent allows us to not fear our product becoming successful," he said.
Who needs synthesis
Most embedded software developers today either write their own operating systems, or use something already available, like embedded Linux. There are problems with both approaches, said Jack Grimes, an adviser to Zeidman Technologies and a former director of operating system provider Taligent, which became part of IBM in 1998.
"Writing an operating system is tricky stuff," Grimes said. "If you make a mistake in operating system software, it's extremely difficult to find, and devastating when it occurs. In addition, writing an operating system is usually outside the expertise of the people doing the software."
Embedded Linux works well but consumes lots of memory space, Grimes noted. This puts it out of range for small embedded applications with extremely limited memory. Zeidman, he said, is targeting the low end of the embedded market with "a really elegant technique to solve a problem simply."
Interest at 32, 64 bits
Zeidman said that SynthOS is suitable for any kind of "deeply embedded system" that controls hardware directly. What
it will not work for is an embedded system that permits the end user to add applications.
"Originally we were aiming at smaller processors, but we found people with larger processors are showing interest, and we're now talking to companies using 32- and 64-bit processors," he said.
There are, however, a few trade-offs compared with writing an RTOS by hand. SynthOS, for example, doesn't take advantage of hardware features such as task-swapping. But SynthOS makes up for it, Zeidman said, because it can use the minimum number of registers required for the user's needs.
Further, he noted, an off-the-shelf RTOS would have to support many concurrent tasks, whereas SynthOS might only have to support three. "If you were to handcraft an operating system and knew it only required three tasks, you would probably do a better job [than SynthOS], but then you would run into debugging issues," Zeidman said.
Still, Zeidman acknowledged, there's been some resistance among potential customers who don't want to change the way they've been doing things. Grimes said Zeidman's biggest challenge lies in simply reaching the thousands of engineers working on low-end embedded systems, and making them aware of the solution.
SynthOS "sounds like a neat technology, but the question is if there is a market for it," said Gary Smith, chief EDA analyst at Gartner Dataquest. "RTOSes are rapidly becoming commoditized."
SynthOS takes in C language code that includes primitives that specify how tasks communicate with one another and share resources. Users also provide a configuration file that assigns priorities to tasks, specifies scheduling algorithms and provides information about interrupts. What pops out is a complete RTOS with data structures such as semaphores, mutexes, mailboxes and message queues.
Zeidman said that SynthOS should support any processor that has a C compiler. He said his company has successfully run code on PowerPC, Xilinx MicroBlaze, Altera Nios and 8051 processors, with others in the works.
One key selling point for SynthOS, Zeidman said, will be power savings. "We've been able to put RTOSes on little tiny processors," he said. "A lot of people have projects that don't need a high-powered 32-bit processor. They can save power by going to a smaller processor."