1.1 Introduction to TkGate
TkGate is a digital circuit editor and simulator with a Tcl/Tk-based
interface. TkGate includes a large number of built-in devices
including basic gates, memories, ttys and modules for hierarchical
design. The simulator can be controlled either interactively or
through a simulation script. Memory contents can be loaded from
files, and a microcode/macrocode compiler (gmac) is included to create
tkgate memory files from a high-level description. The simulator
supports continous simulation, single step simulation (by clock or
epoch) and breakpoints. Save files are in a Verilog-like format.
A TkGate circuit is divided into one or more modules, with one of the
modules being designated the "top-level" or "root" module. A module
is composed of zero or more "gates" and wires to connect the gates.
We use the term "gate" loosely to refer to any circuit element.
Special "comment" gates can be used to place text in the circuit.
Creating a gate in TkGate is simply a matter of clicking the cursor to
set a position, and selecting a gate type from the menu. Since most
gate types have a one or two character shortcut, once you learn the
shortcuts you can perform most of your editing with one hand on the
keyboard and the other hand on the mouse. Moving gates is almost as
easy as creating them, simply select a gate (or gates) and drag them
to a new position, any wires connected to the gates will be moved
along with them and adjusted to ensure that they contain only
horizontal and vertical segments.
1.2 Command Line Options
Usage: tkgate [-xqs] [-X script] [-l file] [-L lang] [-P printer] [-p file] [files ...]
TkGate supports the following options:
- -X script
- Automatically starts the simulator and executes the specified
simulation script.
- -l file
- Reads the specified file as a library.
- -x
- Automatically starts the simulator.
- -q
- Suppresses startup messages.
- -s
- Executes with a synchronous X server connection. This option
is primarily for debugging.
- -P printer
- Print the specified circuit to a printer without starting up the GUI.
- -p file
- Print the specified circuit to a file without starting up the GUI.
- -L lang
- Specifies the language to use ("en" for English, "jp" for
Japanese). TkGate must have been built with multi-lingual support in
order to use this option.
1.3 History of TkGate
TkGate begin life as an undergraduate project at Carnegie Mellon
University (CMU) in 1987. At that time it was called simply 'gate'
and ran under the 'wm' window manager, a windowing system developed at
CMU before X11 was widely used. In this incarnation it was used by
students in the computer architecture course at CMU to develop a
simple microprocessor (dubbed "The Bat Computer"). After laying
dormant for several years, it was resurrected in 1991 and ported to
run under X11 with the Xlib API. In this incarnation it was used
several times by students in the introductory digital logic course,
but after the author graduated and left CMU, it went into hibernation
again. This Tcl/Tk incarnation was begun in 1998. While there is
certainly some cruftiness in the implementation in places due to the
multiple reincarnations, many new features have been added since the
older wm and X11 versions, and the interface has been made much more
user friendly.
Last edit by hansen on Thu Sep 21 15:58:30 2000