📄 hd_sep_demo.vhd
字号:
rst => '0',
dec_bypass => '0',
frame_en => rx_nsp,
rxdata => rx_data,
c_out => rx_vid_c,
y_out => rx_vid_y,
nsp => rx_nsp,
trs => open,
xyz => rx_xyz,
eav => rx_eav,
sav => rx_sav,
trs_err => rx_trs_err,
c_ln => open,
y_ln => rx_ln,
c_crc_err => rx_c_crc_err,
y_crc_err => rx_y_crc_err,
c_ln_err => open,
y_ln_err => open,
std => rx_format,
std_locked => rx_locked);
--
-- Automatic rate detection
--
RATE : hdsdi_rx_autorate
port map (
clk => rx_usrclk,
rst => '0',
sav => rx_sav,
trs_err => rx_trs_err,
y_crc_err => rx_y_crc_err,
c_crc_err => rx_c_crc_err,
refclksel => rx_refclksel);
--
-- This optional module generates some decoding video timing information.
--
TMG : hdsdi_rx_timing
port map (
clk => rx_usrclk,
rst => '0',
ln_in => rx_ln,
vid_in => rx_vid_y,
xyz => rx_xyz,
sav => rx_sav,
frame_start => open,
field => rx_field,
v_blank => rx_v_blank,
h_blank => rx_h_blank,
horz_position => open);
--
-- This module divides the TRS signal frequency down to a visible flash rate
-- to drive the Rx Heartbeat LED.
--
HBEAT : rx_heartbeat
port map (
clk => rx_usrclk,
xyz => rx_xyz,
trs_err => rx_trs_err,
heartbeat => heartbeat);
--
-- Error capture flip-flop
--
-- This flip-flop get set when CRC errors are detected and is reset with
-- push button 3.
--
process(rx_usrclk)
begin
if rx_usrclk'event and rx_usrclk='1' then
if clr_errs = '1' then
crc_err_ff <= '0';
elsif rx_locked = '1' then
if rx_c_crc_err = '1' or rx_y_crc_err = '1' then
crc_err_ff <= '1';
end if;
end if;
end if;
end process;
-------------------------------------------------------------------------------
-- HD-SDI transmitter section
--
-- This transmitter drives the MR-Tx2 output connector with HD-SDI video
-- generated by an internal video pattern generator.
--
--
-- Input registers for the video standard select inputs (dipsw(7:5))
--
-- The video format generated by the multigenHD video pattern generator is
-- determined by three DIP switches. The registers below synchronize these
-- inputs to the txusrclk.
--
process(tx_usrclk)
begin
if tx_usrclk'event and tx_usrclk='1' then
stdsel_reg <= dipsw(7 downto 5);
end if;
end process;
process(tx_usrclk)
begin
if tx_usrclk'event and tx_usrclk='1' then
stdsel_syncreg <= stdsel_reg;
end if;
end process;
--
-- Video generator
--
-- This pattern generator can produce eight different video formats that are
-- HD-SDI compatible.
--
tx_patsel(0) <= dipsw(2) and dipsw(1);
tx_patsel(1) <= dipsw(2);
tx_insert_logo <= not dipsw(2) and not dipsw(1);
VIDGEN : multigenHD_logo
port map (
clk => tx_usrclk,
rst => '0',
ce => '1',
std => stdsel_syncreg,
pattern => tx_patsel,
user_opt => dipsw(4 downto 3),
insert_logo => tx_insert_logo,
y => tx_vid_y,
c => tx_vid_c,
h_blank => open,
v_blank => open,
field => open,
trs => open,
xyz => tx_xyz,
line_num => tx_ln);
tx_sav <= not tx_vid_y(6) and tx_xyz;
tx_eav <= tx_vid_y(6) and tx_xyz;
--
-- HD-SDI transmitter
--
-- This module does line number generation and insertion, CRC generation and
-- insertion, and HD-SDI encoding.
--
TXPATH : hdsdi_tx_path
port map (
clk => tx_usrclk,
rst => '0',
ce => '1',
c_in => tx_vid_c,
y_in => tx_vid_y,
nrzi => '1',
scram => '1',
insert_crc => '1',
force_crc_err => tx_force_crc_err,
insert_ln => '1',
ln => tx_ln,
eav => tx_eav,
sav => tx_sav,
q => tx_data);
--
-- RocketIO Transceiver
--
-- This is the RocketIO transceiver. Inside this module are bit-swappers
-- needed to match the bit order of HD-SDI (LSB first) to the bit order of
-- the RocketIO module (MSB first).
--
RIO2 : hdsdi_rio
port map (
brefclk => clk_74_17M,
brefclk2 => clk_74_25M,
refclk => '0',
refclk2 => '0',
refclk_sel => tx_refclksel,
rst => '0',
loopback_en => '0',
loopback_mode => '0',
txinhibit => '0',
txdata => tx_data,
txusrclk => tx_usrclk,
txusrclk2 => tx_usrclk,
rxusrclk => tx_usrclk,
rxusrclk2 => tx_usrclk,
dcm_locked => '1',
rxp => mr_rx2_rxp,
rxn => mr_rx2_rxn,
rxdata => open,
rxrecclk => open,
txp => mr_tx2_txp,
txn => mr_tx2_txn);
-------------------------------------------------------------------------------
-- Test signal outputs to board header
--
rx_crc_err <= rx_y_crc_err or rx_c_crc_err;
TP0 : OBUF_LVCMOS25
port map (
I => rx_usrclk,
O => test_point(0));
TP1 : OBUF_LVCMOS25
port map (
I => rx_crc_err,
O => test_point(1));
TP2 : OBUF_LVCMOS25
port map (
I => rx_field,
O => test_point(2));
TP3 : OBUF_LVCMOS25
port map (
I => rx_v_blank,
O => test_point(3));
TP4 : OBUF_LVCMOS25
port map (
I => rx_h_blank,
O => test_point(4));
TP5 : OBUF_LVCMOS25
port map (
I => tx_usrclk,
O => test_point(5));
TP6 : OBUF_LVCMOS25
port map (
I => '0',
O => test_point(6));
TP7 : OBUF_LVCMOS25
port map (
I => '0',
O => test_point(7));
TP8 : OBUF_LVCMOS25
port map (
I => '0',
O => test_point(8));
TP9 : OBUF_LVCMOS25
port map (
I => '0',
O => test_point(9));
-------------------------------------------------------------------------------
-- Output buffers required to drive SDV board components that are not used by
-- this demo.
--
-- SDI 270MHz VCO
SDVCO_U : OBUF_LVCMOS33
port map (
I => '0',
O => sdi_vco_up);
SDVCO_D : OBUF_LVCMOS33
port map (
I => '0',
O => sdi_vco_down);
-- SDI 27MHz VCXO
SDVCXO_U : OBUF_LVCMOS33
port map (
I => '0',
O => vcxo_27M_up);
SDVCXO_D : OBUF_LVCMOS33
port map (
I => '0',
O => vcxo_27M_down);
VCXO27M_LPFEN : OBUF_LVCMOS33
port map (
O => vcxo_27M_sel,
I => '1');
-- ICS660 PLL
I660_S0 : OBUF_LVCMOS33
port map (
I => '0',
O => ics660_s(0));
I660_S1 : OBUF_LVCMOS33
port map (
I => '0',
O => ics660_s(1));
I660_S2 : OBUF_LVCMOS33
port map (
I => '0',
O => ics660_s(2));
I660_S3 : OBUF_LVCMOS33
port map (
I => '0',
O => ics660_s(3));
I660_X1 : OBUF_LVCMOS25
port map (
I => '0',
O => ics660_x1);
-- CY22394 PLL
CYP_OE : OBUF_LVCMOS33
port map (
I => '0',
O => cypll_oe);
CYP_S2 : OBUF_LVCMOS33
port map (
I => '0',
O => cypll_s2);
CYP_SC : OBUF_LVCMOS33
port map (
I => '0',
O => cypll_sclk);
CYP_SD: OBUF_LVCMOS33
port map (
I => '0',
O => cypll_sdat);
-- ICS8745 PLL
I8745_COUT : OBUFDS_LVDS_25
port map (
I => '0',
O => ics8745_clkout_p,
OB => ics8745_clkout_n);
I8745_SEL0 : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_sel(0));
I8745_SEL1 : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_sel(1));
I8745_SEL2 : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_sel(2));
I8745_SEL3 : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_sel(3));
I8745_PLLSEL : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_pll_sel);
I8745_MR : OBUF_LVCMOS25
port map (
I => '0',
O => ics8745_mr);
-- SDI-Tx Port
SDI_TXD : OBUFDS_LVDS_25
port map (
I => '0',
O => sdi_tx_dout_p,
OB => sdi_tx_dout_n);
-- ASI-Tx Port
ASI_TXD : OBUFDS_LVDS_25
port map (
I => '0',
O => asi_tx_p,
OB => asi_tx_n);
-- RS-232 Port
RX232TXD : OBUF_LVCMOS25
port map (
I => '0',
O => rs232_txd);
RS232RTS : OBUF_LVCMOS25
port map (
I => '0',
O => rs232_rts);
end synth;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -