mic1 is a Java-based simulator
which implements the Mic-1 microarchitecture described in Chapter 4 of
Andrew S. Tanenbaum,
Structured Computer Organization,
Fourth Edition
(Prentice-Hall, 1998).
The software available here is designed to support instructors and students
using this text. Additional
supplemental
material for this and other Tanenbaum texts is available from
the author's site.
mic1 was written by
Ray Ontko and
Dan Stone with advice from
Andrew S. Tanenbaum and support from
Prentice-Hall.
Send comments, suggestions, enhancements to Ray Ontko
(rayo@ontko.com).
Distribution 1.0e production release
(Monday, 24-Apr-2000 08:36:04 EST)
Other releases (historical and developmental) are
also available for downloading.
The mic1 software is written in Java and requires
the Java Development Kit (JDK) 1.0 (or later) to run.
Java technology is available
from Sun or one of its technology partners. Visit
http://www.java.sun.com/
(and follow the "Products" link) to find a suitable distribution.
Note: You may be able to get mic1 to work on other operating
systems or with other Java runtime environments. Problems have been
reported with Symantec Java under Win2K, but our investigations were
not conclusive. If you
are able to get it running in that environment, let me know
(rayo@ontko.com).
The mic1 microassembler utilizes the
CUP
Parser Generator for Java, written by
Scott Hudson. All other
programs and modules are written directly in Java and are intended to
be compatible with JDK 1.0 and later.
The mic1 software is distributed under the terms of the
GNU General Public
License.
The source code is included in the distribution.
Note: The following documentation and sample files are
included in the distribution but are also available here
for browsing. You do not need to download the documentation
separately.
Documentation (included in distribution)
Sample Files (included in distribution)
- echo.jas,
a simple IJVM program demonstrating input and output.
- add.jas,
a more complex IJVM program demonstrating method calls.
- ijvmtest.jas,
a program to test the IJVM instructions.
- mic1ijvm.mal,
a microprogram for the mic1 architecture which implements a simplified
Java Virutual Machine called IJVM.
- ijvm.conf,
a configuration file for the IJVM assembler. This file maps
op codes to mnemonics and instruction formats.
The mic1 software includes:
- a simple Mic-1 simulator (mic1sim) which allows the user to simulate
the execution of a Mic-1 microprogram,
- a simple Mic-1 assembler (mic1asm) which translates a
text-file containing Mic-1 microassembly language (MAL)
into a binary file of Mic-1 microinstructions, suitable for loading
into the mic1 simulator control store,
- a sample Mic-1 microprogram which interprets a modified
(integer-only) subset of Sun's Java Virtual Machine (JVM)
instruction set architecture (ISA) (which we shall call IJVM),
- a simple IJVM assembler (ijvmasm) which translates a
text-file containing IJVM into a binary file of IJVM instructions,
suitable for loading into the main memory of the mic1 simulator, and
- a sample IJVM program which can be used to demonstrate the
operation of the Mic-1 microprogram using the mic1 simulator.
Some possible projects (in increasing order of complexity):
- Write a program in IJVM. Demonstrate that your program
works correctly using the IJVM assembler and the Mic-1 simulator.
- Add a new feature to the IJVM assembler.
- Add a new instruction to IJVM and implement it as an extension to
the Mic-1 IJVM microprogram. Modify the IJVM assembler to correctly
identify and generate code for your new instruction.
Demonstrate that your new Mic-1 microprogram correctly interprets
an appropriate test program containing your new instruction.
- Write a microprogram in Mic-1 microassembly language.
- Add a new feature to the Mic-1 microassembler.
- Add a new register to the Mic-1 architecture.
- Implement a simulator for the Mic-2 architecture.
- Implement a simulator for the Mic-3 architecture.
- Implement a simulator for the Mic-4 architecture.
While several of these projects support the material covered
in Chapter 4, The Microarchitecture Level, there are several
that are applicable to other parts of the text. For example,
there are a number which develop concepts introduced in Chapter 7,
The Assembly Language Level.
Other Mic1 Software Links
- CIS360
tools, by Paul D. Amer, University of Delaware. This collection of
tools was developed for the 3rd edition of this text.
- MIC-1 SIMULATOR,
by Cantarella Alfredo, Di Guardia Pietro, Pennisi Sandro,
Pulvirenti Alfio, students of Franco Barbanera, Dipartimento di
Matematica e Informatica, University of Catania. Includes documentation
in Italian and English. This is based
on the mic1 code by Ray Ontko and Dan Stone.
- Mic-1 Simulator, Herbert Bonaffini. This appears to be a Windows-specific version. Does not include source code; use at your own risk.
- PROJECT: You don't need a fab to build your own CPU!, by Marco Aiello. An article with software.
mic1 microarchitecture simulator
Copyright (C) 1999, Prentice-Hall, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
A copy of the GPL is available online the
GNU web site:
http://www.gnu.org/copyleft/gpl.html
Java is a trademark of
Sun Microsystems, Inc., and refers to
Sun's Java programming language technology.
mic1 is not sponsored by or affiliated with Sun Microsystems, Inc.
Thanks to
Lasse Aagren,
Giuseppe Chiapparino,
Luke Dunstan,
Graham Dutton,
Larry Fialkow,
Veronica Minsky,
Michael Moussa,
Scott Sendlein,
Maybelle Tan,
and
Todd Will
for bug reports and/or fixes.
Thanks to Adrian Llahana, John Miller, and Andy Tanenbaum
for comments and suggestions on the software and documentation.
Special thanks to Alan Apt, Sondra Chavez, and Ana Terry
at Prentice-Hall.
Eternal gratitude to Andrew S. Tanenbaum for creating a great
text and inspiring us to create the software.
This page maintained by Ray Ontko
(rayo@ontko.com).
Last updated:
Monday, August 02, 2010