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

Subversion Repositories manchesterwireless

[/] [manchesterwireless/] [trunk/] [manchesterWireless.vhd] - Blame information for rev 9

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kingmu
-----------------------------------------------------------------------------
2
--      Copyright (C) 2009 Sam Green
3
--
4
-- This code is free software; you can redistribute it and/or
5
-- modify it under the terms of the GNU Lesser General Public
6
-- License as published by the Free Software Foundation; either
7
-- version 2.1 of the License, or (at your option) any later version.
8
--
9
-- This code is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
-- Lesser General Public License for more details.
13
--
14
--
15
--  Revision  Date        Author                Comment
16
--  --------  ----------  --------------------  ----------------
17
--  1.0       09/06/09    S. Green              Initial version
18
-----------------------------------------------------------------------------
19
 
20
library ieee;
21
use ieee.std_logic_1164.all;
22
 
23
use work.globals.all;
24
 
25 3 kingmu
entity manchesterWireless is
26 2 kingmu
  port (
27
    clk_i   : in  std_logic;
28
    rst_i   : in  std_logic;
29
    data_i  : in  std_logic;
30
    q_o     : out std_logic_vector(WORD_LENGTH-1 downto 0);
31
    ready_o : out std_logic;
32
    recieved_debug : out std_logic_vector(3 downto 0);
33
    waitforstart_rdy : out std_logic
34
  );
35 3 kingmu
end;
36 2 kingmu
 
37 3 kingmu
architecture behavioral of manchesterWireless is
38 2 kingmu
 
39
  component waitForStart
40
  port (
41
    data_i  : in  std_logic;
42
    clk_i   : in  std_logic;
43
    rst_i   : in  std_logic;
44
    ready_o : out std_logic
45
  );
46
  end component;
47
 
48 3 kingmu
  component singleDouble
49 2 kingmu
  port (
50
    clk_i   :  in  std_logic;
51
    ce_i    :  in  std_logic;
52
    rst_i   :  in  std_logic;
53
    data_i  :  in  std_logic;
54
    q_o     :  out std_logic_vector(3 downto 0);
55
    ready_o :  out std_logic
56
  );
57
  end component;
58
 
59 3 kingmu
  component decode
60 2 kingmu
  port (
61
    clk_i     : in  std_logic;
62
    rst_i     : in  std_logic;
63
    nd_i      : in  std_logic;
64
    encoded_i : in  std_logic_vector(3 downto 0);
65
    decoded_o : out std_logic_vector(WORD_LENGTH-1 downto 0);
66
    nd_o      : out std_logic
67
  );
68
  end component;
69
 
70
  signal wait_rdy             : std_logic;
71
  signal md16_nd              : std_logic;
72
  signal md16_q_o             : std_logic_vector(3 downto 0);
73
 
74
begin
75
 
76
  inst_waitForStart: waitForStart
77
  port map(
78
    data_i => data_i,
79
    clk_i => clk_i,
80
    rst_i => rst_i,
81
    ready_o => wait_rdy
82
  );
83
 
84
  waitforstart_rdy <= wait_rdy;
85
 
86 3 kingmu
  inst_singleDouble : singleDouble
87 2 kingmu
  port map(
88
    clk_i   => clk_i,
89
    ce_i    => wait_rdy,
90
    rst_i   => rst_i,
91
    data_i  => data_i,
92
    q_o     => md16_q_o,
93
    ready_o => md16_nd
94
  );
95
 
96
  recieved_debug <= md16_q_o;
97
 
98 3 kingmu
  inst_decode: decode
99 2 kingmu
  port map(
100
    clk_i     => clk_i,
101
    rst_i     => rst_i,
102
    nd_i      => md16_nd,
103
    encoded_i => md16_q_o,
104
    decoded_o => q_o,
105
    nd_o      => ready_o
106
  );
107
 
108 3 kingmu
end;
109 2 kingmu
 

powered by: WebSVN 2.1.0

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