Commit graph

75 commits

Author SHA1 Message Date
Mark Pizzolato
a008b0a972 SCP: Fix throttling to provide reasonable operation of calibrated clocks
- Generate reasonable messages when presented with erroneous throttle input.
- Add throttling recalibration logic if only if target rate drift exceeds 5%
2016-09-14 14:12:24 -07:00
Mark Pizzolato
a24aba69ae VIDEO: Added priority boost to thread performing SDL processing and updates
Reworked all priority adjustment code to leverage a new
sim_os_set_thread_priority API which is coded to use pthreads or OS
priority adjustment APIs as necessary.
2016-06-11 09:52:33 -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
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
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
Mark Pizzolato
9da10c1219 TIMER: Make internal calibrated clock persist across multiple boots 2016-01-28 15:12:12 -08:00
Mark Pizzolato
e1ed22f30c TIMER: Add missing type on internal calibrated clock service routine 2016-01-28 13:32:47 -08:00
Mark Pizzolato
00e8c80c7b TIMER: Provide an internal calibrated clock when none is otherwise available.
In the event that there are no active clock devices, no instruction
rate calibration will be performed.  This is more likely on simpler
simulators which don't have a full spectrum of standard devices or
possibly when a clock device exists but its use is optional and thus
sometimes it may be disabled.
2016-01-28 08:00:41 -08:00
Mark Pizzolato
ab8123e9b6 TIMER: Force at minimum of 1 instruction delay for non-zero delays in sim_activate_after(). 2016-01-10 15:53:01 -08:00
Mark Pizzolato
094cbf8295 TIMER: Avoiding conditional directives that break statements
Based on Romero B. de S. Malaquias comments Fixes #256
2015-12-17 06:44:03 -08:00
Mark Pizzolato
de0d251c75 TIMER, SCP: Change the sim_activate_after APIs to pass the delay value as uint32.
Also change all sim_defs.h structure declarations and references of sim_
structures to use the typedef names everywhere.
2015-12-10 06:33:59 -08:00
Mark Pizzolato
ac9e19e250 TIMER: Add debug support for MUX clock co-scheduling 2015-12-08 16:56:34 -08:00
Mark Pizzolato
0938d31e59 PDP11, VAX: MUX input rate limiting works correctly with input arriving on multiple lines concurrently. 2015-11-28 12:49:54 -08:00
Mark Pizzolato
62e36241a4 PDP11, VAX: Support multiplexer input speeds greater than 9600bps for console, DZ, VH, DL and DC devices
Each of the speeds greater than 9600bps deliver a character in less than
1ms.  Computing inter-character delays in microseconds therefore can't
be precise enough to be well behaved.  Measuring the inter-character
delays in instructions (scalled by the calibrated clock) gets us the needed
precision.
2015-11-25 04:25:21 -08:00
Mark Pizzolato
44ef17f971 TIMER: Fix recently revised sim_idle_capable for hosts which aren't idle capable. 2015-11-23 15:45:46 -08:00
Mark Pizzolato
b3b038900c TIMER: Fix clock calibration after a host OS sleep/hibernate 2015-11-23 12:55:42 -08:00
Mark Pizzolato
668761a460 SCP: Add display of host OS clock resolution to SHOW VERSION 2015-11-23 07:30:28 -08:00
Mark Pizzolato
4a1cf3587f TIMER: Fix sim_timer_activate_after to avoid overflow
The conversion of time to instructions can overflow an int32 when the
current instructions per second is high and the delay interval is high.

