v_vcresampler: Update tcl to include model parameters
Updated the tcl and mdd files to define model parameters. Updated the code to use new parameters instead of hard-coded values defined earlier Signed-off-by: Rohit Consul <rohit.consul@xilinx.com>
This commit is contained in:
parent
68e90be08d
commit
ebb231f6f7
4 changed files with 48 additions and 7 deletions
|
@ -11,6 +11,7 @@ BEGIN driver v_vcresampler
|
|||
|
||||
OPTION supported_peripherals = (v_vcresampler_v1_0 );
|
||||
OPTION driver_state = ACTIVE;
|
||||
OPTION DEPENDS = (video_common_v1_1);
|
||||
OPTION copyfiles = all;
|
||||
OPTION name = v_vcresampler;
|
||||
OPTION version = 1.0;
|
||||
|
|
|
@ -10,14 +10,33 @@ proc generate {drv_handle} {
|
|||
"NUM_INSTANCES" \
|
||||
"DEVICE_ID" \
|
||||
"C_S_AXI_CTRL_BASEADDR" \
|
||||
"C_S_AXI_CTRL_HIGHADDR"
|
||||
"C_S_AXI_CTRL_HIGHADDR" \
|
||||
"SAMPLES_PER_CLOCK" \
|
||||
"MAX_COLS" \
|
||||
"MAX_ROWS" \
|
||||
"MAX_DATA_WIDTH" \
|
||||
"CONVERT_TYPE" \
|
||||
"NUM_V_TAPS"
|
||||
|
||||
xdefine_config_file $drv_handle "xv_vcresampler_g.c" "XV_vcresampler" \
|
||||
"DEVICE_ID" \
|
||||
"C_S_AXI_CTRL_BASEADDR"
|
||||
"C_S_AXI_CTRL_BASEADDR" \
|
||||
"SAMPLES_PER_CLOCK" \
|
||||
"MAX_COLS" \
|
||||
"MAX_ROWS" \
|
||||
"MAX_DATA_WIDTH" \
|
||||
"CONVERT_TYPE" \
|
||||
"NUM_V_TAPS"
|
||||
|
||||
xdefine_canonical_xpars $drv_handle "xparameters.h" "XV_vcresampler" \
|
||||
"DEVICE_ID" \
|
||||
"C_S_AXI_CTRL_BASEADDR" \
|
||||
"C_S_AXI_CTRL_HIGHADDR"
|
||||
"C_S_AXI_CTRL_HIGHADDR" \
|
||||
"SAMPLES_PER_CLOCK" \
|
||||
"MAX_COLS" \
|
||||
"MAX_ROWS" \
|
||||
"MAX_DATA_WIDTH" \
|
||||
"CONVERT_TYPE" \
|
||||
"NUM_V_TAPS"
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
/***************************** Include Files *********************************/
|
||||
#include "xv_vcresampler.h"
|
||||
#include "string.h"
|
||||
|
||||
/************************** Function Implementation *************************/
|
||||
#ifndef __linux__
|
||||
|
@ -14,6 +15,11 @@ int XV_vcresampler_CfgInitialize(XV_vcresampler *InstancePtr, XV_vcresampler_Con
|
|||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(ConfigPtr != NULL);
|
||||
|
||||
/* Setup the instance */
|
||||
(void)memset((void *)InstancePtr, 0, sizeof(XV_vcresampler));
|
||||
(void)memcpy((void *)&(InstancePtr->Config), (const void *)ConfigPtr,
|
||||
sizeof(XV_vcresampler_Config));
|
||||
|
||||
InstancePtr->Ctrl_BaseAddress = ConfigPtr->Ctrl_BaseAddress;
|
||||
InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
|
||||
|
||||
|
|
|
@ -38,15 +38,30 @@ typedef uint8_t u8;
|
|||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
#else
|
||||
/**
|
||||
* This typedef contains configuration information for the vertical
|
||||
* chroma resampler core. Each core instance should have a configuration
|
||||
* structure associated.
|
||||
*/
|
||||
typedef struct {
|
||||
u16 DeviceId;
|
||||
u32 Ctrl_BaseAddress;
|
||||
u16 DeviceId; /**< Unique ID of device */
|
||||
u32 Ctrl_BaseAddress; /**< The base address of the core instance. */
|
||||
int PixPerClk; /**< Samples Per Clock supported by core instance */
|
||||
u16 MaxWidth; /**< Maximum columns supported by core instance */
|
||||
u16 MaxHeight; /**< Maximum rows supported by core instance */
|
||||
int MaxDataWidth; /**< Maximum Data width of each channel */
|
||||
int ResamplingType; /**< Resampling Method selected */
|
||||
u8 NumTaps; /**< Number of filter taps */
|
||||
} XV_vcresampler_Config;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Driver instance data. An instance must be allocated for each core in use.
|
||||
*/
|
||||
typedef struct {
|
||||
u32 Ctrl_BaseAddress;
|
||||
u32 IsReady;
|
||||
XV_vcresampler_Config Config; /**< Hardware Configuration */
|
||||
u32 Ctrl_BaseAddress; /**< The base address of the core instance. */
|
||||
u32 IsReady; /**< Device is initialized and ready */
|
||||
} XV_vcresampler;
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions *********************/
|
||||
|
|
Loading…
Add table
Reference in a new issue