/* * Bus Control for * Motorola 68000 to Dec Qbus */ .i uds lds isync rw int reply s0 s1 s2 s3 .o ns0 ns1 ns2 ns3 din dout sync dtack dq wtbt atoq iak .f state = s0 s1 s2 s3 o = ns0 ns1 ns2 ns3 din dout sync dtack dq wtbt atoq iak .e AS = (!uds | !lds) DS = AS & !isync DIN=020 DOUT=040 SYNC=0100 DTACK=0200 DQ=0400 WTBT=01000 ATOQ=02000 IAK=04000 S0 =0 S1 =1 S2 =2 S3 =3 S4 =4 S5 =5 S6 =6 S7 =7 S8 =8 S9 =9 S10=10 S11=11 S12=12 S13=13 S14=14 S15=15 o = (state) { /* S0 */ (DS & !int) ? (rw) ? S1|ATOQ : S1|ATOQ|WTBT : (DS & int) ? S11: /* start interrupt cycle */ S0, /* loop in S0 */ /* S1 */ (rw) ? S2|ATOQ : S2|ATOQ|WTBT, /* S2 */ (rw) ? S3|ATOQ : S3|ATOQ|WTBT, /* S3 */ (rw) ? S8|ATOQ|SYNC : S8|ATOQ|SYNC|WTBT, /* end of t1, sync */ /* start data cycle */ /* S4 */ (rw==1 & !reply) ? S4|SYNC|DIN: (rw==1 & reply) ? S5|SYNC|DIN|DTACK: (rw==0 & !reply) ? S4|SYNC|DQ|DOUT|(uds!=lds)?WTBT:0: S7|SYNC|DQ|DOUT|DTACK|(uds!=lds)?WTBT:0, /* * give dtack * wait for AS to drop */ /* S5 */ (AS) ? S5|SYNC|DTACK|DIN: S6|SYNC, /* * drop dtack * wait for reply to drop */ /* S6 */ (reply) ? S6|SYNC: S0, /* S7 */ (AS) ? S7|SYNC|DQ|DOUT|DTACK|(uds!=lds)?WTBT:0: S6|SYNC, /* S8 */ (rw) ? S9|ATOQ|SYNC : S9|ATOQ|SYNC|WTBT, /* t2 delay */ /* S9 */ (rw) ? S10|ATOQ|SYNC: S10|ATOQ|SYNC|WTBT, /* S10 */ (rw) ? S4|ATOQ|SYNC : S4|ATOQ|SYNC|WTBT, /* S11 */ S0, 0, 0, 0, 0, 0}