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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.swp.api/] [openmcapi/] [1.0/] [test/] [mgmt_svc.h] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
/*
2
 * Copyright (c) 2010, Mentor Graphics Corporation
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of the <ORGANIZATION> nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
 * POSSIBILITY OF SUCH DAMAGE.
28
 */
29
 
30
/************************************************************************
31
*
32
*   FILENAME
33
*
34
*       support.h
35
*
36
*
37
*************************************************************************/
38
 
39
/* Check to see if this file has been included already.  */
40
#ifndef  _MCAPID_MGMT_SVC_H_
41
#define  _MCAPID_MGMT_SVC_H_
42
 
43
#include <mcapi.h>
44
#include "support_suite/mcapid_support.h"
45
 
46
/* Management service macros. */
47
#define MCAPID_MGMT_PKT_LEN             24
48
 
49
/* Management service packet offsets. */
50
#define MCAPID_MGMT_TYPE_OFFSET         0
51
#define MCAPID_MGMT_FOREIGN_PORT_OFFSET 4
52
#define MCAPID_MGMT_LOCAL_ENDP_OFFSET   8
53
#define MCAPID_MGMT_PAUSE_OFFSET        12
54
#define MCAPID_MGMT_STATUS_OFFSET       16
55
#define MCAPID_MGMT_PRIO_OFFSET         20
56
 
57
/* Management request types. */
58
#define MCAPID_MGMT_CREATE_ENDP         0
59
#define MCAPID_MGMT_DELETE_ENDP         1
60
#define MCAPID_MGMT_TX_BLCK_MSG         2
61
#define MCAPID_MGMT_TX_NONBLCK_MSG      3
62
#define MCAPID_MGMT_OPEN_TX_SIDE_PKT    4
63
#define MCAPID_MGMT_OPEN_RX_SIDE_PKT    5
64
#define MCAPID_MGMT_CLOSE_TX_SIDE_PKT   6
65
#define MCAPID_MGMT_CLOSE_RX_SIDE_PKT   7
66
#define MCAPID_TX_PKT                   8
67
#define MCAPID_RX_PKT                   9
68
#define MCAPID_MGMT_OPEN_TX_SIDE_SCL    10
69
#define MCAPID_MGMT_OPEN_RX_SIDE_SCL    11
70
#define MCAPID_MGMT_CLOSE_TX_SIDE_SCL   12
71
#define MCAPID_MGMT_CLOSE_RX_SIDE_SCL   13
72
#define MCAPID_RX_64_BIT_SCL            14
73
#define MCAPID_RX_32_BIT_SCL            15
74
#define MCAPID_RX_16_BIT_SCL            16
75
#define MCAPID_RX_8_BIT_SCL             17
76
#define MCAPID_TX_64_BIT_SCL            18
77
#define MCAPID_TX_32_BIT_SCL            19
78
#define MCAPID_TX_16_BIT_SCL            20
79
#define MCAPID_TX_8_BIT_SCL             21
80
#define MCAPID_NO_OP                    22
81
#define MCAPID_CANCEL_REQUEST           23
82
#define MCAPID_WAIT_REQUEST             24
83
 
84
/* Dummy values used for testing. */
85
#define MCAPID_8BIT_SCALAR      255
86
#define MCAPID_16BIT_SCALAR     65535
87
#define MCAPID_32BIT_SCALAR     2000000000
88
#define MCAPID_64BIT_SCALAR     2000000000
89
 
90
/* Message transmission macros. */
91
#define MCAPID_MSG_LEN                  512
92
 
93
mcapi_status_t MCAPID_TX_Mgmt_Message(MCAPID_STRUCT *mcapi_struct,
94
                                      mcapi_uint32_t type,
95
                                      mcapi_port_t foreign_port,
96
                                      mcapi_endpoint_t local_endp,
97
                                      mcapi_uint32_t pause,
98
                                      mcapi_uint32_t priority);
99
mcapi_status_t MCAPID_RX_Mgmt_Response(MCAPID_STRUCT *);
100
MCAPI_THREAD_ENTRY(MCAPID_Mgmt_Service);
101
 
102
#endif /* _MCAPID_MGMT_SVC_H_ */

powered by: WebSVN 2.1.0

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