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

Subversion Repositories wf3d

[/] [wf3d/] [trunk/] [clib/] [hw_dep/] [zedboard/] [mp_hwdep.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 specular
//=======================================================================
2
// Project Monophony
3
//   Wire-Frame 3D Graphics Accelerator IP Core
4
//
5
// File:
6
//   mp_hwdep.h
7
//
8
// Abstract:
9
//   Hardware dependent function header for ZedBoard
10
//
11
// Author:
12
//   Kenji Ishimaru (kenji.ishimaru@gmail.com)
13
//
14
//======================================================================
15
//
16
// Copyright (c) 2016, Kenji Ishimaru
17
// All rights reserved.
18
//
19
// Redistribution and use in source and binary forms, with or without
20
// modification, are permitted provided that the following conditions are met:
21
//
22
//  -Redistributions of source code must retain the above copyright notice,
23
//   this list of conditions and the following disclaimer.
24
//  -Redistributions in binary form must reproduce the above copyright notice,
25
//   this list of conditions and the following disclaimer in the documentation
26
//   and/or other materials provided with the distribution.
27
//
28
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
32
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
//
40
// Revision History
41
 
42
#ifndef __HW_DEP_H__
43
#define __HW_DEP_H__
44
 
45
#define __ZEDBOARD__
46
#include "platform.h"
47
 
48
// from lscript.ld
49
//   DDR is mapped to 0010_0000 to 1fff_ffff, 512MB(0-1fff_ffff)
50
//   (Accessible to all interconnect masters)
51
//   Monophony uses upper-half 256MB 1000_0000-1fff_ffff
52
 
53
#define VERTEX_BUFFER   0x10000000
54
#define FRAME_BUFFER_0  0x11000000
55
#define FRAME_BUFFER_1  0x12000000
56
 
57
// from system.hdf
58
#define M_AXI_BASE 0x43c00000
59
#define MP_SYSTEM_BASE M_AXI_BASE
60
#define MP_RASTER_BASE M_AXI_BASE+0x100
61
// System
62
#define MP_AXI_MASTER_CONFIG
63
 
64
#define SYS_VIDEO_START  (*(volatile unsigned int  *)(MP_SYSTEM_BASE))
65
#define SYS_FB0_OFFSET   (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x04))
66
#define SYS_FB1_OFFSET   (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x08))
67
#define SYS_COLOR_MODE   (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x14))
68
#define SYS_AXI_CONFIG   (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x18))
69
#define SYS_VIDEO_STATUS (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x20))
70
#define SYS_VIDEO_INT_CLEAR (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x24))
71
#define SYS_VIDEO_INT_MASK  (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x28))
72
#define SYS_FRONT_BUFFER    (*(volatile unsigned int  *)(MP_SYSTEM_BASE+0x2c))
73
 
74
#define D3D_DMA_START  (*(volatile unsigned int  *)(MP_RASTER_BASE))
75
#define D3D_DMA_STATUS (*(volatile unsigned int  *)(MP_RASTER_BASE+0x4))
76
#define D3D_DMA_ADRS   (*(volatile unsigned int  *)(MP_RASTER_BASE+0x8))
77
#define D3D_DMA_SIZE   (*(volatile unsigned int  *)(MP_RASTER_BASE+0xc))
78
#define D3D_MATRIX_M00 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x10))
79
#define D3D_MATRIX_M01 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x14))
80
#define D3D_MATRIX_M02 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x18))
81
#define D3D_MATRIX_M03 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x1c))
82
#define D3D_MATRIX_M10 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x20))
83
#define D3D_MATRIX_M11 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x24))
84
#define D3D_MATRIX_M12 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x28))
85
#define D3D_MATRIX_M13 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x2c))
86
#define D3D_MATRIX_M20 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x30))
87
#define D3D_MATRIX_M21 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x34))
88
#define D3D_MATRIX_M22 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x38))
89
#define D3D_MATRIX_M23 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x3c))
90
#define D3D_MATRIX_M30 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x40))
91
#define D3D_MATRIX_M31 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x44))
92
#define D3D_MATRIX_M32 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x48))
93
#define D3D_MATRIX_M33 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x4c))
94
#define D3D_FSCR_W (*(volatile unsigned int  *)(MP_RASTER_BASE+0x50))
95
#define D3D_FSCR_H (*(volatile unsigned int  *)(MP_RASTER_BASE+0x54))
96
#define D3D_ISCR_W_M1 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x58))
97
#define D3D_ISCR_H_M1 (*(volatile unsigned int  *)(MP_RASTER_BASE+0x5c))
98
#define D3D_ISCR_W (*(volatile unsigned int  *)(MP_RASTER_BASE+0x60))
99
#define D3D_COL_ADRS    (*(volatile unsigned int  *)(MP_RASTER_BASE+0x64))
100
#define D3D_COL_VAL    (*(volatile unsigned int  *)(MP_RASTER_BASE+0x68))
101
 
102
void buffer_clear(unsigned int c,int bank);
103
void video_init();
104
void video_swap();
105
void hw_init();
106
#endif

powered by: WebSVN 2.1.0

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