Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > EDA/IP

Open-source tools ease C++ verification

Posted: 16 Oct 2006 ?? ?Print Version ?Bookmark and Share

Keywords:Mike Mintz? Robert Ekendahl? C++ verification? Teal? Truss?

Verification engineer Mike Mintz believes so much in the use of object-oriented programming for IC verification that he created two open-source software programs to help engineers do hardware verification with C++. That's in addition to co-authoring a book on the topic in his spare time.

Mintz, who works for a large systems design company that prefers to remain unidentified, and partner Robert Ekendahl, principal verification engineer at Sun Microsystems Inc., have launched the site to provide two open-source programs. One is Teal, a C++ class library that adapts C++ to Verilog and provides threading support. The other is Truss, an applications framework for C++ verification that sits on top of Teal.

Mintz and Ekendahl have also published Hardware Verification with C++: A Practitioners Handbook, available now from Teal and Truss are provided with the handbook in a companion CD.

"So far as I know, there are no books on verification with C++, and a lot of people are using C++ for verification," said Mintz. "I thought it would be good to take my 20 years of software experience and push it into the book."

C++, said Mintz, is the best available object-oriented language for verification. "Don't get me started on SystemC," he warned. "It's a good modeling language, but it doesn't do anything for verification. It puts templates right in your facethat's the C++ term for genericsbut in verification, it's extremely rare that you need that."

People looking to use C++ for verification, however, need software to make that possible, and that's where Teal and Truss come in.

Mintz, who spent 15 years as a software engineer, wrote Teal at his first verification job six years ago. "I reimplemented it every time I went to a new company," Mintz said. He finally asked if he could put it in the public domain, and his present employer said yes.

Truss came about last year when Mintz and Ekendahl were both working at Freescale Semiconductor Inc. "Robert said, 'You've got a lot of stuff you're using internally; why not put it out there?'" Mintz recalled.

Mintz compares Truss to the Synopsys-ARM Verification Methodology Manual or Mentor Graphics' Advanced Verification Methodology, "except it's out there, it's free and it's C++."

"It's clear to me," observed Ekendahl, "that object-oriented verification is becoming an industry best practice." The new book covers basic through advanced uses of object-oriented programming, he said, and its guidance is directly applicable to such languages as SystemVerilog, Vera and Specman.

Teal and Truss are in use now at several companies, Ekendahl noted. And along with C++, the software programs are attracting some notice.

Stanley Hyduke, CEO of simulation provider Aldec Inc., reviews the new book in a posting at "The handbook provides a clear understanding of object-oriented programming and how it applies to hardware verification," Hyduke wrote. "It is clear to me that C++, together with Teal and Truss, could form a strong platform for the next generation of hardware verification."

C++-to-Verilog 'gasket'
Mintz describes Teal as a "gasket" that connects C++ code to Verilog simulation environments through the Verilog programming language interface (PLI). "It allows you to write everyday C++, but it's interacting with the hardware," Mintz said. "It wraps the Verilog PLI in something that mere mortals can do."

The PLI is efficient as long as you're not trying to implement a high-frequency clock in C++, Mintz said. "Just put that down in Verilog," he said. "We have a watchdog timer, and that's in Verilog, but all the logic is in C++."

Teal also provides a wrapper around portable Posix threads, thus providing multithreading support. "Because hardware is threaded, verification systems need to be multithreaded," Mintz said. "You can run as many threads as you want. I've run up to 4,000 or 5,000."

Teal and Truss, launched by Mike Mintz (top) and Robert Ekendahl, are open-source.

Other features of Teal include stable random-number generators, a flexible logging facility and a dictionary name space for passing parameters among parts of the verification system. A memory name space and lookup capability provide a simple way to do "backdoor" memory reading and writing.

Small space
All this functionality comes in a small space; Mintz said Teal encompasses only six source files and about 3,000 lines of code. Since it's open-source, users can modify the software as they see fit. The only restriction is that they can't commercially resell it.

Teal works with Verilog simulators from Cadence Design Systems, Synopsys, Mentor Graphics and Aldec, as well as with the open-source Icarus simulator.

While Teal provides "the kernel of what you need for a verification system," as Mintz said, it doesn't provide a methodology. Truss comprises a set of classes, templates and conventions that sit atop Teal for describing the way how tests, testbenches and drivers function. "If you want to see how I'd structure a verification system, look at Truss," Mintz said.

Truss is really all about the "dance" among the top-level controller, testbench and watchdog timer, Mintz said. "It's about how those three guys come up, what calls they make and how they all work together to run tests."

Mintz said he and Ekendahl have no plans to market Teal or Truss. "You can't make money on structure," he said. But someone could potentially offer services around the programs, he said.

Support for Teal and Truss is based on "best effort" and e-mail, Mintz said. But keep in mind that he's a busy guy.

"The book has taken about 2,000hrs to write, and Teal and Truss have probably taken that much effort," he said. "I put in 60hrs of work a week, and then I work more at home."

- Richard Goering
EE Times

Article Comments - Open-source tools ease C++ verificat...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top