The ChipSim Simulator

From VisualChips

Revision as of 17:08, 30 May 2011 by EdS (Talk | contribs)
Jump to: navigation, search

The visual6502 project offers an in-browser simulation of the 6502 and 6800 microprocessors. The engine for the simulation, written in JavaScript, is variously called JSSim and ChipSim. This page offers some background on how the simulator works and how it came to be written.

The source code is copyright with an open source license and available on github.




Data Files

To simulate each chip's behaviour, ChipSim needs to know at least the list of transistors and the information as to how they are connected. To be useful it also needs the names of the pins and ideally the names of some internal nets (or nodes.) To display the chip layout and animate it as the logic values change it needs the geometric layout data. All this information is found in three files. Each file populates a single Javascript data structure.

defines an array transdefs[], with a typical element ['t1', 1608, 657, 349, [5424, 5629, 548, 922],[1007, 1079, 17, 5, 17477] ], defining the name, the gate net, the source and drain nets, the bounding box, and some geometrical information. See this source file for more detail.

(These formats are subject to revision, as we model new chips and find information which is worth capturing and modelling. For the 6800, we added a weak/strong indicator to transdefs, which was needed because this chip uses only enhancement mode transistors and had some circuit configurations we hadn't previously encountered.)




Personal tools