Commit graph

70 commits

Author SHA1 Message Date
Mark Pizzolato
8bc31af29c PDP11, VAX: Allow Ethernet SET MAC arguments to have upper/lowe case values 2016-05-24 11:58:58 -07:00
Mark Pizzolato
ae6f3b97e4 PDP11, VAX: Use generated unique default MAC addresses for Ethernet devices 2016-05-24 08:47:01 -07:00
Mark Pizzolato
2d907980f1 ETHER: Add support for generated interface MAC addresses
sim> SET XQ MAC=aa:bb:cc:dd:ee:ff{/bits}{>filespec}

where:

- all of the aa:bb:cc:dd:ee:ff values must be hex digits
- bits is the number of bits which are to be taken from the supplied
   MAC aa:bb:cc:dd:ee:ff with legal values from 16 to 48 and a default
   of 48 bits.
- filespec specifies a file which contains the MAC address to be used
   and if it doesn't exist an appropriate generated address will be stored
   in this file and a subsequent SET MAC invocation specifying the same
   file will use the value stored in the file rather than generating a new
   MAC.

As discussed in #317
2016-05-23 16:56:06 -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
9bfdc1fb42 PDP11, VAX: Add XQ device delay to receive processing for loopback and setup packets 2016-04-05 05:21:04 -07:00
Mark Pizzolato
35180aabb0 PDP11, VAX: Fix DELQA device identity sensing (DEQNA & LockMode) 2016-04-05 05:17:51 -07:00
Mark Pizzolato
4d51d63ae4 PDP11, VAX: Fix XQ device identification probe logic.
Device probe logic when running VAXELN was unable to correctly initialize
the XQ device when it was set to be a DELQA or DELQA-T, but worked when
it was a DEQNA or a DELQA/DELQA-T in DEQNALock mode.  Problem
initially reported in #271
2016-02-06 06:58:57 -08:00
Mark Pizzolato
f03bae6cb6 PDP11, VAX: Add better debug output of loopback packets. 2016-02-04 10:38:31 -08:00
Mark Pizzolato
e7d379a862 PDP11, VAX: Remove UNIT_DISABLE from the XQ and XU UNIT definitions since the devices and not the units can be disabled. 2016-01-21 11:44:56 -08:00
Mark Pizzolato
2459a4c697 PDP11, VAX: Add logic to receive buffer descriptor processing to avoid list overrun.
If a driver sets up a receive buffer descriptor list as a circular ring, the
potential exists for a burst of arriving packets to wrap around the receive
buffer ring in a single round of input processing.  This is avoided by
stopping list processing when a full circle has been observed.

Additionally, debug output has been added to display issues while
processing both the receive buffer descriptor list and the transmit buffer
descriptor list.  The debug bit names are RBDL and XBDL respectively.
2016-01-20 11:13:28 -08:00
Mark Pizzolato
746c4fdc15 PDP11, VAX: Rework receive descriptor list processing and PDP11 Boot.
PDP11 network boot ROM of the DEQNA, DELQA, and DELQA-T along with
the MicroVAX I ROM boot each expect particular behavior from the XQ
device.  Prior efforts to get the PDP11 boot working added several device
specific complications to the receive buffer processing.  These are now
simplified.  Meanwhile, the generic device 'work alike' boot process has
been implemented to provide an XQ (device independent) primary
loader which extracts the first 512 bytes of the device internal boot
ROM and passes control to it for a complete boot.
2016-01-18 17:47:00 -08:00
Mark Pizzolato
ea4d9a16a4 PDP11, VAX: Add a small delay when the receiver is enabled.
Buggy device driver code exists which enables the receiver before
properly establishing receive buffers.  That code worked most of the
time on real hardware since it was hard for the device to receive a
packet and try to deliver it before the driver actually setup the receive
buffer descriptor list.  Discussion in #220.
2015-12-22 05:21:50 -08:00
Mark Pizzolato
ed57f061e2 All VAX: Always return the correct Qbus/Unibus interrupt vector bits for all devices. Fix #239
Vector values contained in device information blocks are the true bus relative vector values.  CPU specific biased vector values are produced by the respective vector fetching logic and vector values are limited to 9 bits with <1:0> = 0 as specified in both the Unibus and Qbus documents.
2015-10-08 04:43:21 -07:00
Mark Pizzolato
9f59823ae3 PDP11, all VAX: Add TU58 device simulator with support for 32 drives plus the VAX 730 and 750 console devices 2015-09-22 15:06:12 -07:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
2b81dd4710 PDP11, VAX: Fix DEQNA emulation to properly indicate receive buffer length for the last segment when dropping incoming packets into multiple buffer descriptors. 2014-11-11 17:32:51 -08:00
Mark Pizzolato
9c5df04de4 PDP11, VAX: Make sure to initialize amount of data processed for incoming packets which get read into multiple buffer descriptors 2014-10-09 11:15:11 -07:00
Mark Pizzolato
4d817f1deb VAX: Added support for the DEQNA device on Ultrix 1.x. Henry Bent observed that the deqna driver in this OS counted on older DEQNA firmware which automatically enabled interrupts after a software reset.
CPU Idle detection for this OS is now supported and the combination of SET CPU IDLE=ULTRIX-1.X and explicitly using a DEQNA device (SET XQ TYPE=DEQNA) will enable the automatic enabling of device interrupt generation.
2014-07-14 12:29:53 -07:00
Mark Pizzolato
e9b312f26a PDP11, VAX: Added Ethernet packet transmission throttling support to XQ and XU devices.
Migrated the XQ help to the hierarchical help model.  This is a work in progress which will eventually merge much from 0readme_ethernet.txt into the device help.
2014-06-06 15:03:31 -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
f3626690b7 PDP11: XQ Device is now bootable on a Qbus PDP11 simulator. The ROM based Citizenship tests now pass.
Separate boot ROMs are available for each of the DEQNA, DELQA and DELQA-T devices being simulated.
DEQNA-Lock mode has been added to the DELQA and DELQA-T simulations.
2013-11-16 18:13:09 -08:00
Mark Pizzolato
63e05c77be PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
Mark Pizzolato
b1fc298ff3 PDP11/VAX: Add register descriptions and bitfields to register declarations 2013-09-06 09:38:12 -07:00
Timothe Litt
91c7d26095 SHOW IOSPACE, again
Show IOSPACE doesn't always get the number of devices right due to device creativity.

