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

Subversion Repositories core1990_interlaken

[/] [core1990_interlaken/] [trunk/] [gateware/] [simulation/] [encoder_tb.vhd] - Diff between revs 6 and 9

Show entire file | Details | Blame | View Log

Rev 6 Rev 9
Line 3... Line 3...
 
 
entity testbench_encoder is
entity testbench_encoder is
end entity testbench_encoder;
end entity testbench_encoder;
 
 
architecture tb_encoder of testbench_encoder is
architecture tb_encoder of testbench_encoder is
  component Encoder is
 
    port (
 
      data_in : in std_logic_vector(63 downto 0);
 
      encoder_en : in std_logic;
 
      Data_Control : in std_logic;
 
      clk : in std_logic;
 
      rst : in std_logic;
 
      encoder_rst : in std_logic;
 
      offset : out std_logic_vector(7 downto 0);
 
      data_out : out std_logic_vector(66 downto 0)
 
    );
 
  end component Encoder;
 
 
 
  for uut : line_encoder use entity work.line_encoder(encoder);
    signal clk          : std_logic;                     -- Clock input
 
    signal Data_In      : std_logic_vector(63 downto 0); -- Data input
 
    signal Data_Out     : std_logic_vector(66 downto 0); -- Encoded 67-bit output
 
 
 
    signal Data_Control  : std_logic:= '0';              -- Determines whether the word is data or control
 
    signal Data_valid_in : std_logic;
 
    signal Data_valid_out: std_logic;
 
 
 
    signal Encoder_En   : std_logic := '0';              -- Enables the encoder
 
    signal Encoder_Rst  : std_logic;                     -- Resets the encoder
 
 
  signal data_in : std_logic_vector(63 downto 0);
    --signal Offset       : std_logic_vector(7 downto 0); -- Debug to see the average values of ones and zeros
  signal encoder_en : std_logic := '0';
    signal Gearboxready : std_logic;
  signal Data_Control : std_logic := '0';
 
  signal clk : std_logic;
 
  signal rst : std_logic := '0';
 
  signal encoder_rst : std_logic;
 
  signal offset : std_logic_vector(7 downto 0);
 
  signal data_out : std_logic_vector(66 downto 0);
 
 
 
  constant CLK_PERIOD : time := 10 ns;
  constant CLK_PERIOD : time := 10 ns;
 
 
begin
begin
  uut : Encoder
    uut : work.Encoder
  port map (
  port map (
 
        clk => clk,
    data_in => data_in,
    data_in => data_in,
    encoder_en => encoder_en,
        data_out => data_out,
 
 
    Data_Control => Data_Control,
    Data_Control => Data_Control,
    clk => clk,
        data_valid_in => data_valid_in,
    rst => rst,
        data_valid_out => data_valid_out,
 
 
 
        encoder_en => encoder_en,
    encoder_rst => encoder_rst,
    encoder_rst => encoder_rst,
    offset => offset,
 
    data_out => data_out
        --offset => offset,
 
        gearboxready => gearboxready
  );
  );
 
 
   Clk_process :process
   Clk_process :process
   begin
   begin
        clk <= '1';
        clk <= '1';

powered by: WebSVN 2.1.0

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