osd: Added source files
Modified the source files, added selftest example, Doxygen docs Signed-off-by: Shravan Kumar A <skumara@xilinx.com> Acked-by: Srikanth Vemula <svemula@xilinx.com>
This commit is contained in:
parent
db90a73cdd
commit
c3f4403654
12 changed files with 3902 additions and 3184 deletions
|
@ -1,51 +1,51 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
# MODIFICATION HISTORY:
|
||||
#
|
||||
# Ver Who Date Changes
|
||||
# ----- ------ -------- ------------------------------------------------------
|
||||
# 1.00a adk 02/18/14 Removed the implementation of interrupt_handler array.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
#
|
||||
# MODIFICATION HISTORY:
|
||||
#
|
||||
## Ver Who Date Changes
|
||||
# ----- ------ -------- ------------------------------------------------------
|
||||
# 1.00a adk 02/18/14 Removed the implementation of interrupt_handler array.
|
||||
#
|
||||
###############################################################################
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver osd
|
||||
|
||||
OPTION supported_peripherals = (v_osd_v[6-9]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 4.0;
|
||||
OPTION NAME = osd;
|
||||
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
||||
OPTION psf_version = 2.1;
|
||||
|
||||
BEGIN driver osd
|
||||
|
||||
OPTION supported_peripherals = (v_osd_v[6-9]_[0-9]);
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION copyfiles = all;
|
||||
OPTION VERSION = 4.0;
|
||||
OPTION NAME = osd;
|
||||
|
||||
END driver
|
||||
|
||||
|
||||
|
|
|
@ -1,125 +1,37 @@
|
|||
###############################################################
|
||||
# (c) Copyright 2008-2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# This file contains confidential and proprietary information
|
||||
# of Xilinx, Inc. and is protected under U.S. and
|
||||
# international copyright and other intellectual property
|
||||
# laws.
|
||||
#
|
||||
# DISCLAIMER
|
||||
# This disclaimer is not a license and does not grant any
|
||||
# rights to the materials distributed herewith. Except as
|
||||
# otherwise provided in a valid license issued to you by
|
||||
# Xilinx, and to the maximum extent permitted by applicable
|
||||
# law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
||||
# WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
||||
# AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
||||
# BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
||||
# INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
||||
# (2) Xilinx shall not be liable (whether in contract or tort,
|
||||
# including negligence, or under any other theory of
|
||||
# liability) for any loss or damage of any kind or nature
|
||||
# related to, arising under or in connection with these
|
||||
# materials, including for any direct, or any indirect,
|
||||
# special, incidental, or consequential loss or damage
|
||||
# (including loss of data, profits, goodwill, or any type of
|
||||
# loss or damage suffered as a result of any action brought
|
||||
# by a third party) even if such damage or loss was
|
||||
# reasonably foreseeable or Xilinx had been advised of the
|
||||
# possibility of the same.
|
||||
#
|
||||
# CRITICAL APPLICATIONS
|
||||
# Xilinx products are not designed or intended to be fail-
|
||||
# safe, or for use in any application requiring fail-safe
|
||||
# performance, such as life-support or safety devices or
|
||||
# systems, Class III medical devices, nuclear facilities,
|
||||
# applications related to the deployment of airbags, or any
|
||||
# other applications that could lead to death, personal
|
||||
# injury, or severe property or environmental damage
|
||||
# (individually and collectively, "Critical
|
||||
# Applications"). Customer assumes the sole risk and
|
||||
# liability of any use of Xilinx products in Critical
|
||||
# Applications, subject only to applicable laws and
|
||||
# regulations governing limitations on product liability.
|
||||
#
|
||||
# THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
||||
# PART OF THIS FILE AT ALL TIMES.
|
||||
# MODIFICATION HISTORY:
|
||||
# Ver Who Date Changes
|
||||
# -------- ------ -------- ------------------------------------
|
||||
# 3.0 adk 12/10/13 Updated as per the New Tcl API's
|
||||
###############################################################
|
||||
|
||||
proc generate {drv_handle} {
|
||||
xdefine_include_file $drv_handle "xparameters.h" "XOSD" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_NUM_LAYERS" "C_S_AXIS_VIDEO_DATA_WIDTH" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
xdefine_config_file $drv_handle "xosd_g.c" "XOSD" "DEVICE_ID" "C_BASEADDR" "C_NUM_LAYERS" "C_S_AXIS_VIDEO_DATA_WIDTH" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
xdefine_canonical_xpars $drv_handle "xparameters.h" "OSD" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_NUM_LAYERS" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Given a list of arguments, define each as a canonical constant name, using
|
||||
# the driver name, in an include file.
|
||||
#
|
||||
proc xdefine_canonical_xpars {drv_handle file_name drv_string args} {
|
||||
# Open include file
|
||||
set file_handle [::hsm::utils::open_include_file $file_name]
|
||||
|
||||
# Get all the peripherals connected to this driver
|
||||
set periphs [::hsm::utils::get_common_driver_ips $drv_handle]
|
||||
|
||||
# Get the names of all the peripherals connected to this driver
|
||||
foreach periph $periphs {
|
||||
set peripheral_name [string toupper [get_property NAME $periph]]
|
||||
lappend peripherals $peripheral_name
|
||||
}
|
||||
|
||||
# Get possible canonical names for all the peripherals connected to this driver
|
||||
set device_id 0
|
||||
foreach periph $periphs {
|
||||
set canonical_name [string toupper [format "%s_%s" $drv_string $device_id]]
|
||||
lappend canonicals $canonical_name
|
||||
|
||||
# Create a list of IDs of the peripherals whose hardware instance name
|
||||
# doesn't match the canonical name. These IDs can be used later to
|
||||
# generate canonical definitions
|
||||
if { [lsearch $peripherals $canonical_name] < 0 } {
|
||||
lappend indices $device_id
|
||||
}
|
||||
incr device_id
|
||||
}
|
||||
|
||||
set i 0
|
||||
foreach periph $periphs {
|
||||
set periph_name [string toupper [get_property NAME $periph]]
|
||||
|
||||
# Generate canonical definitions only for the peripherals whose
|
||||
# canonical name is not the same as hardware instance name
|
||||
if { [lsearch $canonicals $periph_name] < 0 } {
|
||||
puts $file_handle "/* Canonical definitions for peripheral $periph_name */"
|
||||
set canonical_name [format "%s_%s" $drv_string [lindex $indices $i]]
|
||||
|
||||
foreach arg $args {
|
||||
set lvalue [::hsm::utils::get_driver_param_name $canonical_name $arg]
|
||||
|
||||
# The commented out rvalue is the name of the instance-specific constant
|
||||
# set rvalue [::hsm::utils::get_ip_param_name $periph $arg]
|
||||
|
||||
# The rvalue set below is the actual value of the parameter
|
||||
set rvalue [get_property CONFIG.$arg $periph]
|
||||
if {[llength $rvalue] == 0} {
|
||||
set rvalue 0
|
||||
}
|
||||
set rvalue [::hsm::utils::format_addr_string $rvalue $arg]
|
||||
|
||||
puts $file_handle "#define $lvalue $rvalue"
|
||||
|
||||
}
|
||||
puts $file_handle ""
|
||||
incr i
|
||||
}
|
||||
}
|
||||
|
||||
puts $file_handle "\n/******************************************************************/\n"
|
||||
close $file_handle
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"),to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# Use of the Software is limited solely to applications:
|
||||
# (a) running on a Xilinx device, or
|
||||
# (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
# in advertising or otherwise to promote the sale, use or other dealings in
|
||||
# this Software without prior written authorization from Xilinx.
|
||||
###############################################################################
|
||||
#uses "xillib.tcl"
|
||||
|
||||
proc generate {drv_handle} {
|
||||
xdefine_include_file $drv_handle "xparameters.h" "XOSD" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_NUM_LAYERS" "C_S_AXIS_VIDEO_DATA_WIDTH" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
xdefine_config_file $drv_handle "xosd_g.c" "XOsd" "DEVICE_ID" "C_BASEADDR" "C_NUM_LAYERS" "C_S_AXIS_VIDEO_DATA_WIDTH" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
xdefine_canonical_xpars $drv_handle "xparameters.h" "OSD" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_NUM_LAYERS" "C_LAYER0_TYPE" "C_LAYER1_TYPE" "C_LAYER2_TYPE" "C_LAYER3_TYPE" "C_LAYER4_TYPE" "C_LAYER5_TYPE" "C_LAYER6_TYPE" "C_LAYER7_TYPE" "C_LAYER0_IMEM_SIZE" "C_LAYER0_INS_BOX_EN" "C_LAYER0_INS_LINE_EN" "C_LAYER0_INS_TEXT_EN" "C_LAYER0_CLUT_SIZE" "C_LAYER0_CLUT_MEMTYPE" "C_LAYER0_FONT_NUM_CHARS" "C_LAYER0_FONT_WIDTH" "C_LAYER0_FONT_HEIGHT" "C_LAYER0_FONT_BPP" "C_LAYER0_FONT_ASCII_OFFSET" "C_LAYER0_TEXT_NUM_STRINGS" "C_LAYER0_TEXT_MAX_STRING_LENGTH" "C_LAYER1_IMEM_SIZE" "C_LAYER1_INS_BOX_EN" "C_LAYER1_INS_LINE_EN" "C_LAYER1_INS_TEXT_EN" "C_LAYER1_CLUT_SIZE" "C_LAYER1_CLUT_MEMTYPE" "C_LAYER1_FONT_NUM_CHARS" "C_LAYER1_FONT_WIDTH" "C_LAYER1_FONT_HEIGHT" "C_LAYER1_FONT_BPP" "C_LAYER1_FONT_ASCII_OFFSET" "C_LAYER1_TEXT_NUM_STRINGS" "C_LAYER1_TEXT_MAX_STRING_LENGTH" "C_LAYER2_IMEM_SIZE" "C_LAYER2_INS_BOX_EN" "C_LAYER2_INS_LINE_EN" "C_LAYER2_INS_TEXT_EN" "C_LAYER2_CLUT_SIZE" "C_LAYER2_CLUT_MEMTYPE" "C_LAYER2_FONT_NUM_CHARS" "C_LAYER2_FONT_WIDTH" "C_LAYER2_FONT_HEIGHT" "C_LAYER2_FONT_BPP" "C_LAYER2_FONT_ASCII_OFFSET" "C_LAYER2_TEXT_NUM_STRINGS" "C_LAYER2_TEXT_MAX_STRING_LENGTH" "C_LAYER3_IMEM_SIZE" "C_LAYER3_INS_BOX_EN" "C_LAYER3_INS_LINE_EN" "C_LAYER3_INS_TEXT_EN" "C_LAYER3_CLUT_SIZE" "C_LAYER3_CLUT_MEMTYPE" "C_LAYER3_FONT_NUM_CHARS" "C_LAYER3_FONT_WIDTH" "C_LAYER3_FONT_HEIGHT" "C_LAYER3_FONT_BPP" "C_LAYER3_FONT_ASCII_OFFSET" "C_LAYER3_TEXT_NUM_STRINGS" "C_LAYER3_TEXT_MAX_STRING_LENGTH" "C_LAYER4_IMEM_SIZE" "C_LAYER4_INS_BOX_EN" "C_LAYER4_INS_LINE_EN" "C_LAYER4_INS_TEXT_EN" "C_LAYER4_CLUT_SIZE" "C_LAYER4_CLUT_MEMTYPE" "C_LAYER4_FONT_NUM_CHARS" "C_LAYER4_FONT_WIDTH" "C_LAYER4_FONT_HEIGHT" "C_LAYER4_FONT_BPP" "C_LAYER4_FONT_ASCII_OFFSET" "C_LAYER4_TEXT_NUM_STRINGS" "C_LAYER4_TEXT_MAX_STRING_LENGTH" "C_LAYER5_IMEM_SIZE" "C_LAYER5_INS_BOX_EN" "C_LAYER5_INS_LINE_EN" "C_LAYER5_INS_TEXT_EN" "C_LAYER5_CLUT_SIZE" "C_LAYER5_CLUT_MEMTYPE" "C_LAYER5_FONT_NUM_CHARS" "C_LAYER5_FONT_WIDTH" "C_LAYER5_FONT_HEIGHT" "C_LAYER5_FONT_BPP" "C_LAYER5_FONT_ASCII_OFFSET" "C_LAYER5_TEXT_NUM_STRINGS" "C_LAYER5_TEXT_MAX_STRING_LENGTH" "C_LAYER6_IMEM_SIZE" "C_LAYER6_INS_BOX_EN" "C_LAYER6_INS_LINE_EN" "C_LAYER6_INS_TEXT_EN" "C_LAYER6_CLUT_SIZE" "C_LAYER6_CLUT_MEMTYPE" "C_LAYER6_FONT_NUM_CHARS" "C_LAYER6_FONT_WIDTH" "C_LAYER6_FONT_HEIGHT" "C_LAYER6_FONT_BPP" "C_LAYER6_FONT_ASCII_OFFSET" "C_LAYER6_TEXT_NUM_STRINGS" "C_LAYER6_TEXT_MAX_STRING_LENGTH" "C_LAYER7_IMEM_SIZE" "C_LAYER7_INS_BOX_EN" "C_LAYER7_INS_LINE_EN" "C_LAYER7_INS_TEXT_EN" "C_LAYER7_CLUT_SIZE" "C_LAYER7_CLUT_MEMTYPE" "C_LAYER7_FONT_NUM_CHARS" "C_LAYER7_FONT_WIDTH" "C_LAYER7_FONT_HEIGHT" "C_LAYER7_FONT_BPP" "C_LAYER7_FONT_ASCII_OFFSET" "C_LAYER7_TEXT_NUM_STRINGS" "C_LAYER7_TEXT_MAX_STRING_LENGTH"
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver osd_v3_0 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>example.c <a href="example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright <EFBFBD> 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Driver example applications</title>
|
||||
<link rel="stylesheet" type="text/css" href="../help.css">
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF">
|
||||
<h1> Example Applications for the driver osd_v3_1 </h1>
|
||||
<HR>
|
||||
<ul>
|
||||
<li>osd_selftest_example.c <a href="osd_selftest_example.c">(source)</a> </li>
|
||||
</ul>
|
||||
<p><font face="Times New Roman" color="#800000">Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.</font></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
150
XilinxProcessorIPLib/drivers/osd/examples/osd_selftest_example.c
Executable file
150
XilinxProcessorIPLib/drivers/osd/examples/osd_selftest_example.c
Executable file
|
@ -0,0 +1,150 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file osd_selftest_example.c
|
||||
*
|
||||
* This file contains an example using the OSD driver to do self test
|
||||
* on the core.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
* MODIFICATION HISTORY:
|
||||
* <pre>
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
#include "xil_printf.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
/**
|
||||
* The following constants map to the XPAR parameters created in the
|
||||
* xparameters.h file. They are defined here such that a user can easily
|
||||
* change all the needed parameters in one place.
|
||||
*/
|
||||
#define XOSD_DEVICE_ID XPAR_OSD_0_DEVICE_ID
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
int XOsdSelfTestExample(u16 DeviceId);
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
XOsd OsdInst; /**< Instance of the OSD Device */
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* Main/Entry function for self test example.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None
|
||||
*
|
||||
******************************************************************************/
|
||||
int main(void)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Run selftest example */
|
||||
Status = XOsdSelfTestExample(XOSD_DEVICE_ID);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
xil_printf("OSD driver Selftest Example Failed\r\n");
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
xil_printf("Successfully ran OSD driver Selftest Example\r\n");
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function does a minimal test on the OSD driver.
|
||||
*
|
||||
* @param DeviceId is an ID of OSD core or device.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if successful.
|
||||
* - XST_FAILURE if unsuccessful.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsdSelfTestExample(u16 DeviceId)
|
||||
{
|
||||
int Status;
|
||||
XOsd_Config *Config;
|
||||
|
||||
/* Initialize the OSD driver so that it's ready to use look up the
|
||||
* configuration in the config table, then initialize it.
|
||||
*/
|
||||
Config = XOsd_LookupConfig(DeviceId);
|
||||
|
||||
if (NULL == Config) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
Status = XOsd_CfgInitialize(&OsdInst, Config, Config->BaseAddress);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
/* Perform a self-test to check hardware build. */
|
||||
Status = XOsd_SelfTest(&OsdInst);
|
||||
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
|
||||
return XST_SUCCESS;
|
||||
}
|
|
@ -1,29 +1,29 @@
|
|||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling osd"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
COMPILER=
|
||||
ARCHIVER=
|
||||
CP=cp
|
||||
COMPILER_FLAGS=
|
||||
EXTRA_COMPILER_FLAGS=
|
||||
LIB=libxil.a
|
||||
LEVEL=0
|
||||
|
||||
RELEASEDIR=../../../lib
|
||||
INCLUDEDIR=../../../include
|
||||
INCLUDES=-I./. -I${INCLUDEDIR}
|
||||
|
||||
INCLUDEFILES=*.h
|
||||
LIBSOURCES=*.c
|
||||
|
||||
OUTS = *.o
|
||||
|
||||
libs:
|
||||
echo "Compiling osd"
|
||||
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
|
||||
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
|
||||
make clean
|
||||
|
||||
include:
|
||||
${CP} $(INCLUDEFILES) $(INCLUDEDIR)
|
||||
|
||||
clean:
|
||||
rm -rf ${OUTS}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,191 +1,162 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_g.c
|
||||
*
|
||||
* This file contains a template for configuration table of Xilinx MVI Video
|
||||
* On-Screen-Display (OSD) devices. For a real hardware system, Xilinx Platform
|
||||
* Studio (XPS) will automatically generate a real configuration table to match
|
||||
* the configuration of the OSD devices.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
|
||||
/**
|
||||
* The configuration table for On-Screen-Display devices
|
||||
*/
|
||||
XOSD_Config XOSD_ConfigTable[] =
|
||||
{
|
||||
{
|
||||
XPAR_OSD_0_DEVICE_ID,
|
||||
XPAR_OSD_0_BASEADDR,
|
||||
XPAR_OSD_0_NUM_LAYERS,
|
||||
XPAR_OSD_0_S_AXIS_VIDEO_DATA_WIDTH,
|
||||
|
||||
XPAR_OSD_0_LAYER0_TYPE,
|
||||
XPAR_OSD_0_LAYER1_TYPE,
|
||||
XPAR_OSD_0_LAYER2_TYPE,
|
||||
XPAR_OSD_0_LAYER3_TYPE,
|
||||
XPAR_OSD_0_LAYER4_TYPE,
|
||||
XPAR_OSD_0_LAYER5_TYPE,
|
||||
XPAR_OSD_0_LAYER6_TYPE,
|
||||
XPAR_OSD_0_LAYER7_TYPE,
|
||||
|
||||
XPAR_OSD_0_LAYER0_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER0_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER0_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER0_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER0_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER0_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER0_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER0_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER0_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER0_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER0_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER0_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER0_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER1_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER1_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER1_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER1_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER1_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER1_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER1_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER1_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER1_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER1_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER1_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER1_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER1_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER2_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER2_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER2_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER2_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER2_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER2_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER2_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER2_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER2_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER2_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER2_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER2_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER2_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER3_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER3_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER3_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER3_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER3_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER3_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER3_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER3_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER3_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER3_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER3_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER3_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER3_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER4_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER4_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER4_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER4_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER4_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER4_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER4_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER4_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER4_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER4_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER4_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER4_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER4_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER5_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER5_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER5_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER5_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER5_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER5_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER5_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER5_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER5_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER5_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER5_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER5_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER5_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER6_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER6_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER6_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER6_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER6_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER6_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER6_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER6_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER6_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER6_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER6_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER6_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER6_TEXT_MAX_STRING_LENGTH,
|
||||
|
||||
XPAR_OSD_0_LAYER7_IMEM_SIZE,
|
||||
XPAR_OSD_0_LAYER7_INS_BOX_EN,
|
||||
XPAR_OSD_0_LAYER7_INS_LINE_EN,
|
||||
XPAR_OSD_0_LAYER7_INS_TEXT_EN,
|
||||
XPAR_OSD_0_LAYER7_CLUT_SIZE,
|
||||
XPAR_OSD_0_LAYER7_CLUT_MEMTYPE,
|
||||
XPAR_OSD_0_LAYER7_FONT_NUM_CHARS,
|
||||
XPAR_OSD_0_LAYER7_FONT_WIDTH,
|
||||
XPAR_OSD_0_LAYER7_FONT_HEIGHT,
|
||||
XPAR_OSD_0_LAYER7_FONT_BPP,
|
||||
XPAR_OSD_0_LAYER7_FONT_ASCII_OFFSET,
|
||||
XPAR_OSD_0_LAYER7_TEXT_NUM_STRINGS,
|
||||
XPAR_OSD_0_LAYER7_TEXT_MAX_STRING_LENGTH
|
||||
}
|
||||
};
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "xparameters.h"
|
||||
#include "xosd.h"
|
||||
|
||||
/*
|
||||
* The configuration table for devices
|
||||
*/
|
||||
|
||||
XOsd_Config XOsd_ConfigTable[] =
|
||||
{
|
||||
{
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_DEVICE_ID,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_BASEADDR,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_NUM_LAYERS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_S_AXIS_VIDEO_DATA_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER0_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER1_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER2_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER3_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER4_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER5_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER6_TEXT_MAX_STRING_LENGTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_IMEM_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_INS_BOX_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_INS_LINE_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_INS_TEXT_EN,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_CLUT_SIZE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_CLUT_MEMTYPE,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_NUM_CHARS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_WIDTH,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_HEIGHT,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_BPP,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_FONT_ASCII_OFFSET,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TEXT_NUM_STRINGS,
|
||||
XPAR_HDMI_OUTPUT_V_OSD_1_LAYER7_TEXT_MAX_STRING_LENGTH
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,193 +1,210 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_intr.c
|
||||
*
|
||||
* This code contains interrupt related functions of Xilinx MVI Video
|
||||
* On-Screen-Display device driver. Please see xosd.h for more details of
|
||||
* the driver.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating
|
||||
* basic types, MB cache functions, exceptions and
|
||||
* assertions to xil_io format.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the On-Screen-Display driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XOSD_SetCallBack() during initialization phase. An example delivered with
|
||||
* this driver demonstrates how this could be done.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOSD instance that just interrupted.
|
||||
* @return None.
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XOSD_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XOSD *XOSDPtr;
|
||||
|
||||
XOSDPtr = (XOSD *)InstancePtr;
|
||||
|
||||
/* Validate parameters */
|
||||
Xil_AssertVoid(XOSDPtr != NULL);
|
||||
Xil_AssertVoid(XOSDPtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
|
||||
/* Get pending interrupts */
|
||||
PendingIntr = XOSD_IntrGetPending(XOSDPtr);
|
||||
|
||||
/* Clear pending interrupts */
|
||||
XOSD_IntrClear(XOSDPtr, PendingIntr);
|
||||
|
||||
/* Error interrupt is occurring or spurious interrupt */
|
||||
if ((0 == (PendingIntr & XOSD_IXR_ALLINTR_MASK)) ||
|
||||
(PendingIntr & XOSD_IXR_ALLIERR_MASK)) {
|
||||
|
||||
ErrorStatus = PendingIntr & XOSD_IXR_ALLIERR_MASK;
|
||||
XOSDPtr->ErrCallBack(XOSDPtr->ErrRef, ErrorStatus);
|
||||
|
||||
/* The Error CallBack should reset the device and so
|
||||
* there is no need to handle other interrupts
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/* A VBI Start has happened */
|
||||
if ((PendingIntr & XOSD_IXR_VBIS_MASK))
|
||||
XOSDPtr->VbiStartCallBack(XOSDPtr->VbiStartRef);
|
||||
|
||||
/* A VBI End has happened */
|
||||
if ((PendingIntr & XOSD_IXR_VBIE_MASK))
|
||||
XOSDPtr->VbiEndCallBack(XOSDPtr->VbiEndRef);
|
||||
|
||||
/* A Frame Done interrupt has happened */
|
||||
if ((PendingIntr & XOSD_IXR_FD_MASK))
|
||||
XOSDPtr->FrameDoneCallBack(XOSDPtr->FrameDoneRef);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- ---------------------------
|
||||
* XOSD_HANDLER_VBISTART XOSD_CallBack
|
||||
* XOSD_HANDLER_VBIEND XOSD_CallBack
|
||||
* XOSD_HANDLER_FRAMEDONE XOSD_CallBack
|
||||
* XOSD_HANDLER_ERROR XOSD_ErrCallBack
|
||||
*
|
||||
* HandlerType Invoked by this driver when:
|
||||
* ----------------------- --------------------------------------------------
|
||||
* XOSD_HANDLER_VBISTART A Vertical Blank Interval Start Interrupt happens
|
||||
* XOSD_HANDLER_VBIEND A Vertical Blank Interval End Interrupt happens
|
||||
* XOSD_HANDLER_FRAMEDONE A Frame Done Interrupt happens
|
||||
* XOSD_HANDLER_ERROR An error condition happens
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOSD instance to be worked on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallbackFunc is the address of the callback function.
|
||||
* @param CallbackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note
|
||||
* Invoking this function for a handler that already has been installed replaces
|
||||
* it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOSD_SetCallBack(XOSD *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
|
||||
switch (HandlerType) {
|
||||
case XOSD_HANDLER_VBISTART:
|
||||
InstancePtr->VbiStartCallBack = (XOSD_CallBack)CallBackFunc;
|
||||
InstancePtr->VbiStartRef = CallBackRef;
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_VBIEND:
|
||||
InstancePtr->VbiEndCallBack = (XOSD_CallBack)CallBackFunc;
|
||||
InstancePtr->VbiEndRef = CallBackRef;
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack = (XOSD_CallBack)CallBackFunc;
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack = (XOSD_ErrorCallBack)CallBackFunc;
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
break;
|
||||
|
||||
default:
|
||||
return XST_INVALID_PARAM;
|
||||
|
||||
}
|
||||
return XST_SUCCESS;
|
||||
}
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_intr.c
|
||||
*
|
||||
* This code contains interrupt related functions of Xilinx Video
|
||||
* On-Screen-Display core. Please see xosd.h for more details of
|
||||
* the driver.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release.
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating basic
|
||||
* types, MB cache functions, exceptions and assertions
|
||||
* to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_IntrHandler - > XOsd_IntrHandler.
|
||||
* XOSD_SetCallBack -> XOsd_SetCallBack.
|
||||
* Removed the following handlers:
|
||||
* XOSD_HANDLER_VBISTART, XOSD_HANDLER_VBIEND.
|
||||
* Added new handler XOSD_HANDLER_PROCSTART.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function is the interrupt handler for the On-Screen-Display driver.
|
||||
*
|
||||
* This handler reads the pending interrupt from the IER/ISR, determines the
|
||||
* source of the interrupts, calls according callbacks, and finally clears the
|
||||
* interrupts.
|
||||
*
|
||||
* The application is responsible for connecting this function to the interrupt
|
||||
* system. Application beyond this driver is also responsible for providing
|
||||
* callbacks to handle interrupts and installing the callbacks using
|
||||
* XOsd_SetCallBack() during initialization phase.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance that just
|
||||
* interrupted.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
void XOsd_IntrHandler(void *InstancePtr)
|
||||
{
|
||||
u32 PendingIntr;
|
||||
u32 ErrorStatus;
|
||||
XOsd *XOsdPtr = NULL;
|
||||
|
||||
XOsdPtr = (XOsd *)((void *)InstancePtr);
|
||||
|
||||
/* Validate arguments. */
|
||||
Xil_AssertVoid(XOsdPtr != NULL);
|
||||
Xil_AssertVoid(XOsdPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
|
||||
|
||||
/* Get pending interrupts. */
|
||||
PendingIntr = (u32)(XOsd_IntrGetPending(XOsdPtr));
|
||||
|
||||
/* Error interrupt is occurring or spurious interrupt. */
|
||||
if (((PendingIntr) & (XOSD_IXR_ERR_MASK)) ==
|
||||
((XOSD_IXR_ERR_MASK))) {
|
||||
ErrorStatus = (PendingIntr) & (XOSD_IXR_ERR_MASK);
|
||||
XOsdPtr->ErrCallBack(XOsdPtr->ErrRef, ErrorStatus);
|
||||
}
|
||||
|
||||
/* A Processing start interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_PROC_STARTED_MASK)) ==
|
||||
(XOSD_IXR_PROC_STARTED_MASK)) {
|
||||
XOsdPtr->ProcStartCallBack(XOsdPtr->ProcStartRef);
|
||||
}
|
||||
|
||||
/* A frame done interrupt has occurred. */
|
||||
if (((PendingIntr) & (XOSD_IXR_EOF_MASK)) ==
|
||||
(XOSD_IXR_EOF_MASK)) {
|
||||
XOsdPtr->FrameDoneCallBack(XOsdPtr->FrameDoneRef);
|
||||
}
|
||||
|
||||
/* Clear pending interrupts. */
|
||||
XOsd_IntrClear(XOsdPtr, PendingIntr);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This routine installs an asynchronous callback function for the given
|
||||
* HandlerType:
|
||||
*
|
||||
* <pre>
|
||||
* HandlerType Callback Function Type
|
||||
* ----------------------- -------------------------------
|
||||
* XOSD_HANDLER_PROCSTART StubCallBack
|
||||
* XOSD_HANDLER_FRAMEDONE StubCallBack
|
||||
* XOSD_HANDLER_ERROR StubErrCallBack
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance to be worked on.
|
||||
* @param HandlerType specifies which callback is to be attached.
|
||||
* @param CallBackFunc is the address of the callback function.
|
||||
* @param CallBackRef is a user data item that will be passed to the
|
||||
* callback function when it is invoked.
|
||||
*
|
||||
* @return - XST_SUCCESS when handler is installed.
|
||||
* - XST_INVALID_PARAM when HandlerType is invalid.
|
||||
*
|
||||
* @note Invoking this function for a handler that already has been
|
||||
* installed replaces it with the new handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SetCallBack(XOsd *InstancePtr, u32 HandlerType,
|
||||
void *CallBackFunc, void *CallBackRef)
|
||||
{
|
||||
int Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady ==
|
||||
(u32)(XIL_COMPONENT_IS_READY));
|
||||
Xil_AssertNonvoid(CallBackFunc != NULL);
|
||||
Xil_AssertNonvoid(CallBackRef != NULL);
|
||||
Xil_AssertNonvoid((HandlerType >= (u32)(XOSD_HANDLER_PROCSTART)) &&
|
||||
(HandlerType <= (u32)(XOSD_HANDLER_ERROR)));
|
||||
|
||||
/* Setting the HandlerType. */
|
||||
switch (HandlerType) {
|
||||
case XOSD_HANDLER_PROCSTART:
|
||||
InstancePtr->ProcStartCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ProcStartRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_FRAMEDONE:
|
||||
InstancePtr->FrameDoneCallBack =
|
||||
(XOsd_CallBack)((void *)CallBackFunc);
|
||||
InstancePtr->FrameDoneRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
case XOSD_HANDLER_ERROR:
|
||||
InstancePtr->ErrCallBack =
|
||||
(XOsd_ErrorCallBack)((void *)CallBackFunc);
|
||||
InstancePtr->ErrRef = CallBackRef;
|
||||
Status = (XST_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = (XST_INVALID_PARAM);
|
||||
break;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
107
XilinxProcessorIPLib/drivers/osd/src/xosd_selftest.c
Executable file
107
XilinxProcessorIPLib/drivers/osd/src/xosd_selftest.c
Executable file
|
@ -0,0 +1,107 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_selftest.c
|
||||
*
|
||||
* This file contains the self-test function for the OSD core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- --------------------------------------------------
|
||||
* 4.0 adk 02/18/14 First Release.
|
||||
* Implemented the following functions:
|
||||
* XOsd_SelfTest.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function reads Version register of OSD core and compares with zero
|
||||
* as part of self test.
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XOsd instance.
|
||||
*
|
||||
* @return - XST_SUCCESS if the Version register read test was successful.
|
||||
* - XST_FAILURE if the Version register read test failed.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
int XOsd_SelfTest(XOsd *InstancePtr)
|
||||
{
|
||||
u32 Version;
|
||||
int Status;
|
||||
|
||||
/* Verify argument. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
|
||||
/* Read OSD core Version register. */
|
||||
Version = XOsd_ReadReg(InstancePtr->Config.BaseAddress,
|
||||
(XOSD_VER_OFFSET));
|
||||
|
||||
/* Compare Version with zero. */
|
||||
if (Version != (u32)0x0) {
|
||||
Status = (XST_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Status = (XST_FAILURE);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
|
@ -1,98 +1,109 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* Use of the Software is limited solely to applications:
|
||||
* (a) running on a Xilinx device, or
|
||||
* (b) that interact with a Xilinx device through a bus or interconnect.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of the Xilinx shall not be used
|
||||
* in advertising or otherwise to promote the sale, use or other dealings in
|
||||
* this Software without prior written authorization from Xilinx.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_sinit.c
|
||||
*
|
||||
* This file contains the static initialization method for Xilinx MVI Video
|
||||
* On-Screen-Display (OSD) device driver.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ---- -------- -------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating
|
||||
* basic types, MB cache functions, exceptions and
|
||||
* assertions to xil_io format.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
* XOSD_LookupConfig returns a reference to an XOSD_Config structure
|
||||
* based on the unique device id, <i>DeviceId</i>. The return value will refer
|
||||
* to an entry in the device configuration table defined in the xosd_g.c
|
||||
* file.
|
||||
*
|
||||
* @param DeviceId is the unique device ID of the device for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XOSD_LookupConfig returns a reference to a config record in the
|
||||
* configuration table (in xosd_g.c) corresponding to <i>DeviceId</i>,
|
||||
* or NULL if no match is found.
|
||||
*
|
||||
******************************************************************************/
|
||||
XOSD_Config *XOSD_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XOSD_Config XOSD_ConfigTable[];
|
||||
XOSD_Config *CfgPtr = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < XPAR_XOSD_NUM_INSTANCES; i++) {
|
||||
if (XOSD_ConfigTable[i].DeviceId == DeviceId) {
|
||||
CfgPtr = &XOSD_ConfigTable[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (CfgPtr);
|
||||
}
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file xosd_sinit.c
|
||||
*
|
||||
* This file contains the static initialization method for Xilinx Video
|
||||
* On-Screen-Display (OSD) core.
|
||||
*
|
||||
* <pre>
|
||||
* MODIFICATION HISTORY:
|
||||
*
|
||||
* Ver Who Date Changes
|
||||
* ----- ------ -------- ------------------------------------------------------
|
||||
* 1.00a xd 08/18/08 First release
|
||||
* 2.00a cjm 12/18/12 Converted from xio.h to xil_io.h, translating
|
||||
* basic types, MB cache functions, exceptions and
|
||||
* assertions to xil_io format.
|
||||
* 4.0 adk 02/18/14 Renamed the following functions:
|
||||
* XOSD_LookupConfig - > XOsd_LookupConfig
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/***************************** Include Files *********************************/
|
||||
|
||||
#include "xosd.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
|
||||
|
||||
/************************** Function Prototypes ******************************/
|
||||
|
||||
|
||||
/************************** Variable Definitions *****************************/
|
||||
|
||||
|
||||
/************************** Function Definitions *****************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/**
|
||||
*
|
||||
* This function gets a reference to an XOsd_Config structure based on the
|
||||
* unique device id, <i>DeviceId</i>. The return value will refer to an entry
|
||||
* in the core configuration table defined in the xosd_g.c file.
|
||||
*
|
||||
* @param DeviceId is the unique core ID of the OSD core for the lookup
|
||||
* operation.
|
||||
*
|
||||
* @return XOsd_Config is a reference to a config record in the
|
||||
* configuration table (in xosd_g.c) corresponding to
|
||||
* <i>DeviceId</i> or NULL if no match is found.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
******************************************************************************/
|
||||
XOsd_Config *XOsd_LookupConfig(u16 DeviceId)
|
||||
{
|
||||
extern XOsd_Config XOsd_ConfigTable[XPAR_XOSD_NUM_INSTANCES];
|
||||
XOsd_Config *CfgPtr = NULL;
|
||||
u32 Index;
|
||||
|
||||
for (Index = (u32)0x0; Index < (u32)(XPAR_XOSD_NUM_INSTANCES);
|
||||
Index++) {
|
||||
if (XOsd_ConfigTable[Index].DeviceId == DeviceId) {
|
||||
CfgPtr = &XOsd_ConfigTable[Index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (XOsd_Config *)CfgPtr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue