Much more complete setup and run environment.
Fixed clock scaling for SV1, changed clock name from CPU clock to System clock to better match actual HW terminology.
This commit is contained in:
@@ -150,36 +150,36 @@ Mainframe_c::Mainframe_c(const Configuration_c &aConfig, CLogger_c &aLogger, boo
|
||||
std::string MachineType = aConfig.get<std::string>("MachineType", "J90");
|
||||
if (MachineType == "J90") {
|
||||
mMachineType = MachineTypes_e::J90;
|
||||
mCpuClockPeriod = 10.0;
|
||||
mSystemClockPeriod = 10.0;
|
||||
}
|
||||
else if (MachineType == "YEL" || MachineType == "YMP-el") {
|
||||
mMachineType = MachineTypes_e::YEL;
|
||||
mCpuClockPeriod = 30.0;
|
||||
mSystemClockPeriod = 30.0;
|
||||
}
|
||||
else if (MachineType == "YMP") {
|
||||
mMachineType = MachineTypes_e::YMP;
|
||||
mCpuClockPeriod = 6.0;
|
||||
mSystemClockPeriod = 6.0;
|
||||
}
|
||||
else if (MachineType == "SV1") {
|
||||
mMachineType = MachineTypes_e::SV1;
|
||||
mCpuClockPeriod = 2.0;
|
||||
mSystemClockPeriod = 10.0; // The SV1 has a split core/system clock architecture. While the core clock can be up to 500MHz, the system clock was locked at 100MHz.
|
||||
}
|
||||
else if (MachineType == "XMP1") {
|
||||
mMachineType = MachineTypes_e::XMP1xx;
|
||||
mCpuClockPeriod = 9.5;
|
||||
mSystemClockPeriod = 9.5;
|
||||
}
|
||||
else if (MachineType == "XMP2") {
|
||||
mMachineType = MachineTypes_e::XMP2xx;
|
||||
mCpuClockPeriod = 9.5;
|
||||
mSystemClockPeriod = 9.5;
|
||||
}
|
||||
else if (MachineType == "XMP4") {
|
||||
mMachineType = MachineTypes_e::XMP4xx;
|
||||
mCpuClockPeriod = 9.5;
|
||||
mSystemClockPeriod = 9.5;
|
||||
}
|
||||
else {
|
||||
throw Generic_x() << "Unknown machine type: " << MachineType;
|
||||
}
|
||||
mCpuClockPeriod = aConfig.get<double>("CpuClockPeriod", mCpuClockPeriod);
|
||||
mSystemClockPeriod = aConfig.get<double>("SystemClockPeriod", mSystemClockPeriod);
|
||||
if (mUseHostRealTimeClock) {
|
||||
mRealTimeTimer.start();
|
||||
mRealTimeStart = mRealTimeTimer.elapsed().wall;
|
||||
@@ -767,7 +767,7 @@ CInt_t Mainframe_c::HostToSim() {
|
||||
CInt_t Mainframe_c::GetRealTimeClock() const {
|
||||
if (mUseHostRealTimeClock) {
|
||||
boost::timer::nanosecond_type DeltaTime = mRealTimeTimer.elapsed().wall - mRealTimeStart;
|
||||
CInt_t DeltaClocks = CInt_t(double(DeltaTime) / mCpuClockPeriod);
|
||||
CInt_t DeltaClocks = CInt_t(double(DeltaTime) / mSystemClockPeriod);
|
||||
if (DeltaClocks == mLastRealTimeReading) {
|
||||
DeltaClocks += 1;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ protected:
|
||||
|
||||
boost::timer::cpu_timer mRealTimeTimer;
|
||||
boost::timer::nanosecond_type mRealTimeStart;
|
||||
double mCpuClockPeriod;
|
||||
double mSystemClockPeriod;
|
||||
CInt_t mRealTimeClock;
|
||||
CInt_t mRealTimeClockIncrement;
|
||||
bool mUseHostRealTimeClock;
|
||||
|
||||
8
unicos
Executable file
8
unicos
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
PATH=$PATH:.:simulator/_bin/cygwin_release:simulator/_bin/linux_release:bin
|
||||
|
||||
mkdir dump
|
||||
mkdir disk
|
||||
mkdir tape
|
||||
cray_sim unicos.cfg
|
||||
|
||||
152
unicos.cfg
Normal file
152
unicos.cfg
Normal file
@@ -0,0 +1,152 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; J-90 with UNICOS configuration
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Setting up memory and loading image files
|
||||
MachineType SV1
|
||||
CpuMemorySize 0x2000000 ; We have 32MWords (64-bits each) of memory
|
||||
|
||||
StartupCpuIdx 0 ; This will set up the first CPU to come out of reset (on instructions from the IOP)
|
||||
|
||||
MemoryDumpFile dump/ramfs.mem ; If we get terminated, dump mainframe memory to this file
|
||||
|
||||
SingleThreadCpus no
|
||||
MultiThreaded no
|
||||
UseThreadAffinity yes
|
||||
|
||||
WindowWidth 120
|
||||
WindowHeight 40
|
||||
|
||||
DefaultLogLevel None
|
||||
|
||||
EnableTimeStamp yes
|
||||
|
||||
LogFileName dump/ramfs.log
|
||||
|
||||
SysCallTableBase 0x000C528F
|
||||
SysCallTableEnd 0x000C5A57
|
||||
;SysCallTableBase 0x000FE420
|
||||
;SysCallTableEnd 0x000FEBF0
|
||||
|
||||
ProcTableBase 0x000357B7
|
||||
ProcTableLength 650 ; NPROC from config.h
|
||||
|
||||
;SystemClockPeriod 10 ; Clock period in ns.
|
||||
;UseHostRealTimeClock false
|
||||
RealTimeClockIncrement 90 ; By how much should the real time clock increment for every instruction burst
|
||||
|
||||
OsType UNICOS ; Controls how syscalls are decoded for the logger
|
||||
|
||||
BreakPoints {
|
||||
; 0x000F42CF:p1 { Type LogOn }
|
||||
}
|
||||
|
||||
EventPoints {
|
||||
}
|
||||
|
||||
WatchPoints {
|
||||
}
|
||||
|
||||
ImageFiles {
|
||||
}
|
||||
|
||||
ChannelCount 256
|
||||
|
||||
LogUnusedChannels no
|
||||
|
||||
DefaultChannel {
|
||||
}
|
||||
|
||||
ClusterCount 3
|
||||
CpuCount 1
|
||||
Cpus {
|
||||
Default {
|
||||
}
|
||||
}
|
||||
|
||||
WebServer {
|
||||
Port 8080
|
||||
; Address localhost
|
||||
Address *
|
||||
Docroot httpd
|
||||
ResourcePatterns {
|
||||
".*" ok
|
||||
}
|
||||
}
|
||||
|
||||
IopClusters {
|
||||
SimIopCluster {
|
||||
DontTouchExchangePacket no
|
||||
IopRevision IOSE ; Controls communication standard. Possible values are IOSD and IOSE
|
||||
MasterCluster Yes
|
||||
KernelFileName unicos.ymp.10012
|
||||
KernelPreamble 0x40
|
||||
ParameterFileName unicos.param
|
||||
RamFsFileName ram_fs
|
||||
RunLevel 5
|
||||
|
||||
I2C {
|
||||
Channel 16
|
||||
}
|
||||
C2I {
|
||||
Channel 17
|
||||
}
|
||||
EthInterfaces {
|
||||
en0 {
|
||||
InterfaceNameLinux tap1 ; Tap interface name to connect to on Linux
|
||||
InterfaceNameWindows "Cray Ethernet" ; WinTap interface name to connect to on Windows
|
||||
SimMacAddr 0x020143524159
|
||||
Channel 020
|
||||
IopNumber 0
|
||||
}
|
||||
}
|
||||
Disks { ; Disc configuration must precisely match that in install.param. Best not to touch unless you know what you're doing
|
||||
swap {
|
||||
PysicalDeviceId 021
|
||||
IopNumber 0
|
||||
Unit 0
|
||||
ImageFileName swap.img
|
||||
DeviceType DD_U
|
||||
}
|
||||
dump {
|
||||
PysicalDeviceId 022
|
||||
IopNumber 0
|
||||
Unit 0
|
||||
ImageFileName dump.img
|
||||
DeviceType DD_U
|
||||
}
|
||||
root {
|
||||
PysicalDeviceId 024
|
||||
IopNumber 0
|
||||
Unit 0
|
||||
ImageFileName root.img
|
||||
DeviceType DD_U
|
||||
}
|
||||
core {
|
||||
PysicalDeviceId 025
|
||||
IopNumber 0
|
||||
Unit 0
|
||||
ImageFileName core.img
|
||||
DeviceType DD_U
|
||||
}
|
||||
}
|
||||
Consoles {
|
||||
Default {
|
||||
NewTerminalCommand "xterm -e {cmd}&"
|
||||
; NewTerminalCommand "tmux split-window {cmd}&"
|
||||
ConsoleCommandLinux "telnet {host} {port}"
|
||||
ConsoleCommandWindows "putty.exe -load Unicos -telnet -P {port} {host}"
|
||||
MapBackspace no
|
||||
LogFile auto
|
||||
}
|
||||
}
|
||||
Peripherals {
|
||||
PrinterFileName lp.txt
|
||||
DiskDir disk
|
||||
TapeDir tape
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
141
unicos.param
Normal file
141
unicos.param
Normal file
@@ -0,0 +1,141 @@
|
||||
revision "SN9000.20";
|
||||
ios_e {
|
||||
cluster 0 {
|
||||
miop; eiop 0;
|
||||
}
|
||||
}
|
||||
|
||||
mainframe {
|
||||
1 cpus;
|
||||
32 Mwords memory;
|
||||
channel 020 is lowspeed to cluster 0;
|
||||
channel 78 is lowspeed to pseudo TCP;
|
||||
}
|
||||
|
||||
unicos {
|
||||
50 NBUF;
|
||||
50 NPBUF;
|
||||
/* 98280 LDCHCORE;*/
|
||||
10 LDCHCORE;
|
||||
500 NLDCH;
|
||||
256 PDDMAX;
|
||||
256 LDDMAX;
|
||||
32 HDDMAX;
|
||||
300 PDDSLMAX;
|
||||
8 MDDSLMAX;
|
||||
8 SDDSLMAX;
|
||||
8 RDDSLMAX;
|
||||
4 SSDDSLMAX;
|
||||
64 HDDSLMAX;
|
||||
0 GUESTMAX;
|
||||
294912 TAPE_MAX_PER_DEV;
|
||||
8 TAPE_MAX_CONF_UP;
|
||||
16 TAPE_MAX_DEV;
|
||||
}
|
||||
|
||||
filesystem {
|
||||
/*
|
||||
* Physical device configuration
|
||||
*/
|
||||
RAM ramdev {
|
||||
length 12288 blocks;
|
||||
pdd ram {
|
||||
minor 3;
|
||||
block 0;
|
||||
length 12288 blocks;
|
||||
}
|
||||
}
|
||||
disk "swap" {
|
||||
type DD_U;
|
||||
iopath {
|
||||
cluster 0;
|
||||
eiop 0;
|
||||
channel 021;
|
||||
}
|
||||
unit 0;
|
||||
pdd swap {
|
||||
minor 4;
|
||||
sector 0;
|
||||
length 65536 sectors;
|
||||
}
|
||||
}
|
||||
disk "dump" {
|
||||
type DD_U;
|
||||
iopath {
|
||||
cluster 0;
|
||||
eiop 0;
|
||||
channel 022;
|
||||
}
|
||||
unit 0;
|
||||
pdd dump {
|
||||
minor 5;
|
||||
sector 0;
|
||||
length 32768 sectors;
|
||||
}
|
||||
}
|
||||
disk "root" {
|
||||
type DD_U;
|
||||
iopath {
|
||||
cluster 0;
|
||||
eiop 0;
|
||||
channel 024;
|
||||
}
|
||||
unit 0;
|
||||
pdd root {
|
||||
minor 7;
|
||||
sector 0;
|
||||
length 781000 sectors;
|
||||
}
|
||||
}
|
||||
ldd ram {
|
||||
minor 58;
|
||||
pdd ram;
|
||||
}
|
||||
ldd swap {
|
||||
minor 59;
|
||||
pdd swap;
|
||||
}
|
||||
ldd dump {
|
||||
minor 60;
|
||||
pdd dump;
|
||||
}
|
||||
ldd root {
|
||||
minor 61;
|
||||
pdd root;
|
||||
}
|
||||
/* rootdev is ldd ram;*/
|
||||
rootdev is ldd root;
|
||||
swapdev is ldd swap;
|
||||
dmpdev is ldd dump;
|
||||
}
|
||||
|
||||
network {
|
||||
8 nfs_static_clients;
|
||||
8 nfs_temp_clients;
|
||||
8 cnfs_static_clients;
|
||||
8 cnfs_temp_clients;
|
||||
32768 nfs_maxdata;
|
||||
256 nfs_num_rnodes;
|
||||
1200 nfs_maxdupreqs;
|
||||
3 nfs_duptimeout;
|
||||
0 nfs_printinter;
|
||||
16000 tcp_nmbspace;
|
||||
2 himaxdevs;
|
||||
4 himaxpaths;
|
||||
1 fdmaxdevs;
|
||||
0 npmaxdevs;
|
||||
1 enmaxdevs;
|
||||
2 atmmaxdevs;
|
||||
131072 atmarp_recv;
|
||||
65536 atmarp_send;
|
||||
1024 atmarp_entries;
|
||||
0755 hidirmode;
|
||||
0666 hifilemode;
|
||||
endev 0 {
|
||||
iopath {
|
||||
cluster 0;
|
||||
eiop 0;
|
||||
channel 020;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ SysCallTableEnd 0x000C5A57
|
||||
ProcTableBase 0x000357B7
|
||||
ProcTableLength 650 ; NPROC from config.h
|
||||
|
||||
CpuClockPeriod 10 ; Clock period in ns.
|
||||
;SystemClockPeriod 10 ; Clock period in ns.
|
||||
;UseHostRealTimeClock false
|
||||
RealTimeClockIncrement 90 ; By how much should the real time clock increment for every instruction burst
|
||||
|
||||
|
||||
Reference in New Issue
Block a user