1998-02-06 02:29:22 +00:00
|
|
|
/* Copyright (C) 1998, Cygnus Solutions
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sim-main.h"
|
|
|
|
|
1998-02-06 03:09:03 +00:00
|
|
|
#include "sky-device.h"
|
|
|
|
#include "sky-vu0.h"
|
1998-02-06 02:29:22 +00:00
|
|
|
|
|
|
|
static char vu0_mem0_buffer[VU0_MEM0_SIZE];
|
|
|
|
static char vu0_mem1_buffer[VU0_MEM1_SIZE];
|
|
|
|
|
|
|
|
void
|
1998-02-10 20:08:16 +00:00
|
|
|
vu0_issue(void)
|
1998-02-06 02:29:22 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
1998-02-10 20:08:16 +00:00
|
|
|
static int
|
1998-02-06 02:29:22 +00:00
|
|
|
vu0_io_read_buffer(device *me,
|
|
|
|
void *dest,
|
|
|
|
int space,
|
|
|
|
address_word addr,
|
|
|
|
unsigned nr_bytes,
|
|
|
|
sim_cpu *processor,
|
|
|
|
sim_cia cia)
|
|
|
|
{
|
|
|
|
printf("%s: Read!\n", me->name);
|
|
|
|
return nr_bytes;
|
|
|
|
}
|
|
|
|
|
1998-02-10 20:08:16 +00:00
|
|
|
static int
|
1998-02-06 02:29:22 +00:00
|
|
|
vu0_io_write_buffer(device *me,
|
|
|
|
const void *source,
|
|
|
|
int space,
|
|
|
|
address_word addr,
|
|
|
|
unsigned nr_bytes,
|
|
|
|
sim_cpu *processor,
|
|
|
|
sim_cia cia)
|
|
|
|
{
|
|
|
|
printf("%s: Write!\n", me->name);
|
|
|
|
return nr_bytes;
|
|
|
|
}
|
|
|
|
|
|
|
|
device vu0_device =
|
|
|
|
{
|
|
|
|
"vu0",
|
|
|
|
&vu0_io_read_buffer,
|
|
|
|
&vu0_io_write_buffer
|
|
|
|
};
|
|
|
|
|
|
|
|
void
|
|
|
|
vu0_attach(SIM_DESC sd)
|
|
|
|
{
|
|
|
|
sim_core_attach (sd,
|
|
|
|
NULL,
|
|
|
|
0 /*level*/,
|
|
|
|
access_read_write,
|
|
|
|
0 /*space ???*/,
|
|
|
|
VU0_REGISTER_WINDOW_START,
|
|
|
|
VU0_REGISTER_WINDOW_SIZE /*nr_bytes*/,
|
|
|
|
0 /*modulo*/,
|
|
|
|
&vu0_device,
|
|
|
|
NULL /*buffer*/);
|
|
|
|
|
|
|
|
sim_core_attach (sd,
|
|
|
|
NULL,
|
|
|
|
0 /*level*/,
|
|
|
|
access_read_write,
|
|
|
|
0 /*space ???*/,
|
|
|
|
VU0_MEM0_WINDOW_START,
|
|
|
|
VU0_MEM0_SIZE /*nr_bytes*/,
|
|
|
|
0 /*modulo*/,
|
|
|
|
0 /*device*/,
|
|
|
|
&vu0_mem0_buffer /*buffer*/);
|
|
|
|
|
|
|
|
sim_core_attach (sd,
|
|
|
|
NULL,
|
|
|
|
0 /*level*/,
|
|
|
|
access_read_write,
|
|
|
|
0 /*space ???*/,
|
|
|
|
VU0_MEM1_WINDOW_START,
|
|
|
|
VU0_MEM1_SIZE /*nr_bytes*/,
|
|
|
|
0 /*modulo*/,
|
|
|
|
0 /*device*/,
|
|
|
|
&vu0_mem1_buffer /*buffer*/);
|
|
|
|
}
|