Commit graph

326 commits

Author SHA1 Message Date
Mark Pizzolato
372231dd3a VAX8600, VAX750: Pass correct delay to TTI device sim_clock_coschedule 2016-12-17 11:51:05 -08:00
Mark Pizzolato
76103cf760 VAX730, VAX750, VAX8600: Update Interval Timer and TODR to align with VAX780 2016-12-16 18:32:26 -08:00
Mark Pizzolato
5cf9e9ab86 VAX780: Removed pseudo ticks from TODR device
Removing pseudo ticking of the TODR improves simulator behavior
when idling.  As previously implement, the timing of the TODR and TMR
ticks weren't aligned and and idle simulator would have to wake up to
service both tick activities.

The real hardware has a TODR which changes every 10ms to reflect changes
to wall clock time.  This is already completely achieved by referencing the
host system time whenever the TODR register is referenced.  No need for
to simulate pseudo ticking.

The real interval timer hardware generates ticks a the rate specifically
programmed in the interval timer device registers.  The common cases
programmed the ticks at 10 ms intervals (100Hz), but real operating systems
exist which programmed ticks at 16667 usecs (60Hz).
2016-12-16 10:39:49 -08:00
Mark Pizzolato
7022f0c1b2 VAX: Fix interval timer to properly synchronize with calibrated clock ticks 2016-12-14 09:30:44 -08:00
Mark Pizzolato
eea394422e VAX, VAX750, VAX780, VAX8600: Properly coschedule console input with TMXR_MULT
The timer specific coscheduling routines take ticks as the delay argument
2016-12-12 01:53:49 -08:00
Mark Pizzolato
1c3c50fd26 VAX, VAX780, VAX750, VAX8600: Make TODR state file endian independent
When the TODR device (CLK) is attached to a state file, it operates in OS
agnostic mode.  This file can now be ported between hosts with different
endianness and work consistently to track the time of year.

Additionally, the VAX and VAX750 TODR values now properly don't
progress when they have zero values (or when they overflow back to zero).
2016-12-09 18:01:21 -08:00
Mark Pizzolato
a7593385aa VAX: Fixed Interval timer simplification
Reading the interval timer register while the timer is running needed
to be reflect usecs
2016-12-08 05:32:08 -08:00
Mark Pizzolato
63a16c4ed4 VAX: Simplify Interval Timer implementation
Use actual microsecond references, with the value synchronized to the CLK
device and all delays scaled to the calibrated instruction execution rate.
2016-12-06 13:36:01 -08:00
Mark Pizzolato
7498f183d2 VAX: Added debug options for SYSD device (TMR, TODR, CNF) 2016-12-05 14:57:35 -08:00
Mark Pizzolato
39d2944ede TIMER: Add support for catchup clock ticks and cleaned up asynchronous clocks
Asynchronous clocks are now built for all simulators which are built with
SIM_ASYNCH_IO defined.  The default behavior has asynchronous clocks
disabled since this is still experimental, but it can be enabled with
SET TIMER ASYNC.

Catchup clock ticks are now available, but since they're experimental,
they aren't enabled by default.  Catchup ticks are only available if the
simulators clock device calls sim_rtcn_tick_ack to acknowledge processing
of clock ticks.  The VAX simulators have been modified to leverage this.
Catchup clock ticks can be enabled with SET TIMER CATCHUP

Additionally, an idle threshold is provided which can be used to
influence when clock calibration may be suppressed.  The default is not
to suppress calibration activities.

The various timer behaviors are visible with the SHOW TIMER command.

The state of the operating timer facilities is visible with: SHOW CLOCK

Timer events which are queued are visible with the SHOW QUEUE command.
2016-11-16 23:50:53 -08:00
Mark Pizzolato
32bf2629b1 VAX8600: Changed console input polling
Polling is now done at least every 500ms even if the prior input
character hasn't been processed yet.   This allows ^E to provide a way
to exit a simulator which otherwise isn't reading from the console port.
2016-11-16 20:35:35 -08:00
Mark Pizzolato
da3f5359bb VAX, PDP11, PDP8, PDP1: Properly declare timer with clock unit 2016-09-26 15:55:50 -07:00
Mark Pizzolato
6e15dceaea VAX730, VAX8600: Remove mention of TQ device as bootable.
Fix #334
2016-08-29 23:01:54 -07:00
Mark Pizzolato
93a8754bfe MicroVAX I, MicroVAX II, VAX: Improve debug output for QVSS keyboard activities (LK) 2016-07-17 11:44:23 -07:00
Mark Pizzolato
83bf230a47 All VAX: Fix REI check when compatibilty mode. From Bob Supnik
The rule check on the PSL was incomplete. DV, FU, IV must all be zero,
and they weren't checked at all.

