PDP11: Add provision in the DL device simulation to support bursts of input data to avoid reporting character overruns on the serial port.
Overruns can happen on simulated MUX lines using TCP since multiple characters can arrive in a single network packet. Overruns still are reported if previous input characters haven't been read within 500ms. Edmund Marr reported this problem.
This commit is contained in:
parent
9fdd8a8706
commit
8bb494036c
1 changed files with 5 additions and 0 deletions
|
@ -84,6 +84,7 @@ extern int32 tmxr_poll;
|
||||||
|
|
||||||
uint16 dli_csr[DLX_LINES] = { 0 }; /* control/status */
|
uint16 dli_csr[DLX_LINES] = { 0 }; /* control/status */
|
||||||
uint16 dli_buf[DLX_LINES] = { 0 };
|
uint16 dli_buf[DLX_LINES] = { 0 };
|
||||||
|
uint32 dli_buftime[DLX_LINES] = { 0 };
|
||||||
uint32 dli_ireq[2] = { 0, 0};
|
uint32 dli_ireq[2] = { 0, 0};
|
||||||
uint16 dlo_csr[DLX_LINES] = { 0 }; /* control/status */
|
uint16 dlo_csr[DLX_LINES] = { 0 }; /* control/status */
|
||||||
uint8 dlo_buf[DLX_LINES] = { 0 };
|
uint8 dlo_buf[DLX_LINES] = { 0 };
|
||||||
|
@ -391,6 +392,9 @@ if (ln >= 0) { /* got one? rcv enb */
|
||||||
tmxr_poll_rx (&dlx_desc); /* poll for input */
|
tmxr_poll_rx (&dlx_desc); /* poll for input */
|
||||||
for (ln = 0; ln < DLX_LINES; ln++) { /* loop thru lines */
|
for (ln = 0; ln < DLX_LINES; ln++) { /* loop thru lines */
|
||||||
if (dlx_ldsc[ln].conn) { /* connected? */
|
if (dlx_ldsc[ln].conn) { /* connected? */
|
||||||
|
if ((dli_csr[ln] & CSR_DONE) && /* input still pending and < 500ms? */
|
||||||
|
((sim_os_msec () - dli_buftime[ln]) < 500))
|
||||||
|
continue;
|
||||||
if ((temp = tmxr_getc_ln (&dlx_ldsc[ln]))) { /* get char */
|
if ((temp = tmxr_getc_ln (&dlx_ldsc[ln]))) { /* get char */
|
||||||
if (temp & SCPE_BREAK) /* break? */
|
if (temp & SCPE_BREAK) /* break? */
|
||||||
c = DLIBUF_ERR|DLIBUF_RBRK;
|
c = DLIBUF_ERR|DLIBUF_RBRK;
|
||||||
|
@ -401,6 +405,7 @@ for (ln = 0; ln < DLX_LINES; ln++) { /* loop thru lines */
|
||||||
if (dli_csr[ln] & CSR_IE)
|
if (dli_csr[ln] & CSR_IE)
|
||||||
dli_set_int (ln, DLI_RCI);
|
dli_set_int (ln, DLI_RCI);
|
||||||
dli_buf[ln] = (uint16)c;
|
dli_buf[ln] = (uint16)c;
|
||||||
|
dli_buftime[ln] = sim_os_msec ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dlo_unit[ln].flags & DLX_MDM) { /* discpnn & modem? */
|
else if (dlo_unit[ln].flags & DLX_MDM) { /* discpnn & modem? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue