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

Subversion Repositories epc_rfid_transponder

[/] [epc_rfid_transponder/] [trunk/] [receiver.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 erwing
-------------------------------------------------------------------------------
2
--     Politecnico di Torino                                              
3
--     Dipartimento di Automatica e Informatica             
4
-------------------------------------------------------------------------------
5
-------------------------------------------------------------------------------     
6
--
7
--     Title          : EPC Class1 Gen2 RFID Tag - Receiver    
8
--
9
--     File name      : receiver.vhd 
10
--
11
--     Description    : Tag receiver detects valid frames decoding command 
12
--                      preambles and frame-syncs.    
13
--
14 3 erwing
--     Authors        : Erwing R. Sanchez <erwing.sanchez@polito.it>
15
s--                                 
16 2 erwing
-------------------------------------------------------------------------------            
17
-------------------------------------------------------------------------------
18
 
19
library IEEE;
20
use IEEE.STD_LOGIC_1164.all;
21
use IEEE.std_logic_unsigned.all;
22
use IEEE.STD_LOGIC_ARITH.all;
23
use ieee.numeric_std.all;
24
library work;
25
use work.epc_tag.all;
26
 
27
 
28
entity receiver is
29
  generic (
30
    LOG2_10_TARI_CK_CYC        : integer := 9;  -- Log2(clock cycles for 10 maximum TARI value) (def:Log2(490) = 9 @TCk=520ns)
31
    DELIMITIER_TIME_CK_CYC_MIN : integer := 22;  -- Min Clock cycles for 12,5 us delimitier
32
    DELIMITIER_TIME_CK_CYC_MAX : integer := 24);  -- Max Clock cycles for 12,5 us delimitier
33
  port (
34
    clk       : in  std_logic;
35
    rst_n     : in  std_logic;
36
    tdi       : in  std_logic;
37
    en        : in  std_logic;
38
    CommDone  : out CommandInternalCode_t;
39
    Data_r    : out std_logic_vector(31 downto 0);
40
    CRC_r     : out std_logic_vector(15 downto 0);
41
    Pointer_r : out std_logic_vector(15 downto 0);
42
    RN16_r    : out std_logic_vector(15 downto 0);
43
    Length_r  : out std_logic_vector(7 downto 0);
44
    Mask_r    : out std_logic_vector(MASKLENGTH-1 downto 0));
45
 
46
 
47
end receiver;
48
 
49
 
50
architecture Receiver1 of receiver is
51
 
52
  component CommandDecoder
53
    generic (
54
      LOG2_10_TARI_CK_CYC        : integer;
55
      DELIMITIER_TIME_CK_CYC_MIN : integer;
56
      DELIMITIER_TIME_CK_CYC_MAX : integer);
57
    port (
58
      clk       : in  std_logic;
59
      rst_n     : in  std_logic;
60
      tdi       : in  std_logic;
61
      en        : in  std_logic;
62
      CommDone  : out CommandInternalCode_t;
63
      Data_r    : out std_logic_vector(31 downto 0);
64
      CRC_r     : out std_logic_vector(15 downto 0);
65
      Pointer_r : out std_logic_vector(15 downto 0);
66
      RN16_r    : out std_logic_vector(15 downto 0);
67
      Length_r  : out std_logic_vector(7 downto 0);
68
      Mask_r    : out std_logic_vector(MASKLENGTH-1 downto 0));
69
  end component;
70
 
71
 
72
begin
73
 
74
  CommandDecoder_i : CommandDecoder
75
    generic map (
76
      LOG2_10_TARI_CK_CYC        => LOG2_10_TARI_CK_CYC,
77
      DELIMITIER_TIME_CK_CYC_MIN => DELIMITIER_TIME_CK_CYC_MIN,
78
      DELIMITIER_TIME_CK_CYC_MAX => DELIMITIER_TIME_CK_CYC_MAX)
79
    port map (
80
      clk       => clk,
81
      rst_n     => rst_n,
82
      tdi       => tdi,
83
      en        => en,
84
      CommDone  => CommDone,
85
      Data_r    => Data_r,
86
      CRC_r     => CRC_r,
87
      Pointer_r => Pointer_r,
88
      RN16_r    => RN16_r,
89
      Length_r  => Length_r,
90
      Mask_r    => Mask_r);
91
 
92
 
93
end Receiver1;
94
 
95
 

powered by: WebSVN 2.1.0

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