Rlv12 Logging

Logging

Sometimes things don’t work as expected. Therefore I have built a logging function into the controller software. There are several logging options that can be switched on or off

What is logged

The emulator implements a cyclical logging buffer. The logging buffer is implemented as a 4096bytes large memory buffer and each logging entry is exactly 8 bytes long. The following activities can create a logging entry

  • Write access to any of the device registers
  • Read access to any of the device register except CSR
  • Any disk function

The software can log all DATI and DATO cycles to any of the device registers, except read requests to the base CSR registers as this is handled directly in the hardware of the CPLD.

The software can also log all functions requested by the CPU, like Seek, Read, Write, etc.

Show current settings

Per default only logging of disk functions to all volumes is activated. However you can dynamically enable or disable logging for access to the device register or any of the volumes. Entering only the logging keyword shows the current logging switches

>logging
Logging device register access .: off
Logging unit 0 .................: on
Logging unit 1 .................: on
Logging unit 2 .................: on
Logging unit 3 .................: on
>

You can activate logging to the device register

>logging register

>logging
Logging device register access .: on
Logging unit 0 .................: on
Logging unit 1 .................: on
Logging unit 2 .................: on
Logging unit 3 .................: on

>

and you can switch off logging to the units

>no logging units

>      
>logging
Logging device register access .: on
Logging unit 0 .................: off
Logging unit 1 .................: off
Logging unit 2 .................: off
Logging unit 3 .................: off

>

or you can activate logging to a individual unit

>logging rl0

>logging
Logging device register access .: on
Logging unit 0 .................: on
Logging unit 1 .................: off
Logging unit 2 .................: off
Logging unit 3 .................: off

>

or you can deactivate all logging with

>no logging

>logging
Logging device register access .: off
Logging unit 0 .................: off
Logging unit 1 .................: off
Logging unit 2 .................: off
Logging unit 3 .................: off

>

With show logging you can display the content of the logging buffer

>show logg
          P:0x0000EFB2
GETS: V:2 S:000335
GETS: V:2 S:000335
GETS: V:2 S:000335
RDHD: V:2 D:177342
SEEK: V:2 C:177343 O:-467->061443 H:0
READ: V:2 A:01027470(0x042F38) D:061424(L:0x1EFA) C:177400(E:0x043138)
          P:0x0000BEFE
GETS: V:2 S:000235
GETS: V:2 S:000235
GETS: V:2 S:000235
RDHD: V:2 D:061443
WRIT: V:2 A:01027470(0x042F38) D:061424(L:0x1EFA) C:177400(E:0x043138)
          P:0x0000BEFE
GETS: V:2 S:000235
GETS: V:2 S:000235
GETS: V:2 S:000235
RDHD: V:2 D:061444
SEEK: V:2 C:061445 O:+072->100045 H:0
WRIT: V:2 A:01026462(0x042D32) D:100000(L:0x2800) C:177400(E:0x042F32)
          P:0x0000C804
GETS: V:2 S:000235

Description of logging entries

Logging of Device Register access

For each DATI or DATOB cycle a log entry is created with

Write (C2) DAR:000003
Write (C0) CSR:000004
Read  (C3) MPR:000335
Write (C2) DAR:000013
Write (C0) CSR:000004
Read  (C3) MPR:000335
Write (C2) DAR:000003
Write (C0) CSR:000004
Read  (C3) MPR:000335
Write (C2) DAR:004421
Write (C0) CSR:000006
Read  (C3) MPR:000000
Write (C3) MPR:176400
Write (C2) DAR:002542
Write (C1) BAR:103502
Write (C0) CSR:000114
Write (C2) DAR:000205
Write (C0) CSR:000006
Read  (C3) MPR:000000
Write (C3) MPR:166000
Write (C2) DAR:002600
Write (C1) BAR:106502
Write (C0) CSR:000114
Write (C2) DAR:000021
Write (C0) CSR:000006
Read  (C3) MPR:000000
Write (C3) MPR:177400
Write (C2) DAR:002700
Write (C1) BAR:132502
Write (C0) CSR:000114

Write stands for DATO/DATOB cycles and Read stands for DATI cycles. The code in brackets shows the lower 6 address bits of the address bus when BSYNC is asserted and the top two bits indicated if the lower byte (bit 6) and/or upper byte (bit 7) are being accessed. In case of the RLV12 emulator these should always be set as the RLV12 controller only supports word access. Then you will se the name of the register being accessed and the value being written or read.

Logging of disk functions

Disk functions, when logged, create the following logging output. The output shows the function requested (GETS, RDHD, WRIT, READ, SEEK, WCHK). Read with no check is not implemented for the moment. Then it shows which volume (0..3) was used and some status information depending on the function

GETS: V:2 S:000335
WRIT: V:2 A:01026462(0x042D32) D:100000(L:0x2800) C:177400(E:0x042F32)
          P:0x0000C804
READ: V:2 A:01027470(0x042F38) D:061424(L:0x1EFA) C:177400(E:0x043138)
          P:0x0000BEFE
RDHD: V:2 D:061443
SEEK: V:2 C:061445 O:+072->100045 H:0
Code Description
V: Volume/Unit number
S: Status of the selected unit sent to the PDP-11
A: Memory DMA address in octal and (hex)
D: Disk address in octal
L: Corresponding logical block number of the disk image file or partition
C: Word count register in octal
E: Memory DMA address after transfer
P: Physical block number on the SD-Card of the last sector of the IO request
O: Track Offset, number of tracks the header should move