Object Oriented Approach for Logic Simulation

Zhengyu Zhang

Objective

Traditionally, logic simulation is done by mapping a circuit description into data structure in the main memory and we need to have a big piece of code called "simulator" to interpret the data structure and execute the input vector. There are usually two ways we implement the simulator. One is called "event driven". Since most of the time there are only a few of the logic gates doing the switching (we call it "event"), simulation is only needed when input of the gate is changing. The other method is called "cycle based compiled mode". Since logic circuit is combinational within any single clock cycle, we translate a circuit description into C code then compile and execute it natively. As the size and complexity of the digital system grows, it is obvious that the old view of logic simulation does not scale well. Under our new model, a complex digital system can be viewed as the collection of smaller self-contained simulation component which not only contains the necessary data structure or syntax to represent the circuit, but also has a little simulation engine to actually operating on itself. Each component cares only what input and initial state it has and it delivers the output every clock cycle. The simulation for the whole digital system can be thought as all the small components simulating themselves and "talking" with each other. Furthermore, we can go one abstraction level up by wrapping all the smaller components to represent the basic building block for a more complex system. The components can be distributed across the network and if implemented correctly, we can improve the simulation performance by utilizing the available resource more efficiently. Finally, the whole simulation environment can be updately separately and independently. Few reconfiguring procedures or recompiling are needed. We believe that this object oriented approach of logic simulation will be an important part of the WELD architecture.

Detailed Description, Progress and Status

During this quarter, I will demonstrate a working simulation environment based on the above concept.


Jimmy Zhang <zhengyu@ic.eecs.berkeley.edu>