Presentation on theme: "Developing a Portable, Open Source Alpha Emulator Camiel Vanderhoeven OpenVMS Advanced Technical Bootcamp May 18-23, Nashua, NH."— Presentation transcript:
Developing a Portable, Open Source Alpha Emulator Camiel Vanderhoeven OpenVMS Advanced Technical Bootcamp May 18-23, Nashua, NH
Topics 1. Emulation 2. ES40 Emulator 3. Current problem areas 4. Portability and Open-source 5. Become involved 6. Questions?
1. Emulation What it is When to use it How to do it
Emulation: Definition An emulator duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system. This focus on exact reproduction of external behavior is in contrast to some other forms of computer simulation, which can concern an abstract model of the system being simulated.systemcomputer simulation (Wikipedia)
Emulation: Why? Get rid of unsupported hardware Datacenter consolidation Reduce space, power requirements (blades) While: Protecting investment in software
Emulation: When? Binary programs w/o source code Obsolete programming languages Software support for obsolete platform Hands-On Education Scenario Testing
Emulation: How? Get documentation on original system Technical Reference Manuals Study driver code (Linux, FreeBSD) Beware of hidden features, bugs... Analyse original system Reduce to logical requirements Implement in software Observe behaviour And re-iterate...
2. ES40 Emulator How it was done? ES40 Hardware Map Emulator Software Map
ES40: How? Start with bare minimum: CPU, SRM console firmware Chipset, memory Serial port Then start adding: IDE controller, disks First boot, then add: Rest of stuff (SCSI, NIC, VGA...)
ES40 Internals How the hardware structure of the ES40 maps to the software structure of the Emulator
System Block Diagram
I/O Block Diagram
3. Current Problem Areas
Current Problem Areas Performance Floating-Point Instructions Multi-CPU Support Access/Alignment faults
Performance Issues... Current: Interpretation Each instruction is decoded and executed separately Lots of overhead
Performance Issues... Performance has been increased already by: Selective interrupt checking Replacing often-used SRM PALcode routines with C++ code Disabling the Instruction Cache when it is not needed Optimizing the size of the Translation Buffers and keeping MRU (Most Recently Used) information
Performance Issues... Future: Dynamic Translation Each instruction is decoded once
Dynamic Translation Dynamic translation drawbacks: Very complex Host processor specific code (less portable) Need to keep track of changed code pages For now: First get it working, then get it fast
Floating Point Problems Floating-point implementation is complex 5 different floating-point formats In-memory format differs from in-register Different rounding modes Exception handling, denormals, infinity Emulations “old” code: no exceptions, limited special values “new” code: more complete, but bugs Having CPU-level test suite would really help!
Multiple-CPU problems SRM startup may hang Extra CPU’s are seen from SRM and OpenVMS CPU’s fail to initialize in SRM CPU’s never make it into the active set in OpenVMS Solution probably buried somewhere in the SRM specs or source code. Where should the extra CPU’s wait for initialization?
Access/Alignment faults Access faults occur during OpenVMS installation, network bootup Alingment faults during boot when they shouldn’t occur. Alignment checking is turned off temporarily.
4. Portability and Open Source Portability Open Source resources SourceForge
Portability Portability is helped through: Portable libraries: Standard C/C++ libraries Poco (threads, locks, etc.) Pcap (networking) SDL (graphics) Buildchain management UNIX build scripts (autoconf, automake) Generated DCL build scripts
Open-Source Resources Compilers etc.: GNU compiler collection (gcc) GNU autotools (autoconf, automake) Websites etc. (collaboration): Usenet (newsgroups) SourceForge.net Ohloh.net (code metrics) Newsletters (like Sue’s)
SourceForge SourceForge.net helps out with: Project Website Downloads Version Control Forums Bug Tracking Statistics
Downloads tracked by SourceForge
ES40: Codebase growth SCSI IDE Threads IDB NIC VGA OSX NIC
Become Involved Play with it Contribute Help us out
Become Involved: play with it Download the emulator, and Let us know what you think, Let us know what you’d like, Let us know about bugs
Become Involved: contribute Submit patches for bugs Submit new code (add devices, for instance) Suggest better ways of doing things
Become Involved: help us out Help us get hold of low-level documentation or information Help us get hold of hardware to port to (Anyone willing to donate a real ES40, or an Integrity system?)
Contact Information Skype: iamcamiel
This presentation is Copyright (c) 2008 by the Camiel Vanderhoeven. Website: The information contained herein may be freely distributed. The OpenVMS Bootcamp NDA does not apply to this presentation. Permission is granted to copy, distribute and/or modify these documents under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) any later version published by the Free Software Foundation. The GNU Free Documentation License, version 1.2, can be found at