GTP+SDI工程播出部分思路整理

1.video_out_to_sdi模块

关于video_out_to_sdi模块的输出信号:

tx_video_a_y[9:0]

这是要输入SDI IP核内的

tx_video_a_c[9:0]

同样是要输入给SDI 核内的,需要重点关注SDI播出工程中有关这两个信号线的连接情况。

tx_ce_sd

时钟使能

Vid_ce[1:0]

Tx_din_rdy

2.SDI工程

查阅x7gtx_sdi_wrapper模块:

module x7gtx_sdi_wrapper #(
parameter FXDCLK_FREQ = , // Frequency, in hertz, of fixed frequency clock
parameter DRPCLK_PERIOD = , // Period of drpclk in ns, always round down
parameter PLLLOCK_TIMEOUT_PERIOD = , // Period of PLLLOCK timeout in ns, defaults to 2ms
parameter RESET_TIMEOUT_PERIOD = , // Period of GTH RESETDONE timeout in ns, defaults to 500us
parameter TIMEOUT_CNTR_BITWIDTH = , // Width in bits of timeout counter
parameter RETRY_CNTR_BITWIDTH = , // Width in bits of the retry counter
parameter CPLL_REFCLK_PORT = "REFCLK1", // Options are REFCLK0, REFCLK1, GREFCLK, NORTH0, NORTH1, SOUTH0, SOUTH1
parameter TX_CLK0_QPLL = , // Set to 1 if QPLL is TX serial clock source with tx_m = 0, else set to 0
parameter TX_CLK1_QPLL = , // Set to 1 if QPLL is TX serial clock source with tx_m = 1, else set to 0
parameter GT_SIM_GTRESET_SPEEDUP = "FALSE")
(
input wire clk, // fixed frequency clock for GTX control module
input wire drpclk, // DRPCLK
input wire qpllclk, // connect to the GTXE2_COMMON qplloutclk
input wire qpllrefclk, // Connect to the GTXE2_COMMON qplloutrefclk
output wire qpllreset,
input wire qplllock,
input wire cpllrefclk,
output wire cplllock,
input wire rxp,
input wire rxn,
output wire txp,
output wire txn, // RX ports
input wire rx_rst, // sync reset for SDI RX pipeline
output wire rx_usrclk_out, // rxusrclk input
input wire rx_gtx_full_reset, // 1 causes a full reset of GTX RX, including the QPLL (drpclk)
input wire rx_gtx_reset, // 1 causes a GTRXRESET cycle to occur (drpclk)
input wire rx_refclk_stable, // input must be low until reference clock to QPLLis stable (async)
input wire rx_frame_en, // 1 = enable framer position update
input wire [:] rx_mode_en, // unary enable bits for SDI mode search {3G, SD, HD} 1=enable, 0=disable
output wire [:] rx_mode, // 00=HD, 01=SD, 10=3G
output wire rx_mode_hd, // 1 = HD mode
output wire rx_mode_sd, // 1 = SD mode
output wire rx_mode_3g, // 1 = 3G mode
output wire rx_mode_locked, // auto mode detection locked
output wire rx_bit_rate, // 0 = 1000/1000, 1 = 1000/1001
output wire rx_t_locked, // transport format detection locked
output wire [:] rx_t_family, // transport format family
output wire [:] rx_t_rate, // transport frame rate
output wire rx_t_scan, // transport scan: 0=interlaced, 1=progressive
output wire rx_level_b_3g, // 0 = level A, 1 = level B
output wire rx_ce_sd, // clock enable for SD, always 1 for HD & 3G
output wire rx_nsp, // framer new start position
output wire [:] rx_line_a, // line number for HD & 3G (link A for level B)
output wire [:] rx_a_vpid, // payload ID packet ds1 for 3G or HD-SDI
output wire rx_a_vpid_valid, // 1 = rx_a_vpid is valid
output wire [:] rx_b_vpid, // video payload ID packet data from data stream 2
output wire rx_b_vpid_valid, // 1 = rx_b_vpid is valid
output wire rx_crc_err_a, // CRC error for HD & 3G
output wire [:] rx_ds1a, // data stream 1A: SD=Y/C, HD=Y, 3GA=ds1, 3GB=Y link A
output wire [:] rx_ds2a, // data stream 2A: HD=C, 3GA=ds2, 3GB=C link A
output wire rx_eav, // 1 during XYZ word of EAV
output wire rx_sav, // 1 during XYZ word of SAV
output wire rx_trs, // 1 during all 4 words of EAV and SAV
output wire [:] rx_line_b, // line number of 3G level B link B
output wire rx_dout_rdy_3g, // 3G data ready: 1 for level A, asserted every other clock for level B
output wire rx_crc_err_b, // CRC error for link B (level B only)
output wire [:] rx_ds1b, // data stream 1B: 3G level B only = Y link B
output wire [:] rx_ds2b, // data stream 2B: 3G level B only = C link B
input wire [:] rx_edh_errcnt_en, // enables various errors to increment rx_edh_errcnt
input wire rx_edh_clr_errcnt, // clears rx_edh_errcnt
output wire rx_edh_ap, // 1 = AP CRC error detected previous field
output wire rx_edh_ff, // 1 = FF CRC error detected previous field
output wire rx_edh_anc, // 1 = ANC checksum error detected
output wire [:] rx_edh_ap_flags, // EDH AP flags received in last EDH packet
output wire [:] rx_edh_ff_flags, // EDH FF flags received in last EDH packet
output wire [:] rx_edh_anc_flags, // EDH ANC flags received in last EDH packet
output wire [:] rx_edh_packet_flags, // EDH packet error condition flags
output wire [:] rx_edh_errcnt, // EDH error counter
output wire rx_change_done, // 1 indicates resets or dynamic SDI mode changes are complete (drpclk)
output wire rx_change_fail, // 1 indicates failure of a reset or dynamic SDI mode change (drpclk)
output wire [:] rx_change_fail_code, // if rx_change_fail is 1, this port indicates reason for failure (drpclk)
output wire drpbusy, // 1 when the SDI RX control logic is using the GTX DRP (drpclk) // TX ports
input wire tx_rst, // sync reset for SDI TX pipeline
output wire tx_usrclk_out, // clock input
input wire tx_gtx_full_reset, // causes a full reset of the GTH TX including PLL (drpclk)
input wire tx_gtx_reset, // causes a reset of the GTH TX, not including the PLL (drpclk)
input wire tx_refclk_stable, // assert high when reference clock to the TX PLL is stable (async)
input wire [:] tx_ce, // clock enable - 3 identical copies
input wire tx_din_rdy, // input data ready for level B, must be 1 for all other modes
input wire [:] tx_mode, // 00 = HD, 01 = SD, 10 = 3G
input wire tx_level_b_3g, // 0 = level A, 1 = level B
input wire tx_m, // 0 = select 148.5 MHz refclk, 1 = select 148.35 MHz refclk
input wire tx_insert_crc, // 1 = insert CRC for HD and 3G
input wire tx_insert_ln, // 1 = insert LN for HD and 3G
input wire tx_insert_edh, // 1 = generate & insert EDH for SD
input wire tx_insert_vpid, // 1 = enable ST352 PID packet insert
input wire tx_overwrite_vpid, // 1 = overwrite existing ST352 packets
input wire [:] tx_video_a_y_in, // Data stream Y link A input: SD Y/C, HD & 3GA Y in, 3GB A Y in
input wire [:] tx_video_a_c_in, // Data stream C link A input: HD & 3GA C in, 3GB A C in
input wire [:] tx_video_b_y_in, // 3G level B only: Data stream Y link B input
input wire [:] tx_video_b_c_in, // 3G level B only: Data stream C link B input
input wire [:] tx_line_a, // current line number for link A
input wire [:] tx_line_b, // current line number for link B
input wire [:] tx_vpid_byte1, // ST352 user data word 1
input wire [:] tx_vpid_byte2, // ST352 user data word 2
input wire [:] tx_vpid_byte3, // ST352 user data word 3
input wire [:] tx_vpid_byte4a, // ST352 user data word 4 for link A
input wire [:] tx_vpid_byte4b, // ST352 user data word 4 for link B
input wire [:] tx_vpid_line_f1, // insert ST352 packet on this line in field 1
input wire [:] tx_vpid_line_f2, // insert ST352 packet on this line in field 2
input wire tx_vpid_line_f2_en, // enable ST352 packet insertion in field 2
output wire [:] tx_ds1a_out, // data stream 1, link A out
output wire [:] tx_ds2a_out, // data stream 2, link A out
output wire [:] tx_ds1b_out, // data stream 1, link B out
output wire [:] tx_ds2b_out, // data stream 2, link B out
input wire tx_use_dsin, // 0=use the internal data streams, 1=use the tx_dsxx_in data streams
input wire [:] tx_ds1a_in, // data stream 1 link A in: SD Y/C, HD Y, 3G Y, dual-link A Y
input wire [:] tx_ds2a_in, // data stream 2 link A in: HD C, 3G C, dual-link A C
input wire [:] tx_ds1b_in, // data stream 1 link B in: dual-link B Y
input wire [:] tx_ds2b_in, // data stream 2 link B in: dual-link B C
output wire tx_ce_align_err, // 1 if ce 5/6/5/6 cadence is broken
output wire tx_slew, // slew rate control signal for SDI cable driver
output wire tx_change_done, // 1 when txrate or txsysclksel changes complete successfully (drpclk)
output wire tx_change_fail, // 1 when txrate or txsysclksel changes fail (drpclk)
output wire [:] tx_change_fail_code // failure code when tx_change_fail = 1 (drpclk)
);

