* Many changes to make sky sim build with --enable-sim-warnings.
[deliverable/binutils-gdb.git] / sim / mips / sky-vu0.c
1 /* Copyright (C) 1998, Cygnus Solutions
2
3 */
4
5 #include "sim-main.h"
6
7 #include "sky-device.h"
8 #include "sky-vu0.h"
9
10 static char vu0_mem0_buffer[VU0_MEM0_SIZE];
11 static char vu0_mem1_buffer[VU0_MEM1_SIZE];
12
13 void
14 vu0_issue(void)
15 {
16 }
17
18 static int
19 vu0_io_read_buffer(device *me,
20 void *dest,
21 int space,
22 address_word addr,
23 unsigned nr_bytes,
24 sim_cpu *processor,
25 sim_cia cia)
26 {
27 printf("%s: Read!\n", me->name);
28 return nr_bytes;
29 }
30
31 static int
32 vu0_io_write_buffer(device *me,
33 const void *source,
34 int space,
35 address_word addr,
36 unsigned nr_bytes,
37 sim_cpu *processor,
38 sim_cia cia)
39 {
40 printf("%s: Write!\n", me->name);
41 return nr_bytes;
42 }
43
44 device vu0_device =
45 {
46 "vu0",
47 &vu0_io_read_buffer,
48 &vu0_io_write_buffer
49 };
50
51 void
52 vu0_attach(SIM_DESC sd)
53 {
54 sim_core_attach (sd,
55 NULL,
56 0 /*level*/,
57 access_read_write,
58 0 /*space ???*/,
59 VU0_REGISTER_WINDOW_START,
60 VU0_REGISTER_WINDOW_SIZE /*nr_bytes*/,
61 0 /*modulo*/,
62 &vu0_device,
63 NULL /*buffer*/);
64
65 sim_core_attach (sd,
66 NULL,
67 0 /*level*/,
68 access_read_write,
69 0 /*space ???*/,
70 VU0_MEM0_WINDOW_START,
71 VU0_MEM0_SIZE /*nr_bytes*/,
72 0 /*modulo*/,
73 0 /*device*/,
74 &vu0_mem0_buffer /*buffer*/);
75
76 sim_core_attach (sd,
77 NULL,
78 0 /*level*/,
79 access_read_write,
80 0 /*space ???*/,
81 VU0_MEM1_WINDOW_START,
82 VU0_MEM1_SIZE /*nr_bytes*/,
83 0 /*modulo*/,
84 0 /*device*/,
85 &vu0_mem1_buffer /*buffer*/);
86 }
This page took 0.048022 seconds and 4 git commands to generate.