Commit | Line | Data |
---|---|---|
c906108c | 1 | /* Device definitions. |
88b9d363 | 2 | Copyright (C) 1998-2022 Free Software Foundation, Inc. |
c906108c SS |
3 | Contributed by Cygnus Support. |
4 | ||
5 | This file is part of GDB, the GNU debugger. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
4744ac1b JB |
9 | the Free Software Foundation; either version 3 of the License, or |
10 | (at your option) any later version. | |
c906108c SS |
11 | |
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
4744ac1b JB |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
c906108c SS |
19 | |
20 | #ifndef SIM_HW_H | |
21 | #define SIM_HW_H | |
22 | ||
23 | ||
c906108c SS |
24 | /* Parse a hardware definition */ |
25 | ||
26 | struct hw *sim_hw_parse | |
27 | (struct sim_state *sd, | |
28 | const char *fmt, | |
f0c4dc40 | 29 | ...) ATTRIBUTE_PRINTF (2, 3); |
c906108c SS |
30 | |
31 | ||
32 | /* Print the hardware tree */ | |
33 | ||
34 | void sim_hw_print | |
35 | (struct sim_state *sd, | |
36 | void (*print) (struct sim_state *, const char *, va_list ap)); | |
37 | ||
38 | ||
39 | /* Abort the simulation specifying HW as the reason */ | |
40 | ||
41 | void sim_hw_abort | |
42 | (SIM_DESC sd, | |
43 | struct hw *hw, | |
44 | const char *fmt, | |
f0c4dc40 | 45 | ...) ATTRIBUTE_PRINTF (3, 4) ATTRIBUTE_NORETURN; |
c906108c SS |
46 | |
47 | ||
48 | ||
49 | /* CPU: The simulation is running and the current CPU/CIA | |
50 | initiates a data transfer. */ | |
51 | ||
52 | void sim_cpu_hw_io_read_buffer | |
53 | (sim_cpu *cpu, | |
54 | sim_cia cia, | |
55 | struct hw *hw, | |
56 | void *dest, | |
57 | int space, | |
58 | unsigned_word addr, | |
59 | unsigned nr_bytes); | |
60 | ||
61 | void sim_cpu_hw_io_write_buffer | |
62 | (sim_cpu *cpu, | |
63 | sim_cia cia, | |
64 | struct hw *hw, | |
65 | const void *source, | |
66 | int space, | |
67 | unsigned_word addr, | |
68 | unsigned nr_bytes); | |
69 | ||
70 | ||
71 | ||
72 | /* SYSTEM: A data transfer is being initiated by the system. */ | |
73 | ||
74 | unsigned sim_hw_io_read_buffer | |
75 | (struct sim_state *sd, | |
76 | struct hw *hw, | |
77 | void *dest, | |
78 | int space, | |
79 | unsigned_word addr, | |
80 | unsigned nr_bytes); | |
81 | ||
82 | unsigned sim_hw_io_write_buffer | |
83 | (struct sim_state *sd, | |
84 | struct hw *hw, | |
85 | const void *source, | |
86 | int space, | |
87 | unsigned_word addr, | |
88 | unsigned nr_bytes); | |
89 | ||
90 | ||
91 | #endif |