mirror of
https://github.com/wfjm/w11.git
synced 2026-01-13 15:37:43 +00:00
tcode: add Makefile [skip ci]
This commit is contained in:
parent
063ad4c4c0
commit
e8fc9fa366
@ -10,7 +10,7 @@ This directory tree contains **many tools** and is organized in
|
||||
| [fx2](fx2) | firmware for Cypress FX2 USB interface |
|
||||
| [make](make) | make includes |
|
||||
| [man](man) | man pages |
|
||||
| [mcode](mcode) | miscellaneous codes |
|
||||
| [mcode](mcode) | miscellaneous stand-alone codes for system tests |
|
||||
| [oskit](oskit) | support files for OS disk/tape image kits |
|
||||
| [simh](simh) | configuration files for `SimH pdp11` |
|
||||
| [src](src) | C++ sources for rlink backend |
|
||||
|
||||
9
tools/tcode/.gitignore
vendored
9
tools/tcode/.gitignore
vendored
@ -1,7 +1,12 @@
|
||||
*.cof
|
||||
*.lst
|
||||
*.exp.mac
|
||||
*.lda
|
||||
*.lsm
|
||||
*.lsm_scmd
|
||||
*.lst
|
||||
|
||||
# e11 tmp stuff
|
||||
tmp_e11.ini
|
||||
tmp_e11_tt0.log
|
||||
|
||||
# simulation stuff
|
||||
rlink_cext_conf
|
||||
|
||||
78
tools/tcode/Makefile
Normal file
78
tools/tcode/Makefile
Normal file
@ -0,0 +1,78 @@
|
||||
# $Id: Makefile 1264 2022-07-30 07:42:17Z mueller $
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2022-07-29 1264 1.0 Initial version
|
||||
#---
|
||||
#
|
||||
include ${RETROBASE}/tools/make/generic_asm11.mk
|
||||
#
|
||||
MAC_all += cpu_badinst_nofpp.mac
|
||||
MAC_all += cpu_basics.mac
|
||||
MAC_all += cpu_details.mac
|
||||
MAC_all += cpu_eis.mac
|
||||
MAC_all += cpu_mmu.mac
|
||||
MAC_all += cpu_selftest.mac
|
||||
#
|
||||
LDA_all = $(MAC_all:.mac=.lda)
|
||||
LST_all = $(MAC_all:.mac=.lst)
|
||||
EXP_all = $(MAC_all:.mac=.exp.mac)
|
||||
TSIM_all = $(MAC_all:.mac=.tsim)
|
||||
TE11_all = $(MAC_all:.mac=.te11)
|
||||
TW11_all = $(MAC_all:.mac=.tw11)
|
||||
#
|
||||
# create export mac (with asm-11 -E)
|
||||
%.exp.mac : %.mac
|
||||
asm-11 -E $< > $@
|
||||
# execute SimH simulation
|
||||
%.tsim : %.lda
|
||||
pdp11 tcode_exec.scmd $* | grep -q "HALT instruction, PC: 002002"
|
||||
# execute e11 simulation; output goes to tmp_e11_tt0.log
|
||||
%.te11 : %.lda
|
||||
@rm -f tmp_e11.ini
|
||||
@echo "@tcode.ecmd" >> tmp_e11.ini
|
||||
@echo "mount pr: $*.lda" >> tmp_e11.ini
|
||||
@echo "boot pr:" >> tmp_e11.ini
|
||||
@echo "quit" >> tmp_e11.ini
|
||||
e11 /initfile:tmp_e11.ini
|
||||
grep "PC/002002" tmp_e11_tt0.log
|
||||
rm -f tmp_e11_tt0.log tmp_e11.ini
|
||||
# execute w11 simulation (on C7 system)
|
||||
%.tw11 : %.mac
|
||||
ti_w11 -c7 -tmu -w -e $< | tbfilt
|
||||
#
|
||||
.PHONY : default alllda alllst allexp alltsim alltw11 clean
|
||||
#
|
||||
default :
|
||||
@echo "No default action defined, use"
|
||||
@echo " make alllda all .lda + .lst files"
|
||||
@echo " make alllst all .lst files"
|
||||
@echo " make allexp all exp.mac export files"
|
||||
@echo " make alltsim all SimH tests"
|
||||
@echo " make allte11 all e11 tests"
|
||||
@echo " make alltw11 all w11 GHDL simulation tests"
|
||||
@echo " make <tcode>.lda compile, create .lda + .lst"
|
||||
@echo " make <tcode>.lst compile, create .lst"
|
||||
@echo " make <tcode>.exp.mac compile with -E"
|
||||
@echo " make <tcode>.tsim run SimH simulator"
|
||||
@echo " make <tcode>.te11 run e11 simulator"
|
||||
@echo " make <tcode>.tw11 run w11 GHDL simulation (for C7)"
|
||||
#
|
||||
alllda : $(LDA_all)
|
||||
#
|
||||
alllst : $(LST_all)
|
||||
#
|
||||
allexp : $(EXP_all)
|
||||
#
|
||||
alltsim : $(TSIM_all)
|
||||
#
|
||||
allte11 : $(TE11_all)
|
||||
#
|
||||
alltw11 : $(TW11_all)
|
||||
#
|
||||
clean :
|
||||
rm -rf *.lst
|
||||
rm -rf *.lda
|
||||
rm -rf *.exp.mac
|
||||
@ -1 +1,27 @@
|
||||
This directory contains the **w11 test codes**
|
||||
This directory contains the **w11 test codes**.
|
||||
|
||||
The _tcodes_ are MACRO-11 stand-alone codes. They are meant for
|
||||
verification and not as diagnostic tool:
|
||||
- in case of success, they stop on a `halt` at 2000, thus with PC=002002
|
||||
- in case of error, they `halt` at the point of the failed check
|
||||
|
||||
The codes can be executed
|
||||
- in a w11 GHDL simulation, usually via a `ti_w11 -c7 -w -e <mac-file>`
|
||||
- with SimH, usually via a `load <lda-file>`, `dep pc 200`, `cont`
|
||||
- with `e11`, usually via a `mount pr: <lda-file>`, `boot pr:`
|
||||
|
||||
A [Makefile](Makefile) is provided with the targets
|
||||
```
|
||||
make alllda all .lda + .lst files
|
||||
make alllst all .lst files
|
||||
make allexp all exp.mac export files
|
||||
make alltsim all SimH tests
|
||||
make allte11 all e11 tests
|
||||
make alltw11 all w11 GHDL simulation tests
|
||||
make <tcode>.lda compile, create .lda + .lst
|
||||
make <tcode>.lst compile, create .lst
|
||||
make <tcode>.exp.mac compile with -E
|
||||
make <tcode>.tsim run on SimH simulator
|
||||
make <tcode>.te11 run on e11 simulator
|
||||
make <tcode>.tw11 run on w11 GHDL simulation (for C7)
|
||||
```
|
||||
|
||||
14
tools/tcode/tcode.ecmd
Normal file
14
tools/tcode/tcode.ecmd
Normal file
@ -0,0 +1,14 @@
|
||||
! $Id: tcode.ecmd 1264 2022-07-30 07:42:17Z mueller $
|
||||
! SPDX-License-Identifier: GPL-3.0-or-later
|
||||
! Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
!
|
||||
! setup w11 like processor configuration
|
||||
!
|
||||
set cpu 70
|
||||
set cpu nofpp
|
||||
set idle delay=1
|
||||
!
|
||||
! create log file, the only way to capture e11 output
|
||||
! no rediction to stdout possible
|
||||
!
|
||||
log tt0: tmp_e11_tt0
|
||||
22
tools/tcode/tcode_exec.scmd
Normal file
22
tools/tcode/tcode_exec.scmd
Normal file
@ -0,0 +1,22 @@
|
||||
; $Id: tcode_exec.scmd 1264 2022-07-30 07:42:17Z mueller $
|
||||
; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
; Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
;
|
||||
; setup w11 like processor configuration
|
||||
; like ../simh/setup_w11a_max.scmd
|
||||
; but only cpu, devices are all default
|
||||
;
|
||||
set cpu 11/70
|
||||
set cpu nofpp
|
||||
set cpu 4m
|
||||
set cpu oct
|
||||
set cpu idle
|
||||
;
|
||||
; disable simulator stop conditions, especially "read stack trap"
|
||||
;
|
||||
dep STOP_TRAPS 0
|
||||
;
|
||||
load %1.lda
|
||||
dep pc 200
|
||||
cont
|
||||
quit
|
||||
Loading…
x
Reference in New Issue
Block a user