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

Subversion Repositories manchesterwireless

[/] [manchesterwireless/] [branches/] [singledouble/] [manchesterWireless.vhd] - Diff between revs 3 and 6

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 3 Rev 6
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--      Copyright (C) 2009 Sam Green
--      Copyright (C) 2009 Sam Green
--
--
-- This code is free software; you can redistribute it and/or
-- This code is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- version 2.1 of the License, or (at your option) any later version.
--
--
-- This code is distributed in the hope that it will be useful,
-- This code is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- Lesser General Public License for more details.
-- Lesser General Public License for more details.
--
--
--
--
--  Revision  Date        Author                Comment
--  Revision  Date        Author                Comment
--  --------  ----------  --------------------  ----------------
--  --------  ----------  --------------------  ----------------
--  1.0       09/06/09    S. Green              Initial version
--  1.0       09/06/09    S. Green              Initial version
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
 
 
use work.globals.all;
use work.globals.all;
 
 
entity manchesterWireless is
entity manchesterWireless is
  port (
  port (
    clk_i   : in  std_logic;
    clk_i   : in  std_logic;
    rst_i   : in  std_logic;
    rst_i   : in  std_logic;
    data_i  : in  std_logic;
    data_i  : in  std_logic;
    q_o     : out std_logic_vector(WORD_LENGTH-1 downto 0);
    q_o     : out std_logic_vector(WORD_LENGTH-1 downto 0);
    ready_o : out std_logic;
    ready_o : out std_logic;
    recieved_debug : out std_logic_vector(3 downto 0);
    recieved_debug : out std_logic_vector(3 downto 0);
    waitforstart_rdy : out std_logic
    waitforstart_rdy : out std_logic
  );
  );
end;
end;
 
 
architecture behavioral of manchesterWireless is
architecture behavioral of manchesterWireless is
 
 
  component waitForStart
  component waitForStart
  port (
  port (
    data_i  : in  std_logic;
    data_i  : in  std_logic;
    clk_i   : in  std_logic;
    clk_i   : in  std_logic;
    rst_i   : in  std_logic;
    rst_i   : in  std_logic;
    ready_o : out std_logic
    ready_o : out std_logic
  );
  );
  end component;
  end component;
 
 
  component singleDouble
  component singleDouble
  port (
  port (
    clk_i   :  in  std_logic;
    clk_i   :  in  std_logic;
    ce_i    :  in  std_logic;
    ce_i    :  in  std_logic;
    rst_i   :  in  std_logic;
    rst_i   :  in  std_logic;
    data_i  :  in  std_logic;
    data_i  :  in  std_logic;
    q_o     :  out std_logic_vector(3 downto 0);
    q_o     :  out std_logic_vector(3 downto 0);
    ready_o :  out std_logic
    ready_o :  out std_logic
  );
  );
  end component;
  end component;
 
 
  component decode
  component decode
  port (
  port (
    clk_i     : in  std_logic;
    clk_i     : in  std_logic;
    rst_i     : in  std_logic;
    rst_i     : in  std_logic;
    nd_i      : in  std_logic;
    nd_i      : in  std_logic;
    encoded_i : in  std_logic_vector(3 downto 0);
    encoded_i : in  std_logic_vector(3 downto 0);
    decoded_o : out std_logic_vector(WORD_LENGTH-1 downto 0);
    decoded_o : out std_logic_vector(WORD_LENGTH-1 downto 0);
    nd_o      : out std_logic
    nd_o      : out std_logic
  );
  );
  end component;
  end component;
 
 
  signal wait_rdy             : std_logic;
  signal wait_rdy             : std_logic;
  signal md16_nd              : std_logic;
  signal md16_nd              : std_logic;
  signal md16_q_o             : std_logic_vector(3 downto 0);
  signal md16_q_o             : std_logic_vector(3 downto 0);
 
 
begin
begin
 
 
  inst_waitForStart: waitForStart
  inst_waitForStart: waitForStart
  port map(
  port map(
    data_i => data_i,
    data_i => data_i,
    clk_i => clk_i,
    clk_i => clk_i,
    rst_i => rst_i,
    rst_i => rst_i,
    ready_o => wait_rdy
    ready_o => wait_rdy
  );
  );
 
 
  waitforstart_rdy <= wait_rdy;
  waitforstart_rdy <= wait_rdy;
 
 
  inst_singleDouble : singleDouble
  inst_singleDouble : singleDouble
  port map(
  port map(
    clk_i   => clk_i,
    clk_i   => clk_i,
    ce_i    => wait_rdy,
    ce_i    => wait_rdy,
    rst_i   => rst_i,
    rst_i   => rst_i,
    data_i  => data_i,
    data_i  => data_i,
    q_o     => md16_q_o,
    q_o     => md16_q_o,
    ready_o => md16_nd
    ready_o => md16_nd
  );
  );
 
 
  recieved_debug <= md16_q_o;
  recieved_debug <= md16_q_o;
 
 
  inst_decode: decode
  inst_decode: decode
  port map(
  port map(
    clk_i     => clk_i,
    clk_i     => clk_i,
    rst_i     => rst_i,
    rst_i     => rst_i,
    nd_i      => md16_nd,
    nd_i      => md16_nd,
    encoded_i => md16_q_o,
    encoded_i => md16_q_o,
    decoded_o => q_o,
    decoded_o => q_o,
    nd_o      => ready_o
    nd_o      => ready_o
  );
  );
 
 
end;
end;
 
 
 
 

powered by: WebSVN 2.1.0

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