o The distinction between UNIT and DEVICE has blurred
o MUX devices merge several physical devices into one device/unit
o Dynamic device sizing has made things more volatile.

This edit solves the problem for SHOW IOSPACE by adding an (optional) word to the DIBs.
The word contains the amount of IO space consumed by each instance of the physical device that's being emulated.
E.G., if it's a DZ11, the device is the DZ11 module, or 8 lines, even though the MUX device may support 32.

This enables SHOW IOSPACE to determine the number of physical devices being emulated, which is what folks need when configuring software.  The word may have other uses - in a generic dynamic device sizing routine - which is why the amount of IOSPACE per device was chosen rather than the 'number of physical devices.'

The edit should not make any existing device regress.  If the new word (ulnt) is zero (not initialized), SHOW IOSPACE will default to the number of units in the device, or if there's no device (CPUs), 1 as before.  If it is present, the number of devices is the calculated as total allocation/allocation-per-device.

The edit updates all the devices that seem to require this treatment, and all the processors that define the UNIBUS/QBUS DIBs.
2013-07-11 15:39:15 -04:00
Mark Pizzolato
651780c481 Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
Mark Pizzolato
be270bb9c1 Fix of Big Endian DELQA-T issue 2013-03-22 17:39:53 -07:00
Mark Pizzolato
28f645aeab Compiler suggested cleanups 2013-03-13 22:28:14 -07:00
Mark Pizzolato
7b01cd11f2 Fix identified by Mikulas Patocka.
The problem is that Map_ReadW reads 16-bit words from guest's memory and stores them in host-endian-byte-order in xq_turbo_init_block.  Most entries in xq_turbo_init_block are 16-bit words (thus it is ok that they are stored in host-endian-byte-order), but there are three fields in this data structure which are referenced as byte oriented fields. (phys, hash_filter and bootpassword).  These fields need to be handled in byte order to be properly interpreted.
2013-03-05 11:38:28 -08:00
Mark Pizzolato
7bd01a5873 Added device help and register descriptions 2013-02-04 13:52:59 -08:00
Mark Pizzolato
28b90552b7 Revised all VAX simulator devices to have proper help information defined to make "HELP dev SHOW" and "HELP dev SET" most useful. 2013-02-02 16:29:38 -08:00
Mark Pizzolato
8f170b0e40 Fixed modifier table to properly declare things which are showable vs settable, added modifier descriptions as appropriate 2013-01-31 16:18:38 -08:00
Mark Pizzolato
7a9db0fe64 Clean up output formatting for SHOW DEVICE, SHOW CONFIG and changed SHOW SYSTEM to SHOW FEATURES 2013-01-26 10:20:31 -08:00
Mark Pizzolato
cbe11147fc Created a way for devices to have a description presentation routine and if it is supplied for its output to be visible with a SHOW SYSTEM command. Provided device description routines for devices used in the VAX simulators 2013-01-25 12:04:25 -08:00
Mark Pizzolato
f91256203c Fixed register definition to properly reflect the size of the stats structure. 2013-01-22 16:13:55 -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
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
7b6f7a9871 Set device flags indicating DEV_DISK, DEV_TAPE, DEV_MUX and DEV_ETHER for all simulator devices which use the sim_disk, sim_tape, sim_tmxr, and sim_ether libraries 2013-01-07 12:47:24 -08:00
Mark Pizzolato
7bed091134 Reworked Auto Configure for all Qbus/Unibus devices to have their device address settings table driven from the auto configure code rather than statically defined in many per cpu model include files.
Fixed auto configure bugs which didn't allow Fixed CSR Addresses or Fixed Vectors to be set using the auto configure information.
Fixed display of address and vectors to indicate that the assigned address and/or vector is in the floating set.
Added extended definitions to the auto configure table to reflect all known potential static and floating and static addresses as of VMS V5.5-2
Changed the name of the VAX 11/780 console floppy device name to RXC from RX (which collides with a Unibus name for the RX11).
2012-12-20 13:58:11 -08:00
Mark Pizzolato
50cf91d441 Merge branch 'SerialMux' and compiler suggested cleanup 2012-12-18 09:52:14 -08:00
Mark Pizzolato
bcf0e8b19c Generalized sim_debug_u16 into sim_debug_bits and added support to display bit fields of variable size as well as bit states. 2012-12-04 09:32:40 -08:00
Mark Pizzolato
7c7df669ad Asynchronous Support
scp.c, scp.h
	- added sim_uname (Unit Name) API to simplify places which might want to display it (mostly debug messages).
	- added support for clock co-scheduling
	- added debugging to trace event queue activities

    sim_defs.h
	- added support for clock co-scheduling
	- added support for sim_uname (Thread local storage macro)
	- added support for debugging to trace event queue activities
	- simplified debug code by using sim_uname
	- fixed support macro for sim_is_active when asynch timers are in use

   sim_rev.h
	- fixed nested comments

    sim_tmxr.c, sim_tmxr.h
	- added support for clock co-scheduling
	- simplified debug code by using sim_uname
	- added support for devices which poll for output on different units

    sim_timer.c, sim_timer.h
	- added support for clock co-scheduling
	- fixed asynchronous clock calibration to smooth out calibration adjustments
	- simplified debug code by using sim_uname
	- added ability (when running with asynchronous support) to explicitly disable or enable asynchronous timer support.
	- changed sim_timer_inst_per_sec to return a double value since the result is always used in a double expression and integer overflow could occur under strange timing conditions

    vax/vax_stddev.c
	- converted from simulator specific clock co-scheduling to generic clock co-scheduling.

    vax/vax_cpu.c
	- added EVENT and ACTIVATE debug flag (SET CPU DEBUG=EVENT;ACTIVATE) support

    pdp11/pdp11_dz.c
	- converted from simulator specific clock co-scheduling to generic clock co-scheduling.

    pdp11/pdp11_vh.c
	- converted from simulator specific clock co-scheduling to generic clock co-scheduling.

    pdp11/pdp11_xq.c
	- converted from simulator specific clock co-scheduling to generic clock co-scheduling.
