OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [trunk/] [sw/] [dev/] [test_main/] [src/] [_hdl/] [bsp/] [libsrc/] [axidma_v9_0/] [src/] [xaxidma_sinit.c] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 kuzmi4
/******************************************************************************
2
*
3
* Copyright (C) 2010 - 2015 Xilinx, Inc.  All rights reserved.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is
10
* furnished to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
14
*
15
* Use of the Software is limited solely to applications:
16
* (a) running on a Xilinx device, or
17
* (b) that interact with a Xilinx device through a bus or interconnect.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
* XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
* SOFTWARE.
26
*
27
* Except as contained in this notice, the name of the Xilinx shall not be used
28
* in advertising or otherwise to promote the sale, use or other dealings in
29
* this Software without prior written authorization from Xilinx.
30
*
31
******************************************************************************/
32
/*****************************************************************************/
33
/**
34
*
35
* @file xaxidma_sinit.c
36
* @addtogroup axidma_v9_0
37
* @{
38
*
39
* Look up the hardware settings using device ID. The hardware setting is inside
40
* the configuration table in xaxidma_g.c, generated automatically by XPS or
41
* manually by the user.
42
*
43
* <pre>
44
* MODIFICATION HISTORY:
45
*
46
* Ver   Who  Date     Changes
47
* ----- ---- -------- -------------------------------------------------------
48
* 1.00a jz   08/16/10 First release
49
* 2.00a jz   08/10/10 Second release, added in xaxidma_g.c, xaxidma_sinit.c,
50
*                     updated tcl file, added xaxidma_porting_guide.h
51
* 3.00a jz   11/22/10 Support IP core parameters change
52
* 5.00a srt  08/29/11 Removed a compiler warning
53
*
54
* </pre>
55
*
56
******************************************************************************/
57
 
58
/***************************** Include Files *********************************/
59
 
60
#include "xparameters.h"
61
#include "xaxidma.h"
62
 
63
 
64
/*****************************************************************************/
65
/**
66
 * Look up the hardware configuration for a device instance
67
 *
68
 * @param       DeviceId is the unique device ID of the device to lookup for
69
 *
70
 * @return
71
 *              The configuration structure for the device. If the device ID is
72
 *              not found,a NULL pointer is returned.
73
 *
74
 * @note        None
75
 *
76
 ******************************************************************************/
77
XAxiDma_Config *XAxiDma_LookupConfig(u32 DeviceId)
78
{
79
        extern XAxiDma_Config XAxiDma_ConfigTable[];
80
        XAxiDma_Config *CfgPtr;
81
        u32 Index;
82
 
83
        CfgPtr = NULL;
84
 
85
        for (Index = 0; Index < XPAR_XAXIDMA_NUM_INSTANCES; Index++) {
86
                if (XAxiDma_ConfigTable[Index].DeviceId == DeviceId) {
87
 
88
                        CfgPtr = &XAxiDma_ConfigTable[Index];
89
                        break;
90
                }
91
        }
92
 
93
        return CfgPtr;
94
}
95
/** @} */

powered by: WebSVN 2.1.0

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