Line 3... |
Line 3... |
-- Engineer : RyuShinHyung
|
-- Engineer : RyuShinHyung
|
--
|
--
|
-- Create Date : 02/23/2005
|
-- Create Date : 02/23/2005
|
-- Design Name :
|
-- Design Name :
|
-- Module Name : ENC8B10B - RTL
|
-- Module Name : ENC8B10B - RTL
|
-- Project Name : DSP Application
|
-- Project Name : Fiber Optic Application
|
--
|
--
|
-- Revision
|
-- Revision
|
-- Revision 0.01 - File Created
|
-- Revision 0.01 - File Created.
|
-- Comments : General ENC8B10B
|
-- 1.00 - publishing on the opencores.org.
|
|
-- 1.01 - eliminate needing the VECTLIB.vhd in the original revision.(20110424)
|
--
|
--
|
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
library IEEE;
|
library IEEE;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_1164.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
use work.vect_pack.ALL;
|
|
|
|
entity ENC8B10B is
|
entity ENC8B10B is
|
port
|
port
|
(
|
(
|
CLK_IN : in STD_LOGIC;
|
CLK_IN : in STD_LOGIC;
|
Line 26... |
Line 26... |
CTRL_IN : in STD_LOGIC;
|
CTRL_IN : in STD_LOGIC;
|
DATA_IN : in STD_LOGIC_VECTOR(7 downto 0);
|
DATA_IN : in STD_LOGIC_VECTOR(7 downto 0);
|
RUNDP_OUT : out STD_LOGIC;
|
RUNDP_OUT : out STD_LOGIC;
|
ENCODE_OUT : out STD_LOGIC_VECTOR(9 downto 0)
|
ENCODE_OUT : out STD_LOGIC_VECTOR(9 downto 0)
|
);
|
);
|
attribute FAST : string;
|
|
attribute SLOW : string;
|
|
attribute FAST of ENC8B10B : entity is "TRUE";
|
|
attribute SLOW of ENC8B10B : entity is "FALSE";
|
|
end ENC8B10B;
|
end ENC8B10B;
|
|
|
architecture RTL of ENC8B10B is
|
architecture RTL of ENC8B10B is
|
|
|
type TYPE_ENC8b10b is array (0 to 1023) of std_logic_vector (10 downto 0); -- RD & Dx.y
|
type TYPE_ENC8b10b is array (0 to 1023) of std_logic_vector (10 downto 0); -- RD & Dx.y
|
Line 1102... |
Line 1098... |
constant DEC_K23D7 : std_logic_vector := "11110111"; -- K23.7
|
constant DEC_K23D7 : std_logic_vector := "11110111"; -- K23.7
|
constant DEC_K27D7 : std_logic_vector := "11111011"; -- K27.7
|
constant DEC_K27D7 : std_logic_vector := "11111011"; -- K27.7
|
constant DEC_K29D7 : std_logic_vector := "11111101"; -- K29.7
|
constant DEC_K29D7 : std_logic_vector := "11111101"; -- K29.7
|
constant DEC_K30D7 : std_logic_vector := "11111110"; -- K30.7
|
constant DEC_K30D7 : std_logic_vector := "11111110"; -- K30.7
|
|
|
|
|
|
|
signal ENCODE : std_logic_vector (10 downto 0);
|
signal ENCODE : std_logic_vector (10 downto 0);
|
begin
|
begin
|
|
|
RUNDP_OUT <= ENCODE(10);
|
RUNDP_OUT <= ENCODE(10);
|
ENCODE_OUT <= ENCODE(9 downto 0);
|
ENCODE_OUT <= ENCODE(9 downto 0);
|
Line 1115... |
Line 1109... |
process (CLK_IN)
|
process (CLK_IN)
|
begin
|
begin
|
if (CLK_IN='1' and CLK_IN'event)
|
if (CLK_IN='1' and CLK_IN'event)
|
then
|
then
|
ENCODE <= TBL_ENC8b10b(conv_integer(CTRL_IN & ((not RUNDP_RESET_IN) and ENCODE(10)) & DATA_IN));
|
ENCODE <= TBL_ENC8b10b(conv_integer(CTRL_IN & ((not RUNDP_RESET_IN) and ENCODE(10)) & DATA_IN));
|
--ENCODE <=ENC_K28D5R0;
|
|
--ENCODE <= '0' & CTRL_IN & ENCODE(10) & DATA_IN;
|
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
end RTL;
|
end RTL;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|