|
Project Information
Members
Featured
Downloads
|
Pep/8 Assembler and Simulator (8.1.3)This repository is for version 8.1 of the source code of the Pep/8 simulator and assembler for use with the textbook Computer Systems. The application is written in C++, is GUI-based, and is compiled with the Qt 4 development environment using the Qt Creator IDE available from Nokia at http://qt.nokia.com/downloads/ . The current version of the Pep/8 assembler and simulator is 8.1.3. See what's new with this release. Please send comments, bug reports, and feature requests to Stan Warford. Pep/8 CPU Simulator (8.0.0)This repository is also for version 8.0 of the source code of the Pep/8 CPU simulator. The CPU simulator is an implementation of the data section of the Pep/8 CPU as shown in Figure 12.2 of the textbook. The current version is a complete software rewrite that adds many of the features from the Pep/8 Assembler and Simulator to the Pep/8 CPU simulator. The current version of the Pep/8 CPU simulator is 8.0.0. See what's new with this release. Please send comments, bug reports, and feature requests to Stan Warford. TextbooksJ. Stanley Warford, Computer Systems, fourth edition, Jones & Bartlett, Publishers, 2010, ISBN 978-0-7637-7144-7. See this errata page for printing errors in the fourth edition of the textbook. Please send textbook errata not yet listed to Stan Warford. Pep/8 is also used in Computer Science Illuminated, Fourth Edition, by Nell Dale and John Lewis, Jones & Bartlett, Publishers, 2011, ISBN 978-0-7637-7646-6. Course syllabiHere are sample course syllabi for Chapters 1 - 7 and Chapters 8 - 12 for Computer Systems. These links also contain support material for the text, such as lecture slides and digital circuit labs. Pep/8 at SIGCSE 2010A paper titled The Pep/8 Memory Tracer: Visualizing Activation Records on the Run-Time Stack was presented at SIGCSE 2010, the 41st ACM Technical Symposium on Computer Science Education. The paper in PDF format is now a featured download from this site. DownloadsThe Pep/8 computer is a 16-bit complex instruction set computer (CISC). It is designed to teach computer architecture and assembly language programming principles. Its 39 instructions are based on an expanding opcode and are either unary (one byte) or nonunary (three bytes). The eight addressing modes and eight dot commands are designed for straightforward translation between C/C++ and assembly language. The Downloads section of this site contains builds and source code for the support software for the textbook. In addition to the assembler and simulator hosted at this site, the Downloads section includes a CPU simulator and a cache simulator. Here is a summary of the Downloads software. Pep/8 assembler and simulatorThe assembler features an integrated text editor, error messages in red type that are inserted within the source code at the place where the error is detected, student-friendly machine language object code in hexadecimal format, the ability to code directly in machine language, bypassing the assembler, and the ability to redefine the mnemonics for the unimplemented opcodes that trigger synchronous traps. The simulator features simulated ROM that is not altered by store instructions, a small operating system burned into simulated ROM that includes a loader and a trap handler system, an integrated debugger that allows for break points, single step execution, CPU tracing, and memory tracing, the option to trace an application, the loader, or the operating system, the ability to recover from endless loops, and the ability to modify the operating system by designing new trap handlers for the unimplemented opcodes.
Note: Linux version requires installation of Qt libraries. If there are version conflicts with the libraries, it is straightforward to download the source code and build the application with Qt Creator. Debian based systems may support the Advanced Packaging Tool. In this case, run sudo apt-get install libqt4-dev g++ to install the Qt libraries. For Ubuntu users who prefer software downloads via Personal Package Archives, Ezra Reeves has posted a build at his PPA site.
Download the source code and the Qt Creator IDE available from Nokia. Choose the LPGL / Free version. Launch Qt Creator and open the pep8-1.pro project file. When you click the build icon, Qt Creator will automatically construct the makefile and build the application.
Latest version uploaded 14 February 2010. In the command-line version, users can write assembler source code in their favorite text editor and invoke the assembler on the command line. After a successful assembly, they run the simulator, which includes run-time debugging facilities. Input/output is done with standard C++ streams so that batch jobs can be scripted with Unix scripting languages. This feature can be quite useful for grading programming homework problems that are submitted electronically. Pep/8 CPU simulatorThe CPU simulator is an implementation of the data section of the Pep/8 CPU as shown in Figure 12.2 of the textbook. It features color-coded display paths that trace the data flow depending on control signals to the multiplexers, a single-cycle mode of operation with GUI inputs for each control signal and instant visual display of the effects of the signal, and a multi-cycle mode of operation with an integrated text editor for the student to write Mc2 microcode sequences and execute them to implement ISA3 instructions. The latest version of Pep/8 CPU, 8.0.0, is a complete rewrite with a help system similar to the one in the assembler and simulator. It features automated unit tests and point-and-click automatic code generation.
Pep/8 cache simulatorThis contribution by Professor Peter Smith, California State University Channel Islands, is a command-line interface implementation of the cache shown in Figures 12.32 and 12.33 of the textbook. The user determines the structure of the cache by specifying the block size, the number of blocks per row, and the number of rows. A selection of 1 for the number of blocks per row is equivalent to the direct-mapped cache of Figure 12.29, while a number greater than 1 is equivalent to the set-associative cache of Figure 12.30. In addition, the user determines whether instructions and data share the cache. If there are separate caches for instructions and data then half the rows are used for each. The user can select one of four replacement algorithms: random, LRU, LFU and FIFO. The discussion of replacement algorithms in Chapter 12.2 in Computer Systems is brief and only mentions the Least Recently Used (LRU) algorithm. Replacement algorithms for cache line replacement are similar to those for page replacement described in Chapter 9.2, which also describes the first in, first out (FIFO) algorithm. In addition to these two replacement algorithms, the Pep/8 cache simulator allows the user to select the least frequently used (LFU) algorithm and the Random algorithm. With LFU, a count is maintained for each line that is hit in the cache, and that line is chosen for replacement that has the smallest count. With the Random algorithm, a line is selected at random for replacement. The cache simulator collects performance statistics on Pep/8 machine language programs. It loads the Pep/8 operating system and runs Pep/8 object programs produced by any of the assembler programs.
Papers
|