PDP11, VAX: Leverage tmxr_txdone_ln() API to get best timing with multiple lines

Potentially affecting #587 #588
This commit is contained in:
Mark Pizzolato 2018-07-12 10:16:39 -07:00
parent f42db0c6ea
commit 8b1a2ba759
2 changed files with 7 additions and 3 deletions

View file

@ -668,7 +668,7 @@ for (dz = 0; dz < dz_desc.lines/DZ_LINES; dz++) { /* loop thru muxes */
for (i = 0; i < DZ_LINES; i++) { /* loop thru lines */
j = (j + 1) & DZ_LNOMASK; /* next line */
line = (dz * DZ_LINES) + j; /* get line num */
if ((linemask & (1 << j)) && dz_ldsc[line].xmte) {
if ((linemask & (1 << j)) && tmxr_txdone_ln (&dz_ldsc[line])) {
CSR_PUTTL (dz_csr[dz], j); /* put ln in csr */
dz_csr[dz] |= CSR_TRDY; /* set xmt rdy */
break;

View file

@ -1357,8 +1357,10 @@ static void doDMA ( int32 vh,
lp->tbuf2 = (lp->tbuf2 & ~TB2_M_TBUFFAD) |
((pa >> 16) & TB2_M_TBUFFAD);
sim_debug (DBG_XMTSCH, &vh_dev, "VH-%d DMAed: %d, remaining: %u - %d\n", (int)(lp - vh_parm), sent, lp->tbuffct, status);
if ((sent == 0) &&
((lp->tbuffct == 0) || (!lp->tmln->conn))) {
if (((tmxr_txdone_ln (lp->tmln)) &&
(sent == 0) &&
(lp->tbuffct == 0)) ||
(!lp->tmln->conn)) {
lp->tbuf2 &= ~TB2_TX_DMA_START;
q_tx_report (vh, status);
lp->txstate = TXS_IDLE;
@ -1453,6 +1455,8 @@ static t_stat vh_xmt_svc ( UNIT *uptr )
sim_debug (DBG_XMTSCH, &vh_dev, "VH-%d PIO: %s - 0x%X\n", (int)(lp - vh_parm), (lp->txstate == TXS_PIO_PENDING) ? "Pending" : ((lp->txstate == TXS_PIO_START) ? "Starting" : "Unknown"), lp->txchar & 0xFF);
switch (lp->txstate) {
case TXS_PIO_PENDING:
if (0 == tmxr_txdone_ln (lp->tmln)) /* actually done? */
break;
q_tx_report (vh,
CSR_GETCHAN (vh_csr[vh]) << CSR_V_TX_LINE);
lp->txchar &= ~TXCHAR_TX_DATA_VALID;