Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/npb2.mic
There are no other files named npb2.mic in the archive.
;SPECIAL MICRO-CODE FOR IMPLIMENTING DIAGNOSTIC INSTRUCTIONS FOR
;USE BY THE PAGING DIAGNOSTIC.. INSTRUCTIONS IMPLIMENTED:
;PTWRDT AC,E(OPCODE 00)	;WRITE DATA TO PAGE TABLE
;			;AC CONTAINS DATA TO WRITE(BITS0-35)
;			;E IS PAGE TABLE ADDRESS(BITS 18-26)
;PTREAD AC,E(OPCODE 01)	;READ THE PAGE TABLE DATA VIA EBUS REGISTER
;			;AC RECEIVES RESULTS
;			;E CONTAINS PAGE TABLE ADDRESS TO READ(BITS18-26)
;PTDWRT AC,E(OPCODE 10)	;WRITE DATA TO PAGE TABLE DIRECTORY
;			;AC CONTAINS DATA TO WRITE
;			;E CONTAINS DIRECTORY ADDRESS TO WRITE
;PTDVER AC,E(OPCODE 100);PAGE TABLE DIRECTORY VERIFY
;			;AC CONTAINS DATA TO BE VERIFIED
;			;E CONTAINS DIRECTORY ADDRESS TO BE VERIFIED
;			;IF MATCH VERIFIES,RH OF AC SET TO ZEROES
;			;IF NO MATCH, RH OF AC SET TO ONES



;DISPATCHER TO DESIRED DIAGNOSE INSTRUCTION
	SCAD/A,SCADA/#,#/32.,SC/SCAD,J/EXECTR, ;SHIFT GETS BITS 32-35 TO 0-3
	    SPEC/SP MEM CYCLE		;AND SET "EBOX MAY BE PAGED"

EXECTR:	J/XCTGO,DISP/SH0-3,SH/SHIFT AR!ARX, ;DISPATCH TO EXECUTE CODE
	    SC/SCAD,SCADA EN/0S,SCAD/A ;CLEAR SC BEFORE EXECUTE

;PTWRDT INSTRUCTION CONTINUED

CLRUSE:	SPEC/SP MEM CYCLE,MEM/REG FUNC,	;CAUSE"MCL LOAD VMA CONTEXT"
	    MREG FNC/NO MEM ACCESS,J/0000 ;AND CAUSE "MCL VMA USER" TO CLR
OP00B:	COND/MBOX CTL,MBOX CTL/PT DIR WR, ;ALSO WRITE DIRECTORY
	    ADA/PC,AD/A+1,AR/AD,VMA/AD, ;AND UPDATED PC TO AR
	    J/CLRUSE

;PTREAD INSTRUCTION CONTINUED

OP01:	MEM/REG FUNC,MREG FNC/READ PT ;START MEM CYCLE TO FORCE PT INTO EBUS REG

	MEM/MB WAIT,COND/DIAG FUNC, ;WAIT FOR CYCLE TO COMPLETE
	    DIAG FUNC/RD EBUS REG,AR/EBUS,J/NORMEND ;& EBUS REG INTO "AR"

;THIS IS ONE OF A PAIR OF MICRO-INSTR WHICH MAY BE DISPATCHED
;TO ON A PAGE FAIL, DEPENDING ON THE STATE OF "PF EBOX HANDLE"
=100111
ABORT:	MEM/REG FUNC,MREG FNC/NO MEM ACCESS, ;ABORT MEM CYCLES
	    VMA/AD,AD/A+1,ADA/PC,J/0	;SET VMA FOR RETURN, AND GO


NORMEND: FMADR/AC0, COND/FM WRITE,AR/AD,AD/A+1,
	    ADA/PC,VMA/AD,J/0000 ;AND ON TO NEXT INSTR

SETSIG:	COND/MBOX CTL,MBOX CTL/SET PAGE FAIL, ;SET PAGE FAIL
	    J/0000	; IN ORDER TO SET UP "PF HANDLE"

;THIS IS THE SECOND OF A PAIR OF MICRO-INSTR WHICH MAY BE DISPATCHED
;TO ON A PAGE FAIL, DEPENDING ON THE STATE OF "PF EBOX HANDLE"
=101111
	MEM/REG FUNC,MREG FNC/NO MEM ACCESS, 	;ABORT MEM CYCLES
	    VMA/AD,AD/A+1,ADA/PC,J/0000		;SET VMA FOR RETURN & GO
=0000
XCTGO:
MPTWRDT: ADB/FM,AD/B,AR/AD,FMADR/AC0,J/OP00, ;OPCODE "00"IS PTWRDT
	    SPEC/FLAG CTL		;GUARANTEE SCAD FLAGS CLR
MPTREAD: SPEC/SP MEM CYCLE,
	    SP MEM/PT RD NO PG FAIL,J/OP01 ;OPCODE "01" IS PTREAD

PAGFLG:	AR/AR,ADB/FM,J/OP10	;OPCODE FOR SPECIAL SCD FLAGS
;PAGCTL INSTRUCTION
;SPECIAL MICRO-CODED INSTRUCTION FOR SETTING UP THE PAG BOARD
;FOR A CONTROL LOGIC TEST. CODE DOES A  "MEM AD FUNC" TO SET
;STATUS ON THE MCL BOARD, SETS APPROPRIATE PAGE TABLE BITS,
;SUCH AS "ACCESS","WRITABLE","SOFTWARE",& "PUBLIC", AND
;FINISHES UP BY FORCING A PAGE FAIL IN A MANNER SUCH THAT
;"PAGE REFILL","PF HANDLE","PAGE FAIL", AND THE "PF HOLD" SIGNALS
;CAN ALL BE READ...INSTRUCTION IS RUN THRU AT SINGLE STEP SPEED
;UNLESS YOU ARE IN A SCOPE LOOP, WHEN THE INSTRUCTION EXECUTES
;AT FULL SPEED, ABORTS CLEANLY AFTER THE CONTROL LOGIC
;HAS BEEN EXERCISED, AND THEN RETURNS TO THE NORMAL INSTRUCTION STREAM
;WHEN YOU ENTER HERE, "AC0" HAS VMA DATA(IE. SELECTED ADDRESS)
;AND THE INDEX REGISTER(XR=ARX14-17) HAS AD FUNC DATA
PAGCTL:
	AD/B,ARX/ADX,ADB/BR,J/OP11P1	;COPY INSTR TO ARX

;DISPATCH CODE FOR OPCODE 4... "CONO PAG" OPCODE
CONPAG:
	AR/AD,AD/B,ADB/FM,FMADR/AC0,J/OP4 ;GET BITS TO SET FROM INDEX REG


;BEGIN EXECUTE PORTION OF OPCODE "3"
OP11P1:	ADB/FM,FMADR/AC0,AR/AD,	;WHLE AR GETS "VMA'S" DATA
	    AD/B

	SH/AR,ARX/SH,ADB/FM,AD/B,FMADR/XR, ;VMA DATA TO ARX
	    AR/AD,MQ/MQM SEL,COND/REG CTL, ;MEM FUNC DATA TO AR & MQ
	    MQ CTL/AD,J/OP11		;AND CONTINUE INSTR FLOW
OP11:	SKIP/AD0,MEM/REG FUNC,VMA/AD,	;LOAD VMA 13-35
	    AD/A,ADA/ARX,MREG FNC/NO MEM ACCESS BTYPE ;SKP ON "UEBR REF" IF NECC.

=110
;IF HERE NO "MCL UEBR REF# IS REQUIRED
	MEM/AD FUNC,AD/A,ADA/AR,J/MBOXTM, ;LOAD SPECIAL MCL BOARD FUNCS
	    SPEC/SP MEM CYCLE		;AND CAUSE "MCL LOAD VMA CONTEXT

=111
;IF HERE, YES NEED "MCL UEBR REF"
	MEM/AD FUNC,AD/A,ADA/AR,	;LOAD SPECIAL MCL BOARD FUNCS
	    SPEC/SP MEM CYCLE,		;AND A SPECIAL FUNC TO SET
	    SP MEM/PT RD NO PG FAIL,	; "MCL UEBR REF"
	    J/MBOXTM
2346:
MBOXTM:	J/MBOXT1		;NOOP TO LET MBOX START AN EBOX "TX" CYC.

2370:
MBOXT1:	J/SETSIG,TIME/3T	;WAIT HERE WHILE MBOX ENTERS "EBOX T3"


;EXECUTE CODE FOR THE CONO PAG SPECIAL INSTR....
2371:
OP4:	COND/DIAG FUNC,DIAG FUNC/CONO PAG,ADA/AR,AD/A ;SET "KL PAGING MODE"
2372:	AD/A+1,ADA/PC,VMA/AD,J/0000,	;AND FIX VMA BEFORE RETURN
	    MEM/REG FUNC,MREG FNC/NO MEM ACCESS, ;STOP MEM FROM CYCLING
	    AR/AD		;AND CLEAR AR FOR INSTR STREAM
2373:
OP00:	AD/B,ADB/FM,SPEC/SP MEM CYCLE, ;SET "MCL VMA USER"
	    J/OP00A,FMADR/XR,SKIP/AD0 ;AND CLR USER IF NECC

2374:
OP00A:	COND/MBOX CTL,MBOX CTL/PT WR,J/OP00B ;WRITE DATA TO PAGE TABLE
2375:
	SPEC/SP MEM CYCLE,SP MEM/USER,J/OP00A ;JUST SET USER, HERE IF IT MUST BE CLR

.TOC	"PAGE TABLE PUBLIC BITS TO SCD FLAGS"

;THIS MICRO-CODE CHECKS THREE GATES ON THE SCD BOARD AS THEY
;AFFECT THE TWO SCAD FLAGS "SCD PUBLIC" AND "SCD PRIVATE INSTR".
;THE GATES THAT ARE CHECKED ARE GATES WHICH INCLUDE
;"SCD PRIVATE INSTR" OR "SCD PUBLIC PAGE" AS INPUTS.
;FIRST AN "AD FUNC" IS EXECUTED TO INITIALIZE "PUBLIC"
;AND/OR "PRIVATE INSTR" FLAGS AS DESIRED. THIRD, THE VMA IS LOADED
;WITH AN ADDRESS WHICH WILL SELECT A PAGE TABLE LOCATION
;CONTAINING "PT PUBLIC" TRUE(ODD PAGE TABLE LOCATION) OR
;"PT PUBLIC" FALSE(EVEN PAGE TABLE LOCATION). FINALLY, A MICRO-
;CODE SKIP IS EXECUTED IN ORDER TO CAUSE EITHER A "SPEC/PORTAL"
;(IF AR BIT3=0) OR "CLK MB XFER"(IF AR BIT3=1). THE MICRO-CODE
;THEN LOOPS BACK TO THE BIGINNING.  THE PDP11 THEN TAKES OVER
;TO CHECK THAT THE CORRECT FLAGS HAVE SET OR CLEARED.
2352:
OP10:	SPEC/FLAG CTL,FLAG CTL/LD PUB W PRVT, ;SET PRIV INSTR OR PUB
	    AD/A,ADA/AR		; DEPENDING ON AR BITS 8 & 7
2353:
	VMA/AD,AD/A,ADA/AR	;LOAD VMA TO SELECT PT ADDRESS
2356:
	MEM/AD FUNC,AD/A,ADA/AR, ;SET INSTR FETCH IF AR BIT9=1(& MEM CYCLE)
	    SH/AR,DISP/SH0-3	;DO EITHER "PORTAL" OR "MB XFER"
2354:
	SPEC/FLAG CTL,FLAG CTL/PORTAL, ;"SPEC/PORTAL"
	    J/PAGFLG

2355:
	MEM/MB WAIT,J/PAGFLG	;WITH "RESP SIM" CAUSES "CLK MB XFER"


;SPECIAL MICRO WORD TO CAPTURE PAGE FAILS
1777:	J/ABORT,DISP/PG FAIL,TIME/5T