OpenCores
URL https://opencores.org/ocsvn/spdif_interface/spdif_interface/trunk

Subversion Repositories spdif_interface

[/] [spdif_interface/] [trunk/] [rtl/] [vhdl/] [rx_cap_reg.vhd] - Diff between revs 9 and 37

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 9 Rev 37
Line 43... Line 43...
----------------------------------------------------------------------
----------------------------------------------------------------------
--
--
-- CVS Revision History
-- CVS Revision History
--
--
-- $Log: not supported by cvs2svn $
-- $Log: not supported by cvs2svn $
 
-- Revision 1.1  2004/06/05 17:16:46  gedra
 
-- Channel status/user data capture register
 
--
--
--
 
 
library IEEE;
library ieee;
use IEEE.std_logic_1164.all;
use ieee.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use ieee.numeric_std.all;
use work.rx_package.all;
use work.rx_package.all;
 
 
entity rx_cap_reg is
entity rx_cap_reg is
  port (
  port (
    clk: in std_logic;                  -- clock
    clk: in std_logic;                  -- clock
Line 96... Line 99...
      ctrl_rd => cap_ctrl_rd,
      ctrl_rd => cap_ctrl_rd,
      ctrl_din => cap_din,
      ctrl_din => cap_din,
      ctrl_dout => cap_ctrl_dout,
      ctrl_dout => cap_ctrl_dout,
      ctrl_bits => cap_ctrl_bits);
      ctrl_bits => cap_ctrl_bits);
 
 
  bitlen <= CONV_INTEGER(cap_ctrl_bits(5 downto 0));
  bitlen <= to_integer(unsigned(cap_ctrl_bits(5 downto 0)));
  chid <= cap_ctrl_bits(6);
  chid <= cap_ctrl_bits(6);
  cdata <= cap_ctrl_bits(7);
  cdata <= cap_ctrl_bits(7);
  bitpos <= CONV_INTEGER(cap_ctrl_bits(15 downto 8));
  bitpos <= to_integer(unsigned(cap_ctrl_bits(15 downto 8)));
 
 
-- capture data register
-- capture data register
  CDAT: process (clk, rst)
  CDAT: process (clk, rst)
    begin
    begin
      if rst = '1' then
      if rst = '1' then
Line 156... Line 159...
            end if;
            end if;
            -- if all bits captured, check with previous data
            -- if all bits captured, check with previous data
            if cap_len = bitlen and compared = '0' then
            if cap_len = bitlen and compared = '0' then
              compared <= '1';
              compared <= '1';
              -- event generated if captured bits differ
              -- event generated if captured bits differ
              if CONV_INTEGER(cap_reg) /= CONV_INTEGER(cap_new) then
              if cap_reg /= cap_new then
                cap_evt <= '1';
                cap_evt <= '1';
              end if;
              end if;
              cap_reg <= cap_new;
              cap_reg <= cap_new;
            else
            else
              cap_evt <= '0';
              cap_evt <= '0';

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.