AssDisPortsRec:
TYPE =
RECORD[
ToReg, FromReg, ReadEnable, WriteEnable, IOCK, Address, TxData, RxData, Lock, CK: Port ← NIL];
AssDisTestProc: RosemaryUser.TestProc = {
ports: AssDisPorts ← AssDisInitialize[p, cellType.public, Eval ! Rosemary.Stop => IF reason = $BoolWireHasX THEN RESUME ELSE REJECT];
{OPEN ports;
PDW[Address, 3, force];
PDW[ToReg, 85, force];
AssDisCycleClock[ports, Eval];
AssDisCycleClock[ports, Eval];
AssDisCycleClock[ports, Eval];
AssDisCycleClock[ports, Eval];
PB[WriteEnable, TRUE, force];
AssDisCycleClock[ports, Eval];
PB[WriteEnable, FALSE, force];
THROUGH [1..600]
DO
PB[RxData, GB[TxData], force];
AssDisCycleClock[ports, Eval];
ENDLOOP;
AssDisInitialize:
PROC [p: Ports.Port, public: Core.Wire, eval: RosemaryUser.TestEvalProc]
RETURNS [ports: AssDisPorts]= {
ports ← NEW[AssDisPortsRec];
{OPEN ports;
[ToReg, FromReg, ReadEnable, WriteEnable, IOCK, Address, TxData, RxData, Lock, CK] ← Ports.BindPorts[public, p, "ToReg", "FromReg", "ReadEnable", "WriteEnable", "IOCK", "Address", "TxData", "RxData", "Lock", "CK"];
PDW[ToReg, 0, force];
PDW[FromReg, 0, none];
PB[ReadEnable, FALSE, force];
PB[WriteEnable, FALSE, force];
PDW[Address, 0, force];
PB[TxData, FALSE, inspect];
PB[RxData, FALSE, force];
PB[Lock, TRUE, force];
AssDisCycleClock[ports, eval];
}};