TX ports部分信号定义如下:

input  wire         tx_rst,                 // sync reset for SDI TX pipeline

output wire         tx_usrclk_out,          // clock input

input  wire [:]   tx_ce,                  // clock enable - 3 identical copies

input  wire         tx_din_rdy,             // input data ready for level B, must be 1 for all other modes

input  wire [:]   tx_mode,                // 00 = HD, 01 = SD, 10 = 3G

input  wire         tx_level_b_3g,          // 0 = level A, 1 = level B

input  wire [:]   tx_video_a_y_in,        // Data stream Y link A input: SD Y/C, HD & 3GA Y in, 3GB A Y in

input  wire [:]   tx_video_a_c_in,        // Data stream C link A input: HD & 3GA C in, 3GB A C in

output wire [:]   tx_ds1a_out,            // data stream 1, link A out

output wire [:]   tx_ds1b_out,            // data stream 1, link B out

input  wire [:]   tx_ds1a_in,             // data stream 1 link A in: SD Y/C, HD Y, 3G Y, dual-link A Y

input  wire [:]   tx_ds1b_in,             // data stream 1 link B in: dual-link B Y

这是需要重点关注的。

本工程播出部分的视频数据是通过工程内部的video pattern generators来产生

//------------------------------------------------------------------------------
// Video pattern generators
//
multigenHD VIDGEN (
.clk (tx_usrclk),
.rst (tx_fabric_reset),
.ce ('b1),
.std (tx_fmt),
.pattern (tx_pat),
.user_opt ('b00),
.y (tx_hd_y),
.c (tx_hd_c),
.h_blank (),
.v_blank (),
.field (),
.trs (),
.xyz (),
.line_num (tx_line)); vidgen_ntsc NTSC (
.clk (tx_usrclk),
.rst (tx_fabric_reset),
.ce (tx_sd_ce),
.pattern (tx_pat[]),
.q (tx_ntsc_patgen),
.h_sync (),
.v_sync (),
.field ()); vidgen_pal PAL (
.clk (tx_usrclk),
.rst (tx_fabric_reset),
.ce (tx_sd_ce),
.pattern (tx_pat[]),
.q (tx_pal_patgen),
.h_sync (),
.v_sync (),
.field ());

因此,只需要弄懂video pattern generators 与SDI播出部分是怎么连接的,就可以摸索出video_out_to_sdi 模块应该怎样与SDI工程连接。

 1.tx_video_a_y_in信号连接路径:

.tx_video_a_y_in    (tx_y),

assign tx_y = tx_mode == 2'b01 ? tx_sd : tx_hd_y;

可以得出当 tx_mode == 2’b01的时候,tx_y 为tx_sd;

当tx_mode 不为2’b01的时候,tx_y 为 tx_hd_y;

所以,现在需要找到tx_sd 和 tx_hd_y信号线在哪里。

assign tx_sd = tx_fmt[0] ? tx_pal_patgen : tx_ntsc_patgen;

则,tx_sd 根据tx_fmt[0]的值,来决定是为tx_pal_patgen 还是为tx_ntsc_patgen;

产生PAL视频数据,查看vidgen_pal模块代码中q信号的定义。

综合以上分析可以得出tx_y信号是视频输出信号,然后输入给SDI TX端口的tx_video_a_y_in

产生NTSC 视频数据,查看vidgen_ntscl模块代码中q信号的定义

综合以上分析可以得出tx_y信号是视频输出信号,然后输入给SDI TX端口的tx_video_a_y_in

产生multigenHD视频数据,查看multigenHD模块代码中y信号的定义

则y为luma数据.(YUV)

综合以上分析可以得出tx_y信号是视频输出信号(luma),然后输入给SDI TX端口的tx_video_a_y_in

(未完,continue......)

GTP+SDI工程播出部分思路整理的更多相关文章

  1. GTP+SDI工程播出部分思路整理(3)

    GTP+SDI工程播出部分思路整理(3) 1.本文的目的主要分析video_out_to_sdi模块中输入信号 tx_usrclk, rst, tx_mode, tx_level_b的使用 Tx_us ...

  2. GTP+SDI工程播出部分思路整理(2)

    GTP+SDI工程播出部分思路整理(2) 以同样的方法来分析tx_video_a_c_in信号: SDI核中tx_video_a_c_in信号连接情况如下所示 .tx_video_a_c_in     ...

  3. iOS 工程自动化 - 思路整理

    4 月份参加 2017@Swift 大会的时候有幸听到了 @zesming 大佬关于美团组件化的 Topic,有一张图印象特别深刻. 来自 @zesming 大佬 后来跟 @zesming 大佬沟通怎 ...

  4. Angular2发布思路(整理官网Deployment页面)

    本文是按着ng2官网的高级内容“Deployment”的思路整理得出的,原文虽然在angular2的中文站下挂着,截止目前却还是英文版未翻译,笔者就在这里结合自己的理解给出原文的一点点整理.这是原文地 ...

  5. SDI工程时钟路径分析

    SDI工程时钟路径分析 //------------- Receive Ports - RX Fabric Output Control Ports ------------- output rxou ...

  6. 一些JavaSE学习过程中的思路整理(主观性强,持续更新中...)

    目录 一些JavaSE学习过程中的思路整理(主观性强,持续更新中...) Java书写规范 IDEA的一些常用快捷键 Java类中作为成员变量的类 Java源文件中只能有一个public类 Java中 ...

  7. VS2012中,C# 配置文件读取 + C#多个工程共享共有变量 + 整理using语句

    (一) C# 配置文件读取 C#工程可以自动生成配置文件,以便整个工程可以使用设置的配置进行后续的处理工作. 1. 首先,右键工程文件-->Properties -->settings-- ...

  8. AVL树的算法思路整理

    http://www.cnblogs.com/heqile/archive/2011/11/28/2265713.html 看完了<数据结构与算法分析(C++描述)>的4.4节AVL树,做 ...

  9. iOS内置图片瘦身思路整理

    一.前言 前段时间注意到我们APP的包大小超过100MB了,所以随口跟老板说了下能否采用字体文件(.ttf)替代PNG图片,老板对应用瘦身很感兴趣因此让我做下技术调研.这篇文章主要是将我们的各个技术方 ...

随机推荐

  1. ubuntu 安装 mysql 的正确姿势

    1.下载官方提供的mysql-apt-config.deb包进行APT源设置,下载地址:https://dev.mysql.com/downloads/repo/apt/ 2. // 将 mysql- ...

  2. POJ 1065 Wooden Sticks (贪心)

    There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The st ...

  3. C#类中字段封装为属性

    本文描述内容转载 https://zhidao.baidu.com/question/1174413218458798139.html 感谢 冥冥有你PD 的解答!!! 问题思索1 类成员包括变量和方 ...

  4. JavaScript操作符-3---算数,逻辑,赋值,比较,三元

    JavaScript操作符 学习目标 1.掌握什么是表达式 2.掌握javascript操作符的分类 3.掌握算数操作符 什么是表达式 将类型的数据(如常量.变量.函数等),用运算符号按一定的规则链接 ...

  5. 构建NDK交叉编译链

    有时我们需要单独编译个c文件,生成一个ELF在Android上面跑,NDK提供了一个 make-standalone-toolchain.sh 脚本,用于生成一套特定平台的交叉编译工具链 使用方法如下 ...

  6. logminer实战之生产环境写入数据字典,dg环境查询拷贝日志,测试环境进行挖掘,输出结果

    应客户需要,对某一天的日志进行挖掘,分析日均归档日志切换数量20增长至40的原因,是什么表的dml操作导致的日志量剧增,最终定位某个应用(需要客户自己进行甄别) 操作说明及介绍: 1.客户10.2.0 ...

  7. Python网络爬虫之图片懒加载技术、selenium和PhantomJS

    引入 图片懒加载 selenium phantomJs 谷歌无头浏览器 知识点回顾 验证码处理流程 动态数据加载处理 一.图片懒加载 什么是图片懒加载? 案例分析:抓取站长素材http://sc.ch ...

  8. 在 Mac 安装Docker

    https://blog.csdn.net/jpiverson/article/details/50685817 https://legacy.gitbook.com/book/yeasy/docke ...

  9. Linux 查看CPU信息、机器型号等硬件信息[转]

    查看CPU信息(型号) # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c       8  Intel(R) Xeon(R) CPU    ...

  10. python 中os的常用方法

    1.更改当前的路径 import os os.chdir( "D:/java") 注意python中表示文件路径,文件夹之间用/或者\\不能使用\