~ubuntu-branches/ubuntu/raring/simh/raring

« back to all changes in this revision

Viewing changes to PDP11/pdp11_xq.c

  • Committer: Bazaar Package Importer
  • Author(s): Vince Mulhollon
  • Date: 2007-04-13 20:16:15 UTC
  • mfrom: (1.1.7 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20070413201615-jiar46bgkrs0dw2h
Tags: 3.7.0-1
* New upstream released 03-Feb-2007
* i7094 added which emulates the IBM 7090/7094
* Upstream has converted almost entirely to pdf format for docs
* All manpages updated
* All docs are registered with the doc-base system

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
 
67
67
  Modification history:
68
68
 
 
69
  29-Oct-06  RMS  Synced poll and clock
69
70
  27-Jan-06  RMS  Fixed unaligned accesses in XQB (found by Doug Carman)
70
71
  07-Jan-06  RMS  Fixed unaligned access bugs (found by Doug Carman)
71
72
  07-Sep-05  DTH  Removed unused variable
209
210
#include "pdp11_xq.h"
210
211
#include "pdp11_xq_bootrom.h"
211
212
 
212
 
extern int32 tmr_poll, clk_tps;
 
213
extern int32 tmxr_poll;
213
214
extern FILE* sim_deb;
214
215
extern char* read_line (char *ptr, int32 size, FILE *stream);
215
216
 
1621
1622
  /* start/stop receive timer when RE transitions */
1622
1623
  if ((xq->var->csr ^ data) & XQ_CSR_RE) {
1623
1624
    if (data & XQ_CSR_RE)
1624
 
      sim_activate(&xq->unit[0], (clk_tps * tmr_poll)/xq->var->poll);
 
1625
      sim_activate(&xq->unit[0], clock_cosched (tmxr_poll));
1625
1626
    else
1626
1627
      sim_cancel(&xq->unit[0]);
1627
1628
  }
1682
1683
  t_stat status;
1683
1684
  CTLR* xq = xq_dev2ctlr(dptr);
1684
1685
  const uint16 set_bits = XQ_CSR_RL | XQ_CSR_XL;
1685
 
  /* must be recalculated each time since tmr_poll is a dynamic number */
1686
 
  const int32 one_second = clk_tps * tmr_poll;
1687
1686
 
1688
1687
  sim_debug(DBG_TRC, xq->dev, "xq_reset()\n");
1689
1688
 
1721
1720
    xq_csr_set_clr(xq, XQ_CSR_OK, 0);
1722
1721
 
1723
1722
    /* start service timer */
1724
 
    sim_activate(&xq->unit[0], one_second/xq->var->poll);
 
1723
    sim_activate_abs(&xq->unit[0], tmxr_poll);
1725
1724
  }
1726
1725
 
1727
1726
  /* set hardware sanity controls */
1826
1825
{
1827
1826
  CTLR* xq = xq_unit2ctlr(uptr);
1828
1827
 
1829
 
  /* must be recalculated each time since tmr_poll is a dynamic number */
1830
 
  const int32 one_second = clk_tps * tmr_poll;
1831
 
 
1832
1828
  /* if the receiver is enabled */
1833
1829
  if (xq->var->csr & XQ_CSR_RE) {
1834
1830
    t_stat status;
1867
1863
  }
1868
1864
 
1869
1865
  /* resubmit service timer */
1870
 
  sim_activate(&xq->unit[0], one_second/xq->var->poll);
 
1866
  sim_activate(&xq->unit[0], tmxr_poll);
1871
1867
 
1872
1868
  return SCPE_OK;
1873
1869
}