SparcSoftcardOps.Mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 19, 1988 1:56:49 am PDT
Christophe Cuenod October 18, 1988 11:22:36 am PDT
Christian Le Cocq October 31, 1988 9:34:28 am PST
DIRECTORY
SparcSoftcard;
SparcSoftcardOps: DEFINITIONS ~ {
OPEN SparcSoftcard;
Sparc Operations
SparcReset: PROC;
SparcResetAndStart: PROC;
TestSparcError: PROC RETURNS [ error: BOOLEAN ];
error is TRUE when the sparc is in error mode.
Cache Operations
SparcCacheDisable: PROC;
SparcCacheEnable: PROC;
Should not be implemented in the 6085 world. Only the Sparc is allowed to enable his cache after making sure he flushed everything.
CPU to CPU Interrupt Operations
SetSparcToIOPInt: PROC;
ResetSparcToIOPInt: PROC;
SetSparcToMesaInt: PROC;
ResetSparcToMesaInt: PROC;
SetSparcToSparcInt: PROC;
ResetSparcToSparcInt: PROC;
SetIOPToSparcInt: PROC;
ResetIOPToSparcInt: PROC;
SetMesaToSparcInt: PROC;
ResetMesaToSparcInt: PROC;
SetSparcAbortInt: PROC;
ResetSparcAbortInt: PROC;
EnableInt: PROC;
DisableInt: PROC;
Peripheral Interrupt Operations
There is 11 possible internal interrupt sources inside the board:
InterruptSource: TYPE = MACHINE DEPENDENT {
mapInt(0),
nVersOnLine(1),
nSCCInt(2),
PrintVersEnd(3),
DispVertSync(4),
DispHorizSync(5),
PrintPageSync(6),
PrintLineSync(7),
nVersReady(8),
mapFault(9),
realTimeClock(10)
};
Each interrupt can be active in any mode:
InterruptMode: TYPE = {activeLow, activeHigh, risingEdge, fallingEdge};
Out of the 11 interrupts 3 of them are send to a processor:
InterruptNumber: TYPE = {interruptA, interruptB, interruptC};
Each interrupt can be send to any processor:
InterruptProcessor: TYPE = {cp, iOP, sparc, none};
SetPeriphIntMode: PROC [interruptSource: InterruptSource, interruptMode: InterruptMode, interruptNumber: InterruptNumber, interruptProcessor: InterruptProcessor];
ReadPeriphIntState: PROC [interruptNumber: InterruptNumber] RETURNS [intActive: BOOLEAN];
if the addressed interrupt controller is set up with edge interrupt intActive is true if an active edge occurred (reset by ResetPeriphInt or SetPeriphIntMode).
if the addressed interrupt controller is set up with activeHigh level interrupt intActive as the value of the interrupt input.
if the addressed interrupt controller is set up with activeLow level interrupt intActive is the opposite of the interrupt input.
ResetPeriphInt: PROC [interruptNumber: InterruptNumber];
if the addressed interrupt controller is set up with edge interrupt ResetPeriphInt resets the edge detection register.
if the addressed interrupt controller is set up with level interrupt ResetPeriphInt has no effect.
DMA Operations
DMAState: TYPE = {active, inactive};
SetDMAState: PROC [dMAState: DMAState];
DMAMode: TYPE = {printer, display, versatecOneShot, versatecStream};
SetDMAMode: PUBLIC PROC [dMAMode: DMAMode];
DMAAddressRegisterLoad: PROC [ byteAddress: CARD32 ];
The starting address will be byteAddress troncated to closest 64 bits word bondary. => It is strongely recommanded to start any DMA buffer on a 64 bits word bondary
Versatec Operations
VersatecMode: TYPE = {print, plot, SPPPrint, SPPPlot};
SetVersatecMode: PUBLIC PROC [versatecMode: VersatecMode];
A call to this procedure put the versatec in a given mode
VersatecRCommand: TYPE = {CLEAR, RESET, RLTER, RFFED, REOTR};
SendVersatecRCommand: PUBLIC PROC [versatecRCommand: VersatecRCommand] RETURNS [ ok: BOOLEAN ];
A call to this procedure send a pulse on one of the remote command lines (the pulse length complies with the specs)
This procedure is waiting for the command to terminate or the printer go OFF Line before returning (OK is FALSE if the printer went OFF Line)
VersatecOnLine: PUBLIC PROC [] RETURNS [onLine: BOOLEAN];
VersatecReady: PUBLIC PROC [] RETURNS [ready: BOOLEAN];
VersatecSendOneByte: PUBLIC PROC [ data: BYTE ] RETURNS [ ok: BOOLEAN ];
This procedure send the byte data to the Versatec
It is waiting for the command to terminate or the printer go OFF Line before returning (OK is FALSE if the printer went OFF Line)
VersatecSendBuffer: PUBLIC PROC [ byteAddress: CARD32, byteSize: CARD32 ] RETURNS [ ok: BOOLEAN ];
This procedure send a buffer of data to the versatec.
This procedure is waiting for the command to terminate or the printer go OFF Line before returning (OK is FALSE if the printer went OFF Line)
byteSize is the size in bytes of the buffer.
byteAddress is the physical address of the buffer in the DMA VM. Some important restrictions apply:
This address has to be inside the local Softcard memory.
No attempt is done to verify the correctness of the mapping
This address has to be aligned on a 64 bit word bondary.
Memory configuration
MemoryConfig: TYPE = ARRAY [0..7] OF BOOLEAN;
MemoryConfigPointer: TYPE = LONG POINTER TO MemoryConfig;
FindMemoryConfig: PROC [memoryConfigPointer: MemoryConfigPointer];
The SparcSoftcard holds from 1 to 8 banks of 8 MegaBytes of DRAM. This procedure tests witch bank is present. A boolean is TRUE it the bank is present.
}.