We limit the instruction delay to the maximum value available in an int32,
which for essentially all cases won't matter since the resulting delay is used
for a drop dead timeout and doesn't need to be precise or it will be
canceled before it ever fires anyway.
2015-11-13 08:28:20 -08:00
Mark Pizzolato
ef6528bf32 SCP: Added automatic saving of console WRU, DEL, BRK and PCHAR console variables and provided a way for a simulator to declare that is doesn't have a console port so automatic WRU detection can be performed. 2015-04-03 16:05:01 -07:00
Mark Pizzolato
4eed007607 SCP: Restructured timer/co-scheduling activities to support co-scheduling on specific timers 2014-12-02 05:33:59 -08:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07:00
Mark Pizzolato
3951ad2432 Cleanup of unneeded global extern declarations 2014-10-10 08:18:15 -07:00
Mark Pizzolato
e8114cf088 SCP: Fix errant display of NEXT warning on first STEP command. From Peter Schorn
Better display in SHOW VERSION of full compiler name on OSX when using the clang LLVM compilers
Change stray non-ascii quote characters in comments.
2014-04-18 04:58:27 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
6be61242da SCP: Add timer logic description comments to sim_timer 2013-09-08 17:27:58 -07:00
Mark Pizzolato
c097ae5e57 Added help info to asynchronous timer device 2013-05-15 05:43:14 -07:00
Mark Pizzolato
ddb10425e7 Reworked all asynch queues to always link using the unit a_next field instead of the next field. 2013-05-08 09:34:53 -07:00
Mark Pizzolato
6c6d641034 Tolerate race condition which results in spurious timer thread wakeups which were causing the timer thread to exit. (SIM_ASYNCH_CLOCKS) 2013-05-07 11:40:07 -07:00
Mark Pizzolato
6cf54e8341 Fixes for stable operation with SIM_ASYNCH_CLOCKS defined 2013-05-07 11:22:29 -07:00
Mark Pizzolato
f8da94e001 Fixed compile and operational behaviors when running with SIM_ASYNCH_CLOCKS enabled 2013-05-04 12:22:50 -07:00
Mark Pizzolato
4bd72e666c Compiler and static analyzer fixes from Peter Schorn. 2013-04-13 16:59:54 -07:00
Mark Pizzolato
a262dd9c14 Compiler indicated cleanups 2013-03-19 01:11:22 -07:00
Mark Pizzolato
d3ec5a6965 Fix to properly reference the correct routine during initial clock calibration introduced in commit: c45a377c7 2013-03-17 11:02:46 -07:00
Mark Pizzolato
de483074e6 Cleanup for build on VMS 2013-03-16 11:44:34 -07:00
Mark Pizzolato
c45a377c71 Use the same sleep API to determine the host minimal sleep time that will be used depending on whether ASYNCH_IO is enabled 2013-03-15 19:14:58 -07:00
Mark Pizzolato
b31dc88d0d Added indication of idle/throttling capabilities and the OS clock tick size to the SHOW VERSION output 2013-03-14 11:37:31 -07:00
Mark Pizzolato
9bd8305943 Cleanup compiler warnings on Solaris and newer OSX clang compilers.
Add Large File support on Solaris
2013-03-13 20:29:03 -07:00
Mark Pizzolato
3dea6056e6 Remove compiler warnings generated by newer clang compiler 2013-03-13 16:38:30 -07:00
Mark Pizzolato
c293e154b0 Start sleep calibration for *nix platforms on a clock tick 2013-03-13 14:42:06 -07:00
Mark Pizzolato
e3207c2009 Compiler suggested cleanups 2013-01-23 05:07:44 -08:00
Mark Pizzolato
517e1e2bd1 Add display of the registered clock device 2013-01-22 16:05:02 -08:00
Mark Pizzolato
9fc6aa73d6 Finish migration for simulators to use generic clock co-scheduling and sim_activate_after for scheduled delays 2013-01-22 05:41:27 -08:00
Mark Pizzolato
83c1d80194 Merge branch 'master' into AsyncTmxr
Conflicts merged and missing changes in new modules added as needed for clock co-scheduling.
2013-01-21 16:52:42 -08:00
Mark Pizzolato
4f19d08869 Initial merge of Asynchronous Multiplexer and Asynchronous Clock support 2013-01-17 11:34:51 -08:00
Mark Pizzolato
a774f05633 Fix to allows builds without SIM_ASYNCH_IO defined to work on OSX 2013-01-17 09:54:55 -08:00
Mark Pizzolato
dac73b9381 Migrating scp and library global variables to be declared as extern in the appropriate library include file and remove repetitive declarations in referencing modules. 2013-01-10 13:29:15 -08:00
Mark Pizzolato
784ae24324 - Fixed asynchronous i/o hangs introduced when asynchronous cancel support was added
- Added event debug support to scp and the vax simulator
- Moved external declarations into include files related to modules which define them and removed random externs from modules which referenced them
- Fixed typos in sim_ether
- Fixed sim_disk and sim_tape to properly manage asynchronous threads on an i/o flush
2013-01-09 17:02:58 -08:00
Mark Pizzolato
50cf91d441 Merge branch 'SerialMux' and compiler suggested cleanup 2012-12-18 09:52:14 -08:00
Mark Pizzolato
0450a9b430 Compiler suggested cleanup 2012-12-15 07:56:42 -08:00