"This is a replacement for U5 on TI Professional Computer alphanumeric CRT "controller board. Equations are from the technical reference manual except "the one testing with pattern generator an in circuit showed didn't match "HAL device. Was not able to read fuse array. Machine operated properly and "waveforms looked similar compared to a functional board with original HAL "device. " "Equations have been converted to logical level from active low. module u5 TITLE 'TI Professional PC CRT Controller board U5' u5 DEVICE 'p16v8'; "inputs dclk pin 1; !atsel pin 2; !csel pin 3; !wr pin 4; !rd pin 5; x1s pin 6; x2s pin 7; x4s pin 8; !ld pin 9; !oe pin 11; "outputs !coe pin 12 ISTYPE 'reg,invert'; !cwe pin 13 ISTYPE 'reg,invert'; !aen pin 14 ISTYPE 'reg,invert'; !aoe pin 15 ISTYPE 'reg,invert'; !ack pin 16 ISTYPE 'reg,invert'; !mie pin 17 ISTYPE 'reg,invert'; swmux pin 18 ISTYPE 'reg,invert'; !wait pin 19 ISTYPE 'reg,invert'; " Constant assignments x, c, H, L = .x., .c., 1, 0 ; equations " Equations from table 2-16 in technical reference manual swmux := x4s; swmux.clk = dclk; swmux.oe = oe; mie := !x1s & !x2s & !x4s & !ld & wr & csel & aoe & wait # cwe; mie.clk = dclk; mie.oe = oe; cwe := !x1s & !x2s & !x4s & !ld & wr & csel & aoe & wait # x1s & !x2s & !x4s & !ld & wr & csel & cwe # !x1s & x2s & !x4s & !ld & wr & csel & cwe # x4s & ld; cwe.clk = dclk; cwe.oe = oe; coe := x4s # !x2s & !x4s & !ld & rd & csel & !ack & wait # rd & csel & aen # x4s & ld; coe.clk = dclk; coe.oe = oe; aen := !x1s & !x2s & !x4s & !ld & wr & csel & aoe & wait # cwe # !x2s & !x4s & !ld & rd & csel & !ack & wait # x2s & !x4s & !ld & rd & csel & aen # x4s & ld; aen.clk = dclk; aen.oe = oe; ack := x1s & x2s & !x4s & !ld & rd & csel & aen # !x1s & wr & atsel # x4s & ld; ack.clk = dclk; ack.oe = oe; aoe := !x1s & !x2s & !x4s & ld & wr & csel & !aoe & wait # wr & csel & aoe # rd & atsel # rd & csel & ack # rd & csel & aoe; aoe.clk = dclk; aoe.oe = oe; "This is the equation in the TI mainenance manual. The PAL removed used " !aoe like write as best as I can tell. Changing the equation made the " waveform match when running. With equation below extra waits were inserted " rd & csel & !aen & !ack # wait := wr & csel & !aoe # rd & csel & !aoe # x4s & ld; wait.clk = dclk; wait.oe = oe; test_vectors ([ dclk, oe, x1s, x2s, x4s, ld, rd, wr, csel, atsel] -> [ swmux, mie, cwe, coe, aen, ack, aoe, wait]) [ c, 1, 0, 0, 1, 0, 0, 0, 0, 0 ] -> [ 1, x, x, x, x, x, x, x ]; end