OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Software/] [adv_jtag_bridge/] [hardware_monitor.h] - Blame information for rev 42

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 42 nyawn
 
2
#ifndef _HARDWARE_MONITOR_H_
3
#define _HARDWARE_MONITOR_H_
4
 
5
/* Communication between servers (such as the RSP server) and the target
6
 * monitor is done via 2 pipes, created using pipe().  One pipe, pipe_fds[0],
7
 * is used by the server to command the target monitor thread to stall or
8
 * unstall the CPU.  This is done by sending single-letter commands; sending "S"
9
 * commands the monitor thread to stall the CPU, sending "U" commands the monitor
10
 * to unstall the CPU.
11
 *
12
 * Feedback is sent back to servers using pipe_fds[1]. When the CPU transitions
13
 * from the stalled state to the run state, an "R" is sent to all registered
14
 * servers.  When the CPU goes from running to stopped, an "H" is sent to indicate
15
 * the halt state.
16
 */
17
 
18
/* This should be called once at initialization */
19
int start_monitor_thread(void);
20
 
21
/* This is called to create a  pair of shared pipes with the monitor thread.
22
 * The pipes should NOT have already been created before calling this function,
23
 * but the pipe_fds array must be already allocated.  pipe_fds[0] is for
24
 * communicating server->monitor, pipe_fds[1] is for monitor->server.
25
 */
26
int register_with_monitor_thread(int pipe_fds[2]);
27
 
28
/* Un-share a set of pipes with the monitor.  The pipes may be closed
29
 * after this call returns.
30
 */
31
void unregister_with_monitor_thread(int pipe_fds[2]);
32
 
33
 
34
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.