Commit graph

218 commits

Author SHA1 Message Date
Mark Pizzolato
2574100ec5 SCP: Fix EXPECT processing to avoid comparing against old data 2017-09-13 17:02:16 -07:00
Mark Pizzolato
e9d5e2e3c9 SCP: Leverage stdint.h for environments where it is available 2017-09-07 09:12:06 -07:00
Mark Pizzolato
727cd8e217 SCP: Fix potential conflics with library provided ctype routines 2017-09-03 18:23:58 -07:00
Mark Pizzolato
23f4c90a6d SCP: Generalized numeric switch processing 2017-09-03 09:19:20 -07:00
Mark Pizzolato
245818d348 SCP: Added extended radix options (-2, -8, -10 and -16) for EXAMINE and DEPOSIT 2017-08-25 15:48:11 -07:00
Mark Pizzolato
b6f549ef18 SCP: Properly name registers when name might be a macro name 2017-06-23 12:33:58 -07:00
Mark Pizzolato
f404343b56 SCP: Make sure that SIMH version information is always available
include sim_rev.h in sim_defs.h
2017-06-23 04:24:54 -07:00
Mark Pizzolato
2c6c8f4ef8 SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms 2017-05-07 19:19:55 -07:00
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07:00
Mark Pizzolato
14b9265af3 PDP11, VAX: Cleaned MSCP/TMSCP packet queues to be uint16 2017-03-12 19:06:46 -07:00
Mark Pizzolato
9d013e9b44 SCP: Fix asynchronous event queue updates without intrinsic instructions.
As discussed in #393
2017-03-09 07:55:21 -08:00
Mark Pizzolato
8882cebe27 SCP: Produce detailed message when REG names are ambiguous.
As discussed in #402 and #398
2017-02-14 14:20:09 -08:00
Mark Pizzolato
69d2ba5193 SCP: Avoid use of 64 bit integers in SCP when host doesn't support it
As mentioned for VAX in #394
2017-02-08 16:44:49 -08:00
Mark Pizzolato
692b9abe5f SCP: Add ability to descriptively name UNITs
This allows a device simulator to specifically name the units that it uses
for different purposes.  This info is visible in the output of SHOW QUEUE
and debug output.

Once specified or dynamically determined (as previously occurred with
each call to sim_uname()), that name is saved for fast delivery on subsequent
calls.  This will remove some overhead when running with debugging on.
2017-02-06 10:27:01 -08:00
Mark Pizzolato
8dcc8c0678 SCP: Add the ability to Fprintf to memory buffer 2017-01-23 10:25:06 -08:00
Mark Pizzolato
9851a36dd8 SCP: Fix Async I/O primitives operations for hosts without Intrinsic CAS 2017-01-10 23:40:25 -08:00
Mark Pizzolato
b800587f34 TIMER: Add calibrated ROM memory access support 2017-01-05 05:50:46 -08:00
Mark Pizzolato
aa82b57d10 TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with
   precisely correct delays aligned with the calibrated clock once
   per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
   with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
   the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
   that are shorter than the currently shortest scheduled event
2016-12-26 12:42:25 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
7964e2b72d PDP8: Fix SHOW TTIX SUMMARY
It was defined in lowercase and has now been made upper case for consistency.
The code which performs the match also has been change to do a case
insensitive compare.
2016-12-17 13:38:22 -08:00
Mark Pizzolato
ae52f4c331 TIMER: Add correct sim_activate_time functionality for all timer cases.
Also:
- allow a timer to dynamically stop itself (by calling sim_rtcn_calb
   with tps=0), and then to start the internal timer to provide a calibration
   baseline if necessary.
- Fix coschedule interval computation when the queue is empty.
- Properly select the correct timer for coscheduling without a specific tmr
- Properly adjust the coschedule queue's next time value when entries are
   canceled.
- Cleaned up throttling to behave well with all potential throttling rates and
   to make visible what is happening when boundaries are reached.
2016-12-15 09:57:34 -08:00
Mark Pizzolato
89e372ba92 TIMER: Restore functionality for clocks devices that don't use sim_activate_after
Clock devices which call sim_register_clock_unit or sim_register_clock_unit_tmr
are best behaved if they use sim_activate_after to schedule their tick events.
2016-11-22 01:24:26 -08:00
Mark Pizzolato
f046171269 TIMER: Fix problem activation time for clock units 2016-11-20 13:06:41 -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
cf1e7b9cca SCP, PDP11: Added HELP CPU BREAK to display info about breakpoint types 2016-10-06 13:25:54 -07:00
Mark Pizzolato
222ae77436 SCP: Add sim_brk_message() to facilitate easy reporting of matched breakpoints.
Also extended the optional VM supplied routines to include sim_vm_sprint_addr.
Simulators which provide sim_vm_fprint_addr should also provide
sim_vm_sprint_addr with sim_vm_fprint_addr reworked to leverage
sim_vm_sprint_addr internally.  sim_vm_sprint_addr is currently only used by
sim_brk_message() which is an API which a simulator may choose to use if
it supports multiple breakpoint types,
2016-09-01 14:32:01 -07:00
Mark Pizzolato
f82d3f8994 SCP: Breakpoint enhancements
- Reliable support for multiple breakpoint types
- Optional separate breakpoint types defined concurrently with the same address
2016-08-31 08:10:38 -07:00
Mark Pizzolato
b4f3d6c6d8 SCP: Breakpoint cleanup.
- Add detailed error message info while parsing breakpoint commands
 - Properly limit breakpoint class values to reflect available mask bits
 - Declare globally sim_brk_npc since it is a documented API
 - Revise simh_breakpoints.doc to reflect current behavior
