The problem was that two consequtive reads of the RTC in quick succession within the compiler was used to validate the results in the buffer filled by the mtimes syscall. This syscall buffer is potentially filled by another processor or by the same one, so the programmers decided to use two techniques to decide if the results are reliable: 1. Read the buffer twice and compare 2. Make sure that the two reads happened within 200 clock-cycles from one another. Since our RTC is based on the host clock, the actual time passed between those two instructions depends on the host speed. This fix allows for a - programmable - interval within which if two RTC queries are made, we return an artificially low delta time. This makes cc happy, while doesn't interfere with normal OS operation and scheduling. The setting (RealTimeClockChunkLimit, which defaults to 5000) might need to be adjusted for slow machines, such as the RaspberryPi4 or similar.
This repository contains the source code for the Cray PVP simulator. This simulator allows you
to run unmodified Cray software for the following machines:
- Cray XMP
- Cray YMP-el
- Cray J90
- Cray SV1
Support for other machines, such as the Cray-1, the Cray-YMP, even the Cray-C90 and Cray-T90
would most likely be possible, but for the lack of SW availablility for these platforms.
Apart from the source code, also included in the repository the tools and files needed to
create an executable COS-1.17 image for the Cray-XMP.
If you have access to old Cray SW, especially for as-of yet unsupported machines,
please contact me!
For more details on the project, see http://www.modularcircuits.com/blog/articles/the-cray-files/
Linux build instructions:
==================================
1. Clone repository:
git clone https://github.com/andrastantos/cray-sim.git
2. Install build dependencies:
sudo apt install g++ make libboost-all-dev libncurses-dev libgpm-dev
3. Install run dependencies
sudo apt install xterm telnet
4. Build
cd cray-sim/simulator
make build
5. Build images
cd ../target/cos_117
./build_boot_tape
./build_exp_disk
6. Run simulator
cd ../..
./run
Native Windows build instructions:
===================================
1. Build boost and set up project files accordingly
see simulator\README_boost.txt for details
2. Open solution in Visual Studio and build
Open simulator\all.sln
Hit build all
3. Build images
cd target\cos_117
build_boot_tape
build_exp_disk
4. Run simulator
cd ..\..
run
Languages
Assembly
89.8%
C++
6%
C
3.5%
Makefile
0.5%
Shell
0.2%