/[gxemul]/trunk/src/devices/dev_dec5800.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_dec5800.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_dec5800.c,v 1.15 2005/02/22 06:26:10 debug Exp $   *  $Id: dev_dec5800.c,v 1.16 2005/10/26 14:37:03 debug Exp $
29   *     *  
30   *  Emulation of devices found in a DECsystem 58x0, where x is the number   *  Emulation of devices found in a DECsystem 58x0, where x is the number
31   *  of CPUs in the system. (The CPU board is called KN5800 by Ultrix.)   *  of CPUs in the system. (The CPU board is called KN5800 by Ultrix.)
# Line 80  int dev_dec5800_vectors_access(struct cp Line 80  int dev_dec5800_vectors_access(struct cp
80          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
81          struct dec5800_data *d = extra;          struct dec5800_data *d = extra;
82    
83          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
84                    idata = memory_readmax64(cpu, data, len);
85    
86          if (writeflag == MEM_READ) {          if (writeflag == MEM_READ) {
87                  /*  TODO  */                  /*  TODO  */
# Line 113  int dev_dec5800_access(struct cpu *cpu, Line 114  int dev_dec5800_access(struct cpu *cpu,
114          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
115          struct dec5800_data *d = extra;          struct dec5800_data *d = extra;
116    
117          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
118                    idata = memory_readmax64(cpu, data, len);
119    
120          /*  Lowest 4 bits of csr contain cpu id:  */          /*  Lowest 4 bits of csr contain cpu id:  */
121          d->csr = (d->csr & ~0xf) | (cpu->cpu_id & 0xf);          d->csr = (d->csr & ~0xf) | (cpu->cpu_id & 0xf);
# Line 200  int dev_decbi_access(struct cpu *cpu, st Line 202  int dev_decbi_access(struct cpu *cpu, st
202          int node_nr;          int node_nr;
203          struct decbi_data *d = extra;          struct decbi_data *d = extra;
204    
205          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
206                    idata = memory_readmax64(cpu, data, len);
207    
208          relative_addr += BI_NODESIZE;   /*  HACK  */          relative_addr += BI_NODESIZE;   /*  HACK  */
209    
# Line 316  int dev_deccca_access(struct cpu *cpu, s Line 319  int dev_deccca_access(struct cpu *cpu, s
319          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
320          /*  struct deccca_data *d = extra;  */          /*  struct deccca_data *d = extra;  */
321    
322          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
323                    idata = memory_readmax64(cpu, data, len);
324    
325          switch (relative_addr) {          switch (relative_addr) {
326          case 6:          case 6:
# Line 400  int dev_decxmi_access(struct cpu *cpu, s Line 404  int dev_decxmi_access(struct cpu *cpu, s
404          int node_nr;          int node_nr;
405          struct decxmi_data *d = extra;          struct decxmi_data *d = extra;
406    
407          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
408                    idata = memory_readmax64(cpu, data, len);
409    
410          node_nr = relative_addr / XMI_NODESIZE;          node_nr = relative_addr / XMI_NODESIZE;
411          relative_addr &= (XMI_NODESIZE - 1);          relative_addr &= (XMI_NODESIZE - 1);

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26