aboutsummaryrefslogtreecommitdiff
path: root/sim/txvu/pke0.c
blob: f0f4f07390e162c5be2a732f95723de199adc421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*  Copyright (C) 1998, Cygnus Solutions

    */

#include "sim-main.h"

#include "device.h"
#include "pke0.h"

void 
pke0_issue() 
{
}

int
pke0_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;
}

int
pke0_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 pke0_device = 
  { 
    "pke0", 
    &pke0_io_read_buffer,
    &pke0_io_write_buffer 
  };

void 
pke0_attach(SIM_DESC sd) 
{
  sim_core_attach (sd,
		   NULL,
                   0 /*level*/,
                   access_read_write,
                   0 /*space ???*/,
                   PKE0_REGISTER_WINDOW_START,
                   PKE0_REGISTER_WINDOW_SIZE /*nr_bytes*/,
                   0 /*modulo*/,
                   &pke0_device,
                   NULL /*buffer*/);
}