2016-08-26 14:35:00 -07:00
Mark Pizzolato
c5ee1ad971 SCP: Enhance EXPECT support to allow multiple rules with the same match string
Multiple rules with the same match string are processed in the order the EXPECT
commands are entered.  NOEXPECT will remove all pending EXPECT rules which
have the match string provided on the NOEXPECT line.
2016-06-05 01:40:38 -07:00
Mark Pizzolato
e67bf602a0 SCP: Added shutdown flag for detach_all 2016-05-28 13:32:15 -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
fc4171140a SCP: Add BINRDATA, BINRDATAD and BINRDATADF REG initialization macros.
These describe a register which is to be displayed in binary.
2016-03-23 00:43:36 -07:00
Mark Pizzolato
3ff89074f5 SCP: Add generic REGDATA register populating macro.
This allows simulator code to be insulated from any changes which may
be made to the REG structure in the future.  The REGDATA macro will be
update as needed to avoid any changes in simulator specific code.
2016-03-17 10:45:45 -07:00
Mark Pizzolato
329f42a1fc SCP: Rework newly added REG macro definitions to avoid problems with prior declarations
Fix #288
2016-03-16 20:33:41 -07:00
Mark Pizzolato
58925f7672 SCP: Assure that a failure message is emitted before calling abort(). 2016-03-14 22:57:46 -07:00
Mark Pizzolato
37733cabee SCP: Add support REGister data in arrays of arbitrary structures. 2016-03-14 15:07:22 -07: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
f1d9e749f6 DISK: Add disk content validation checking
When creating a new disk image the new disk image can be populated with
unique data in each sector.  The data is the logical block address of the sector
in a 4 byte little-endian value.  This is enabled when the -I switch is specified
on the ATTACH command.  To leverage this, a -K flag is interpreted on the
ATTACH command which will validate the entire disk contents actually
contains the expected value at attach time and also will validate that any data
written to the disk during simulator operation also contains the same logical
block address values.
2015-12-06 16:26:11 -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
7266304105 ALL: changed ASSURE macro to leverage sim_printf for log and debug output. 2015-10-27 21:07:03 -07:00
Mark Pizzolato
1ef6c3d6b9 SCP: Added REG_V_UF and REG_UFMASK to support user-defined register flags. From Dave Bryan
Altered the calling sequences to fprint_sym and parse_sym in ex_reg and dep_reg to merge user-defined register flags with the radix in the addr parameter.  This allows the print and parse routines to identify the register or determine how it is to be handled.  These are called in lieu of the standard print and parse routines if a register has REG_VMIO or at least one user-defined flag set.
2015-09-20 14:04:24 -07:00
Mark Pizzolato
bd2f592918 Revert "SCP: Remove ASCII source code character set dependency"
This reverts commit 7c7b44e409.

The prior commit didn't work for static initializers.  There are other ASCII dependencies in simh.  They should all be solved together or not at all.
2015-08-07 00:54:23 -07:00
Mark Pizzolato
7c7b44e409 SCP: Remove ASCII source code character set dependency
Provide reasonable behavior on any platform which doesn't use ASCII as a character set.  Method suggested by Dave G4UGM.
2015-08-03 12:35:08 -07: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
2c2ffe39bf Remote Console: Restructured so that commands are not executed within the sim_instr() routine.
This approach removes the burden from any simulator code to perform instruction execution postlude before calling sim_process_event and prelude activites when sim_process_event returns.

Remote Console commands are now executed from the same simulator context as if entered from the initial sim> prompt.
2015-02-15 11:00:01 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
4fbf8f36db SCP: Fix timer initialization logic when CAS intrinsic instructions aren't available for Lock Free queue insertion 2015-01-19 16:36:19 -08:00
Mark Pizzolato
6f1e8377c9 SCP: Added -T switch to the EXPECT, SEND and STEP commands to specify that the units of delay/stepping are in microseconds rather than instructions. 2015-01-09 04:52:21 -08:00
Mark Pizzolato
e37d0658fa SCP: Fix clock initialization in AIO_INIT when __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 and __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 are not available. 2015-01-08 19:51:01 -08:00
Mark Pizzolato
4381f9acc1 SCP: Added definition of SIM_INLINE when compiling with MSVC, gcc and clang 2014-12-30 18:46:43 -08:00