1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-25 20:01:57 +00:00
Files
wfjm.w11/doc/ECO-034-MMU_d-space-pc.md
wfjm 44c96ec4ab tbit trap overhaul; fix RESET wait
- rtl/w11a:
  - pdp11.vhd: add cpustat_type treq_tbit and resetcnt; use op_rti rather op_rtt
  - pdp11_decode.vhd: use op_rti rather op_rtt
  - pdp11_sequencer.vhd: tbit logic overhaul; use treq_tbit; cleanups;
                         use resetcnt for 8 cycle RESET wait
- rtl/sys_gen/w11a/s3board/sys_conf.vhd: disable monitors for timing closure
- rtl/sys_gen/w11a/*/*.vmfset: drop removed signals
- tools
  - asm-11/lib/push_pop.mac: add push2
  - tbench/w11a/test_w11a_inst_quick.tcl: use creset option to clr pending traps
  - tcl/rw11/asm.tcl: asmrun: add creset option (active with ps option)
  - tcode/cpu_basics.mac: add F2.3 (reset settling time)
  - tcode/cpu_details.mac: add A4.* (PSW + tbit traps)
2022-12-07 15:48:48 +01:00

1.7 KiB

ECO-034: D space used instead of I space for some PC specifiers (2022-09-08)

Scope

  • was in w11a since 2009
  • affects: all w11a systems

Symptom summary

Test 072 of ekbee1 fails with

    D-SPACE ENABLE CIRCUITRY HAS FAILED
    ERROR   AUTOI/D VIRTUAL
    REGISTR REGISTR ADDRESS TESTNO  PC AT ABORT
    100027  000000  060410  000072  060412  
    100027  000027  060416  000072  060422  

The test does

    060410: tst  (pc)
    060416: cmp  #240,(pc)

and expects that these accesses are done to I space.
They are done to D space instead.

Analysis

The w11 used D space only for (pc)+ and @(pc)+ specifiers.
The w11a has 4 specifier flows

  • srcr: for source read
  • dstr: for destination read (in CMP, BIT, TST, ...)
  • dstw: for destination write (also read-modify-write)
  • dsta: for destination address (in JSR, JMP) A code review showed what was OK and what needed a fix
s_srcr_def      OK                 mov (pc),r0
s_srcr_inc      OK                 mov #123,r0
s_dstr_def      FIXED              cmp,#123,(pc)
s_dstr_inc      OK                 cmp r0,#123
s_dstw_def      FIXED              mov r0,(pc)    modifies I space code !
s_dstw_inc      FIXED for mode=2   mov r0,#133    modifies I space code !
s_dstw_inc      OK    for mode=3   mov r0,@#lbl
s_dsta_inc      OK                 

Note: the 11/70 uses D space for modes 1-5 in the source specifier flow, and for mode 1-3 in the destination specifier flow.

Fixes

Add pispace modifiers for the do_memread* and do_memwrite* calls in pdp11_sequencer.vhd.

Hindsight

Took 13 years to fix. The fixed address modes are of very little practical value and are not used in normal code. And certainly used not when running with kernel D mode enabled.