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. AOP记录方法的执行时间

    作用AOP监控方法的运行时间如下: @Component @Aspect public class LogAop { private Logger log = LoggerFactory.getLog ...

  2. 【Python】多线程-2

    1.    进程和线程的区别: (1) 一个进程可以有多个线程,一个进程中的多个线程共享该进程的所有资源,多线程切换比多进程切换快,因为不用上下文切换,Python中并发建议用多进程 (2) 进程是资 ...

  3. 【Python】多线程-1

    #练习:创建一个线程 from threading import Thread import time def run(a = None, b = None) : print a, b time.sl ...

  4. 【Python】创建xml文档

    #练习:创建xml文档 import xml.dom.minidom import codecs   #在内存中创建一个空的文档 doc = xml.dom.minidom.Document()   ...

  5. 奇妙的证明 —— 0! = 1(a^0=1)

    1. 0!=1 (n−1)!=n!n" role="presentation">(n−1)!=n!n(n−1)!=n!n 则: 0!=1!1=1" rol ...

  6. 【转载】 程序员制作996.icu网站抗议加班,你认为996能提高工作效率吗?

    原文地址: https://zhidao.baidu.com/question/623053193192988612.html ------------------------------------ ...

  7. 【linux基础】V4L2介绍

    参考 1. https://www.cnblogs.com/hzhida/archive/2012/05/29/2524351.html 2. https://www.cnblogs.com/hzhi ...

  8. 关于Linux前后台进程切换

    前言: 当使用SSH远程登录服务器时,对于运行时间较长的程序(如Caffe的训练可能需要十几个小时), SSH可能会在很长时间后断掉,导致程序没运行完就中断了. 为了解决这个问题,需要将在服务器运行的 ...

  9. Unity 3D用简单的Cube、Sphere实现镜面/哈哈镜效果,只需十几秒哦!

    Unity实现镜面和哈哈镜效果 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Chinar -- 心分 ...

  10. CF1120 C. Compress String(SAM+DP)

    有方程dp[i]=min(dp[i-1]+A,dp[j]+B):如果s[j+1,i]在s[i,j]中出现,所以我们就是要知道每个子串在s出现的第一个位置,这个可以hash实现或者sam,或者kmp实现 ...