| |||
1、先在最左边菜单栏里选择IP Catalog新建一个HDMI 1.4/2.0 Transmitter Subsystem,并配置好参数;
2、右击刚建好的IP,选择Open IP Example Design,会重新生成一个名为v_hdmi_tx_ss_0_ex的工程;
3、修改Project part,在左边菜单栏的settings中,将Project device中换成xcku115-flvb2104-1-c;
4、修改完芯片型号之后会有部分信号线缺失,并且部分IP的配置会发生改变,这里需要核对原工程将修改的部分补全;(IP is locked)(tcl: report_ip_status -name ip_status_1);
5、补全之后直接可以综合;
6、修改约束文件,然后进行实现;
set_property PACKAGE_PIN E36 [get_ports default_sysclk_300_clk_p]
set_property PACKAGE_PIN D36 [get_ports default_sysclk_300_clk_n]
set_property LOC AP11 [get_ports {DRU_CLK_IN_clk_p[0]}]
set_property LOC AP10 [get_ports {DRU_CLK_IN_clk_n[0]}]
这里对应工程需要修改的
create_clock -name dru_mgt_refclk -period 6.400 [get_ports DRU_CLK_IN_clk_p]
时钟约束不写会有严重警告
set_property PACKAGE_PIN AW15 [get_ports fmch_iic_scl_io]
set_property PACKAGE_PIN BE16 [get_ports fmch_iic_sda_io]
set_property LOC AW9 [get_ports HDMI_RX_CLK_P_IN]
set_property LOC AW8 [get_ports HDMI_RX_CLK_N_IN]
create_clock -name rx_mgt_refclk -period 3.367 [get_ports HDMI_RX_CLK_P_IN]
时钟约束不写会有严重警告
set_property LOC BC2 [get_ports {HDMI_RX_DAT_P_IN[0]}]
set_property LOC BC1 [get_ports {HDMI_RX_DAT_N_IN[0]}]
set_property LOC BA2 [get_ports {HDMI_RX_DAT_P_IN[1]}]
set_property LOC BA1 [get_ports {HDMI_RX_DAT_N_IN[1]}]
set_property LOC AW4 [get_ports {HDMI_RX_DAT_P_IN[2]}]
set_property LOC AW3 [get_ports {HDMI_RX_DAT_N_IN[2]}]
set_property PACKAGE_PIN AY13 [get_ports HDMI_TX_CLK_P_OUT]
set_property PACKAGE_PIN BA13 [get_ports HDMI_TX_CLK_N_OUT]
set_property PACKAGE_PIN AR15 [get_ports LED0]
set_property PACKAGE_PIN BC7 [get_ports reset]
set_property PACKAGE_PIN L32 [get_ports rs232_uart_rxd]
set_property PACKAGE_PIN H31 [get_ports rs232_uart_txd]
set_property PACKAGE_PIN AY15 [get_ports RX_DDC_OUT_sda_io]
set_property PACKAGE_PIN AR16 [get_ports RX_DDC_OUT_scl_io]
set_property PACKAGE_PIN AP13 [get_ports RX_DET_IN]
set_property PACKAGE_PIN AV14 [get_ports {RX_HPD_OUT[0]}]
set_property PACKAGE_PIN AW14 [get_ports RX_REFCLK_P_OUT]
set_property PACKAGE_PIN AW13 [get_ports RX_REFCLK_N_OUT]
set_property PACKAGE_PIN BB15 [get_ports SI5324_LOL_IN]
set_property PACKAGE_PIN BF13 [get_ports {SI5324_RST_OUT[0]}]
set_property PACKAGE_PIN BA14 [get_ports TX_DDC_OUT_scl_io]
set_property PACKAGE_PIN BF15 [get_ports TX_DDC_OUT_sda_io]
set_property PACKAGE_PIN AV13 [get_ports {TX_EN_OUT[0]}]
set_property PACKAGE_PIN BE15 [get_ports TX_HPD_IN]
set_property LOC AV11 [get_ports TX_REFCLK_P_IN]
set_property LOC AV10 [get_ports TX_REFCLK_N_IN]
create_clock -name tx_mgt_refclk -period 3.367 [get_ports TX_REFCLK_P_IN]
时钟约束不写会有严重警告
set_property PACKAGE_PIN AM14 [get_ports {TX_CLKSEL_OUT[0]}]
set_property PACKAGE_PIN AU16 [get_ports {RX_I2C_EN_N_OUT[0]}]
set_property LOC BF5 [get_ports {HDMI_TX_DAT_P_OUT[0]}]
set_property LOC BF4 [get_ports {HDMI_TX_DAT_N_OUT[0]}]
set_property LOC BD5 [get_ports {HDMI_TX_DAT_P_OUT[1]}]
set_property LOC BD4 [get_ports {HDMI_TX_DAT_N_OUT[1]}]
set_property LOC BB5 [get_ports {HDMI_TX_DAT_P_OUT[2]}]
set_property LOC BB4 [get_ports {HDMI_TX_DAT_N_OUT[2]}]
set_property IOSTANDARD LVDS [get_ports default_sysclk_300_clk_p]
set_property IOSTANDARD LVDS [get_ports HDMI_TX_CLK_P_OUT]
set_property IOSTANDARD LVDS [get_ports RX_REFCLK_P_OUT]
差分信号
set_property IOSTANDARD LVCMOS18 [get_ports fmch_iic_scl_io]
set_property IOSTANDARD LVCMOS18 [get_ports fmch_iic_sda_io]
set_property IOSTANDARD LVCMOS18 [get_ports LED0]
set_property IOSTANDARD LVCMOS18 [get_ports reset]
set_property IOSTANDARD LVCMOS18 [get_ports rs232_uart_rxd]
set_property IOSTANDARD LVCMOS18 [get_ports rs232_uart_txd]
set_property IOSTANDARD LVCMOS18 [get_ports RX_DDC_OUT_scl_io]
set_property IOSTANDARD LVCMOS18 [get_ports RX_DDC_OUT_sda_io]
set_property IOSTANDARD LVCMOS18 [get_ports RX_DET_IN]
set_property IOSTANDARD LVCMOS18 [get_ports {RX_HPD_OUT[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports {RX_I2C_EN_N_OUT[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports SI5324_LOL_IN]
set_property IOSTANDARD LVCMOS18 [get_ports {SI5324_RST_OUT[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports {TX_CLKSEL_OUT[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports TX_DDC_OUT_scl_io]
set_property IOSTANDARD LVCMOS18 [get_ports TX_DDC_OUT_sda_io]
set_property IOSTANDARD LVCMOS18 [get_ports {TX_EN_OUT[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports TX_HPD_IN]
7、申请license,然后生成比特流文件,需要本机的HOST NAME和HOST ID,关于HDMI的license只有一个,没其他的选择,添加进vivado就行了,然后需要对工程中的所有IP进行OOC综合,从头编译。
2、软件实现1、导出硬件设计,在HDMI工程的vivado界面中点击File - Export - Export Hardware,然后点击OK,这会导出一个硬件定义文件,该文件通常存在于工程的根目录中;
2、在Vivado的Tcl操作台中输入命令,用于生成Vitis工作台的文件夹;
$ mkdir vitis_workspace
3、在Vivado的Tcl操作台中输入命令,于vitis_workspace文件夹下执行Vitis IDE;
$ cd vitis_workspace
$ vitis &
4、在Vitis IDE中创建一个新工程,点击File - New - Platform Project;
5、设置工程名并点选下一步;
6、选择Create from hardware specification (XSA)并选择next;
7、选择HDMI 2.0 Example Design根目录下的XSA文件,然后选择Finish;
8、建立并生成平台,右击创建的应用工程,选择Build Project;
9、在platform.spr页面,选择菜单栏中的Board Support Package,然后点开Peripheral Drivers的扩展栏;
10、找到v_hdmi_rx_ss或者v_hdmi_tx_ss,然后选择Import Examples;
11、因为使用的是软核MicroBlaze,所以选择Passthrough_Microblaze,然后选OK;
12、建立应用,生成ELF文件。
3、调试1、打开调试终端;
2、进入工程目录
cd C:/Users/jyh12138/Desktop/Project/HDMI/K115/v_hdmi_tx_ss_0_ex
3、进入Debugger模式;
xsdb
4、连接开发板
connect
5、下载比特流文件
FPGA -no-revision-check -file ./v_hdmi_tx_ss_0_ex.runs/impl_1/exdes_wrapper.bit
6、查询可连接目标
Target
7、连接MicroBlaze
target -set 3
8、下载ELF文件
dow ./vitis_workspace/Passthrough_Microblaze_1/Debug/Passthrough_Microblaze_1.elf
9、调试
9-1 停止指令stop
9-2 复位指令rst
9-3 继续执行指令con
9-4 断点添加指令bpadd
9-5 断点移除指令bpremove
9-6 断点列表bplist
9-7 单步调试指令nxt
现在主函数处打断点,看程序是否能进主函数;
con指令停在断点处,没问题,继续执行;
串口显示数据
显示器的具体情况