VAX Diagnostic EVKAE now runs to completion.
2016-07-14 11:45:32 -07:00
Mark Pizzolato
3f27267102 All VAX: Fix value check on SIIR.
Only the low 4 bits of the value are interesting and the value 0 in not
valid.  Never generate a Reserved Operand Fault. EVKAE detected this
problem.
2016-06-21 16:32:50 -07:00
Mark Pizzolato
953683c115 VAX730: Add missing value in DIB structure for proper auto-configure behavior 2016-06-21 05:24:51 -07:00
Mark Pizzolato
f946508c8b VAX750: Fix UBA register alignment and length check
The VAX 11/750 diagnostic supervisor makes word length references to
UBA register space, so this must have been legal.
2016-06-20 16:51:52 -07:00
Mark Pizzolato
c5d5a9dfbf VAX780: Fix Interval Timer logic
- Previous changes made to support 32V's 60HZ clock tick introduced changes
  which didn't properly handle increments and interrupt generation while single
  stepping the timer.

- The icr_rd routine returned an incorrect value when interpolation was
  necessary due to a missing cast when converting from double to uint32.

- Properly start the timer from the current state of the interval count register
  when the timer was previously stopped.
2016-06-20 15:56:19 -07:00
Mark Pizzolato
b89369e896 QVSS: Add support for keyboard bell 2016-06-11 08:30:36 -07:00
Mark Pizzolato
8d7e8f4d30 VAX: Fixed WordLshift (ASHP left overflow calc)
As observed by EVKAB diagnostic and reported in #319
2016-05-30 14:43:35 -07:00
Mark Pizzolato
a71a7c6882 VAX: Add octaword result information to instruction history
Also reworked drom result bitfield macros to use standard shift and masks
2016-05-28 06:03:21 -07:00
Mark Pizzolato
4e7fada26c VAX: Fix decode of octaword instructions
EXAMINE -M now properly displays instruction arguments for octaword
instructions.
2016-05-27 15:09:40 -07:00
Mark Pizzolato
8e5d0b0a40 VAX: Allow history log file to have mixed case filename 2016-05-27 07:55:17 -07:00
Mark Pizzolato
253e9deea7 All VAX: Fix idle/inifinite loop detection for instructions with side effects
Recent enhancements to idle/infinite loop detection generalized handling
of detecting 'loop to self' cases.  This was done without considering that
some instructions have side effects (i.e. change other state like the stack
pointer) and thus aren't merely loop to self cases.

This problem was reported in #315
2016-05-18 09:02:22 -07:00
Sergey Svishchev
504bc7c61f VAX: 2681 UART: implement ACR and IPR 2016-05-15 15:44:15 -07:00
Sergey Svishchev
ba4b951bd6 VAX: replace magic numbers with constants 2016-05-15 15:44:14 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
7bd58c6d7f PDP11, VAX8600, VAX780, VAX750: Fix prior Massbus auto configure.
As discussed in #307
2016-05-09 10:40:58 -07:00
Mark Pizzolato
550e360769 VAX750, VAX780, VAX8600: Fix Massbus device description output 2016-05-07 16:32:09 -07:00
Mark Pizzolato
1af590d806 PDP11, VAX8600, VAX780, VAX750: Fix to auto configure Massbus adapters
When a mix of Massbus devices are configured with some enabled and
others disabled, the MBA's need to be allocated and properly configured
in the desired preferred order (RP, TU, RS).  On the PDP11, this interacts
with auto-configure since the RH devices are visible in the Unibus I/O
page.  On the PDP11 the second Massbus device can only be configured
if the TM device is disabled since the auto-configure assigned vectors
overlap for RHB and TM.

Problem originally reported in #301.
2016-05-07 15:17:24 -07:00
Mark Pizzolato
3f4eed7517 VAX: Add debug support to the CLK device 2016-04-27 12:23:49 -07:00
Mark Pizzolato
2498fafd46 MicroVAX II, rtVAX1000: Fix NVR behavior to precisely reflect original hardware
Observations made about NVR behavior on real hardware:
    1) Aligned writes only affect a single RAM location
       without regard to the size of write, so no double
       pumping on writes.
    2) Unaligned (offset 3) writes do nothing without regard to size of the write
    3) Unaligned (offset 1) write 0 to the next higher NVR RAM location.
    4) Longword aligned and Unaligned (offset 3) reads return the same NVR RAM
       value in the the upper and lower words of the result.
    5) Unaligned (offset 1) reads reference the next higher NVR RAM cell for
       word and longword reads.

- Fix write behavior to match hardware.
- Fix read behavior to double pump word values for all unaligned word and longword
  reads.
2016-04-26 12:32:13 -07:00
Mark Pizzolato
b4b4a88a4e MicroVAX2: Fix watch chip implementation
- In VMS mode, the day and month have to behave correctly to map the
  current day of year to the equivalent day of year in 1982
- The month maintained and returned by the watch chip has January as 1
  while the tm_mon field in the 'struct tm' has 0 for January.
2016-04-13 12:12:29 -07:00
Mark Pizzolato
5a5df503af MicroVAX2: NVR watch chip simulation cleanup
- Fix NVR EXAMINE & DEPOSIT and SAVE/RESTORE as suggested by Bob Supnik.
- Properly initialize NVR contents when ATTACHed to a new/empty file.
2016-04-12 13:03:56 -07:00
Mark Pizzolato
6043962584 MicroVAX2, rtVAX1000: Remove duplicate REG declaration from SYSD DEVICE 2016-04-11 08:54:37 -07:00
Mark Pizzolato
46465d3348 VAX: Add explanation to reason for stopping due to invalid PSL value
A user could change the contents of the PSL via a DEPOSIT command.
If the resulting PSL indicates Interrupt Stack and IPL is 0, then this is
equivalent to MTPR #0,#IPL which is explicitly described as "undefined"

When a MTPR #0,#IPL is performed, the VAX chip microcode doesn't check,
neither does the 780 microcode.  Nothing bad will happen immediately,
however when an interrupt occurs, the saved PSL will now contain IPL 0
and Interrupt Stack.  This combination will cause the REI dismissing the
taken interrupt to fail.  To avoid a user manually creating this via
a DEPOSIT command or to potentially detect this condition while stepping
through instructions this check refuses to execute when the PSL is
invalid.  This change merely provides an explanation.

On page 5-37 of the VAX SRM (DEC standard 32), the REI pseudo-code defines
exactly what a legal PSL looks like. The check at the beginning of
sim_instr is a direct implementation of that check, intended to prevent
the user from creating an inconsistent PSL through the simulator console.
In a VAX chip, the console code would exit by a genuine REI, and any
illegal value created by the user would cause a system stop (return to the
console).

On page 5-43, the revision history notes that in rev 8 of chapter 5,
MTPR #0,#IPL was made undefined. Because MXPR is privileged, and the
general assumption was that VMS knew what it was doing, no one realized
the potential inconsistency that MTPR #IPL could create until it was
too late. "Undefined" allows any behavior, up to and including blowing up
the system.
2016-04-05 06:44:30 -07:00
Tony Nicholson
ac2e3d9c62 VAX: Fix external type definition for BadCmPSL
Compilation under HP C V7.3-009 on OpenVMS Alpha V8.3 detected this
problem
2016-04-02 07:29:57 -07:00
Mark Pizzolato
2b155ba29d VAX780, VAX750, VAX730, VAX8600: Add TC11/TU56 (DECtape) device to Unibus VAX simulators
VMS Driver and support files for the TC11 should be available at
http://bitsavers.org/bits/DEC/vax/vms/dkdriver_vms.zip
2016-03-27 12:28:02 -07:00
Mark Pizzolato
d2269f8bd5 VAX: Fix compile error introduced by previous commit. 2016-03-25 09:37:27 -07:00
Mark Pizzolato
126032428c VAX: Add IDLE names which align with various BSD Version names
Fix #294
2016-03-25 09:32:36 -07:00
Mark Pizzolato
bfe87ed1c5 VAX780, VAX750, VAX730, VAX8600: Add TC11/TU56 (DECtape) device to Unibus VAX simulators 2016-03-25 04:01:44 -07:00
Mark Pizzolato
d0e3d2252a VAX: Correct documented list of CPU IDLE options.
Fix #294
2016-03-24 10:17:21 -07:00
Mark Pizzolato
733f904b8c VAX: Removed SET CPU IDLE=ALL which can only produce strange behavior
As discussed in issue #294
2016-03-24 09:49:28 -07:00
Mark Pizzolato
e153b7f224 PDP8, VAX750: Fix compiler detected errors in REG initializers 2016-03-18 15:43:30 -07:00
Mark Pizzolato
253f8a8dcf VAX: Move CPU register and routine declarations into vax_defs.h
Avoid redundant declarations in every simulator module that uses them
and allow compiler to validate consistency of declarations and definitions.
2016-02-29 16:37:18 -08:00
Mark Pizzolato
8d51b3517d VAX: Add computed results to instruction history trace 2016-02-28 18:02:25 -08:00
Mark Pizzolato
c8cd853102 VAX: Allow SET CPU IDLE command to not specify a stability value.
Report invalid stability values and explain why they're invalid.

Fixes #281
2016-02-26 02:17:31 -08:00
Mark Pizzolato
9d979360b4 VAX: Add the ability to 'STEP OUT" of the most recent subroutine call.
This is invoked with STEP -R nnn, or CONT -R.  Execution will continue
across any new subroutines which are called and stop after the current
routine executes a RET or RSB instruction.
2016-02-24 10:44:12 -08:00
Mark Pizzolato
49d3ec8ff7 VAX: Add command support to set the idle stability delay
SET CPU IDLE={OS{:n}} where n is the idle stability delay
which is also the clock calibration delay.
A -D switch on a SHOW -D CPU IDLE command will
display the stability delay as will a SHOW CLOCK command.
2016-02-23 17:07:12 -08:00