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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or_debug_proxy/] [includes/] [vpi_functions.h] - Blame information for rev 639

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 julius
/*$$HEADER*/
2
/******************************************************************************/
3
/*                                                                            */
4
/*                    H E A D E R   I N F O R M A T I O N                     */
5
/*                                                                            */
6
/******************************************************************************/
7
 
8
// Project Name                   : OpenRISC Debug Proxy
9
// File Name                      : usb_functions.h
10
// Prepared By                    : jb
11
// Project Start                  : 2008-10-01
12
 
13
/*$$COPYRIGHT NOTICE*/
14
/******************************************************************************/
15
/*                                                                            */
16
/*                      C O P Y R I G H T   N O T I C E                       */
17
/*                                                                            */
18
/******************************************************************************/
19
/*
20
  This library is free software; you can redistribute it and/or
21
  modify it under the terms of the GNU Lesser General Public
22
  License as published by the Free Software Foundation;
23
  version 2.1 of the License, a copy of which is available from
24
  http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt.
25
 
26
  This library is distributed in the hope that it will be useful,
27
  but WITHOUT ANY WARRANTY; without even the implied warranty of
28
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29
  Lesser General Public License for more details.
30
 
31
  You should have received a copy of the GNU Lesser General Public
32
  License along with this library; if not, write to the Free Software
33
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
34
*/
35
 
36
/*$$CHANGE HISTORY*/
37
/******************************************************************************/
38
/*                                                                            */
39
/*                         C H A N G E  H I S T O R Y                         */
40
/*                                                                            */
41
/******************************************************************************/
42
 
43
// Date         Version Description
44
//------------------------------------------------------------------------
45
// 081101               First revision                                  jb
46
 
47
//TODO: Make this port variable (at both ends!!)
48
// HARDCODED port for communications with functions attached to RTL sim via VPI
49
#define VPI_PORT 54002
50
 
51
#ifdef DEBUG_VPI
52
#define debug printf
53
#else
54
#define debug
55
#endif
56
 
57
#ifdef DEBUG2_VPI
58
#define debug2 printf
59
#else
60
#define debug2
61
#endif
62
 
63
 
64
/* VPI communication function prototyopes */
65
void get_response_from_vpi();
66
void get_data_from_vpi();
67
void get_block_data_from_vpi(uint32_t len, uint32_t *data);
68
void send_data_to_vpi(uint32_t data);
69
void send_block_data_to_vpi(uint32_t len, uint32_t *data);
70
void send_address_to_vpi(uint32_t address);
71
void send_command_to_vpi(char CMD);
72
 
73
int vpi_connect();
74
 
75
void vpi_dbg_test();
76
int vpi_dbg_reset();
77
int vpi_dbg_set_chain(uint32_t chain);
78
int vpi_dbg_ctrl(uint32_t reset, uint32_t stall);
79
int vpi_dbg_ctrl_read(uint32_t *reset, uint32_t *stall);
80
 
81
int vpi_dbg_cpu0_write_ctrl(uint32_t adr, unsigned char data);
82
int vpi_dbg_cpu0_write(uint32_t adr, uint32_t data);
83
int vpi_dbg_cpu0_read_ctrl(uint32_t adr, unsigned char *data);
84
int vpi_dbg_cpu0_read(uint32_t adr, uint32_t *data);
85
int vpi_dbg_wb_write_block32(uint32_t adr, uint32_t *data, uint32_t len);
86
int vpi_dbg_wb_read_block32(uint32_t adr, uint32_t *data, uint32_t len);
87
int vpi_dbg_wb_write32(uint32_t adr, uint32_t data);
88
int vpi_dbg_wb_read32(uint32_t adr, uint32_t *data);
89
 
90
 
91
 

powered by: WebSVN 2.1.0

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