2012-11-12 15:33:35 -08:00
Mark Pizzolato
f1e3216d99 Added MicroVAX I network boot support
pdp11_xq.c, pdp11_xq.h
	- Added emulation and visibility to the LEDs which were on the physical DEQNA/DELQA network boards.  "show xq: will now display the LED state in addition to the other useful things.
	- Added debugging of loopback packet data
	- Avoided padding on short loopback packets
	- Added support for extended length loopback packets (up to 1600 bytes) which is described in the DEQNA manual and used by the MicroVAX I boot ROM.  Recieve such packets with the LONG error indicator.
	- Returned 'reserved' status bits as 1's in received packet status word 1.
	- Added debug display of transmit and receive Buffer Descriptor List contents.

sim_ether.c, sim_ether.h
	- Added support for extended/oversized packets.
2012-11-05 15:12:36 -08:00
Mark Pizzolato
0f8e6cfe95 Cleanup for warning messages produced by the clang C compiler. Mostly adding parentheses in conditional assignments and clarification parentheses in complex boolean expressions. 2012-04-29 11:59:44 -07:00
Mark Pizzolato
78009646f0 Cleaned up compiler noticed issues 2012-04-27 15:06:39 -07:00
Mark Pizzolato
5f505ccadf Fixing many compiler identified nits. 2012-04-18 09:48:04 -07:00
Mark Pizzolato
127c8042c1 pdp11_xq: Forced the use of clk_cosched when idling is enabled
pdp11_xu: Separated clock based activities from packet reception by creating a separate XU unit for this purpose
2012-04-17 13:40:09 -07:00
Mark Pizzolato
e0fbfa6abf Fix memory leaks in attach error paths. 2012-03-22 16:14:30 -07:00
Mark Pizzolato
0270d0ea0d Cleanup based on reports from Michael Bloom 2012-03-22 12:20:00 -07:00