After spending 21 years developing his Electric VLSI (Very Large Scale Integration) Design System (known as Electric) in C, Sun Microsystems Distinguished Engineer Steven M. Rubin decided to translate his creation into the Java language, starting in September 2003. The results are impressive. Java Electric is more stable, has a better user interface, and is in many ways faster than Electric in C. In 1982, Rubin, an expert in CAD (computer-aided design) tools, created Electric, a system that is used for the design and verification of chips—which often contain millions of transistors—in the wake of a revolution that was occurring in integrated circuit design. Up until 1980, only physicists who understood the underlying science could design integrated circuits. Then Cal Tech professor Carver Mead, along with Xerox PARC researcher Lynn Conway, demonstrated that designing a chip was like programming: anyone who could understand how the mathematical equations look on a chip could design integrated circuits without needing to grasp the underlying physics. Rubin, who at the time was doing graphics research at Bell Labs, took a course in chip design, at the end of which he was required to create a chip. He was dissatisfied with the available CAD tools and, after moving to Schlumberger/Fairchild, where he began doing VLSI CAD research, he created Electric, in C. Electric has been adopted by many universities internationally, along with the governments of Canada and New Zealand, who created software organizations to support and distribute Electric. Rubin, who currently retains ownership of Electric, began offering it to the open source community in 1984 in the form of noncommercial licenses which provided universities and other noncommercial organizations access to the source code. Over the years, dozens of developers have contributed to Electric, which is currently available through GNU. Rubin received his Ph.D. in computer science from Carnegie Mellon in 1978, did graphics research at Bell Labs from 1978 to 1981, researched VLSI CAD systems at Schlumberger/Fairchild from 1981 to 1988, and, from 1988 to 1997, built 3D graphics systems at Apple Computer. He first worked at Sun in 1999 as a consultant/contractor, and since 2002 has been a Distinguished Engineer at Sun Laboratories. Rubin is the author of a book, Computer Aids for VLSI Design, and 15 papers, holds three patents, and was a member of a rock band, Severe Tire Damage, for a time. We met with him to explore the challenges and rewards of converting Electric into Java code.
One example is the Design Rule Checker. I ported this code early on, and later realized that I had, in effect, created "C" code in the Java language, with many uses of "static" and little recognition of the power of objects. This was fairly easy to fix. By simply removing the keyword "static" from my classes and variables, I was able to make the Design Rule Checker into a self-contained object. Such an object could be instantiated multiple times to allow multiple checking threads to run at the same time. We have used multi-threading quite extensively in Java Electric. In fact, every user's task runs in a separate thread. This not only promises a greater degree of parallelism, but also isolates code failures from affecting the overall system. Now, when an experimental piece of code crashes, only that thread dies, and the overall system continues to run. This has given even the early versions of Java Electric a level of stability that was never available in the C code.
The Java language helps you develop in so many ways. The Java virtual machine (JVM) technology, for instance, is right there to stop you when you make pointer and indexing mistakes, and errors like that. I was impressed by the quick compile-and-execute turnaround, since the JVM lets you test and refine and test and refine in a much faster loop than in C. [Note: The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.] All of the packages were so helpful. At the beginning, I said to
myself, "I am not going to reinvent all of the stuff that's in C Electric. I'm
going to try to use as many things that are part of the basic Java software
offering as possible." So, when I needed a transformation, I looked through the
Java libraries. I found that indeed there is something called the
We began translating in September of 2003, with me, Dmitry Nadezhin, Jonathan Gainsley, and Russell Kao, at first, and then Gilda Garretón (who we hired later) working on it. It has been amazing. In one year, we've created a Java language version of Electric that is far superior to the old C version. By June of 2004, after 10 months, we had released an Open Source version of the GNU Electric, the Java Electric. The version we released in June is available now at the Free Software Foundation, free of charge on the web.
In addition, before we started to recode Electric, back when it was just a C program, Mike Wessler of Sun Labs added a second database in Electric. Inside every running program is a database storing all of the information—the symbols, the wires, and so on. Mike wrote a second database in the C Electric code that actually is a Java virtual machine, a Java platform version of all these data structures. He was the first person to think about how Electric might look in Java code. He spent some time with us learning about Electric's data structures, and then built a data structure, which was the seed of Java Electric. During the summer, the people in our group at Sun Labs converted from using C code to Java code so that, by September, they weren't using C any more. Enough of it is translated for the chip designers in our group to use it to actually design a chip. By the end of September, they completed a chip and sent it for fabrication. After one year, Java Electric has been used to successfully produce an integrated circuit. Translating Electric was a kind of test to see whether the concern that the Java language is less efficient than other languages is true. We're happy to report that it's not true. About Electric
There are many CAD system rules for constraining the drawing so that the drawing stays sensible while changes are being made. Electric not only has such a constraint system, but it is user programmable. It is a full constraint language that enables users to put properties on the wire, and say how they want these wires to hold their symbols together, and the circuit changes can apply up and down the hierarchy in far more areas of the circuit than is normally the case in other CAD systems. It has a number of other features like that. So, there's a powerful constraint system. The second thing that Electric does, which other systems still don't do, is apply this notion of constraints to the actual integrated circuit layout. Here's the tricky part. When somebody draws schematics, they put a symbol here and a symbol there with wires and it looks like stick figures. But if you were to look at the actual integrated circuit, there are no symbols, and it doesn't look anything like stick figures. Instead, there's a piece of polysilicon with a certain width and height. And crossing it is a big piece of diffusion material and some metal and then some contact material. When you look at these integrated circuits on the CAD system screens, they're very colorful, because each layer is given a different color so that it's easily identifiable. And there are layers piled upon layers, with lots of colors and pretty patterns. But a typical CAD system thinks of this as just paint. You actually have to sit and draw a rectangle and fill it in with one color and draw another rectangle of another color. If you were to take a component—let's say that you have a combination of three layers together on a transistor—it has one crossing another and something else right in the center where they cross to make a transistor. To the person using the CAD system (drawing an integrated circuit), it is three materials crossing each other. If you were to delete one of the materials, it would still look mostly the same. But it would not be a transistor when turned into a chip, because a layer would be missing. Electric deals in high-level integrated circuit components that are actual symbols. We have a transistor symbol that has all three layers in it. You can't pull a layer off of that symbol. It is part of a single object that the user puts down on the screen. And the wires that connect these symbols have the same constraining rules. So, if I move the transistor, the wires go with it. Now, of course, these wires are big, fat areas of metal. Nevertheless, Electric handles that and makes drawing of the integrated circuit just as powerful as drawing on a schematic. That's what makes Electric interesting even today.
Converting to the Java Language
Electric in C was portable and could run on any platform, similar to Java technology's "Write Once, Run Anywhere" feature. This was possible because I wrote separate operating system interface modules for all of the different operating systems: Macintosh OS 9.0, Windows MFC, and UNIX. On UNIX, there were three different worlds: Athena, Motif, and Qt widgets. Widget packages in UNIX are ways of interacting with the screen and the mouse, pulldown menus, and all those elements. I had basically a plug-in for any world that you wanted. Then Apple released OS 10 and I needed to build a sixth interface module. That pushed me away from doing C. But, in addition, the display optimization—the thing that I got this incredible speed-up from—was something that would have been low level in these individual modules. In other words, I would have had to have written it five times. And I just couldn't face writing this software five times and debugging it on five different operating systems. Whereas I only had to do it once in Java code.
The Future of Java Electric
See Also |
| |||||||||||||||||||||||||||
|
| ||||||||||||