• 大小: 27.24MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-28
  • 语言: 其他
  • 标签: zedboard  

资源简介

基于Vivado HLS在zedboard中的Sobel滤波算法实现 代码

资源截图

代码片段和文件信息

// ==============================================================
// File generated by AutoESL - High-Level Synthesis System (C C++ SystemC)
// Version: 2012.1
// Copyright (C) 2012 Xilinx Inc. All rights reserved.
// 
// ==============================================================

/***************************** Include Files *********************************/
#include “xsobel_filter.h“

/************************** Function Implementation *************************/
int XSobel_filter_Initialize(XSobel_filter *InstancePtr XSobel_filter_Config *ConfigPtr) {
    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(ConfigPtr != NULL);

    InstancePtr->Control_bus_baseAddress = ConfigPtr->Control_bus_baseAddress;
    InstancePtr->IsReady = XIL_COMPONENT_IS_READY;

    return XST_SUCCESS;
}

void XSobel_filter_Start(XSobel_filter *InstancePtr) {
    Xil_AssertVoid(InstancePtr != NULL);
    Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    XSobel_filter_WriteReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_AP_CTRL 1);
}

u32 XSobel_filter_IsDone(XSobel_filter *InstancePtr) {
    u32 Data;

    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    Data = XSobel_filter_ReadReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_AP_CTRL);
    return (Data >> 1) & 0x1;
}

u32 XSobel_filter_IsIdle(XSobel_filter *InstancePtr) {
    u32 Data;

    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    Data = XSobel_filter_ReadReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_AP_CTRL);
    return (Data >> 2) & 0x1;
}

void XSobel_filter_SetRows(XSobel_filter *InstancePtr u32 Data) {
    Xil_AssertVoid(InstancePtr != NULL);
    Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    XSobel_filter_WriteReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_ROWS_DATA Data);
}

u32 XSobel_filter_GetRows(XSobel_filter *InstancePtr) {
    u32 Data;

    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    Data = XSobel_filter_ReadReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_ROWS_DATA);
    return Data;
}

void XSobel_filter_SetCols(XSobel_filter *InstancePtr u32 Data) {
    Xil_AssertVoid(InstancePtr != NULL);
    Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    XSobel_filter_WriteReg(InstancePtr->Control_bus_baseAddress XSOBEL_FILTER_CONTROL_BUS_ADDR_COLS_DATA Data);
}

u32 XSobel_filter_GetCols(XSobel_filter *InstancePtr) {
    u32 Data;

    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

    Data = XSobel_filter_ReadReg(InstancePtr->Control_bus_baseAddress XSOB

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-21 19:33  upload\
     目录           0  2013-01-04 04:24  upload\base_cf\
     目录           0  2012-12-21 19:31  upload\base_cf\cf_adv7511_zed\
     目录           0  2012-12-21 20:24  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\
     文件        8791  2012-11-29 22:52  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\bitinit.log
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\blockdiagram\
     文件           0  2012-11-27 17:19  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\blockdiagram\system.jpg
     文件       59101  2012-11-27 17:19  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\blockdiagram\system.svg
     文件         418  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\clock_generator_0.log
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\data\
     文件       13832  2012-12-21 20:22  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\data\ps7_constraints.ucf
     文件       29123  2012-12-21 20:22  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\data\ps7_constraints.xdc
     文件       10832  2012-11-27 17:32  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\data\ps7_system_prj.xml
     文件        1625  2012-11-29 17:37  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\data\system.ucf
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\
     文件          39  2012-11-27 17:19  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\bitgen.ut
     文件           0  2012-11-27 17:19  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\download.cmd
     文件        2794  2012-11-27 17:19  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\fast_runtime.opt
     文件        8573  2012-12-21 20:23  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\system.filters
     文件       13978  2012-12-21 20:23  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\etc\system.gui
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\elaborate\
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\elaborate\clock_generator_0_v4_03_a\
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\elaborate\clock_generator_0_v4_03_a\hdl\
     目录           0  2012-12-21 19:30  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\elaborate\clock_generator_0_v4_03_a\hdl\vhdl\
     文件       38276  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\elaborate\clock_generator_0_v4_03_a\hdl\vhdl\clock_generator.vhd
     文件      165929  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\system.vhd
     文件        3979  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\system_axi_clkgen_0_wrapper.vhd
     文件       35663  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\system_axi_filter_wrapper.v
     文件        6063  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\system_axi_hdmi_tx_16b_0_wrapper.vhd
     文件       35652  2012-11-29 22:11  upload\base_cf\cf_adv7511_zed\cf_adv7511_zed\hdl\system_axi_hdmi_wrapper.v
............此处省略3061个文件信息

评论

共有 条评论