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 2

Go to most recent revision | 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
--     Authors        : Erwing R. Sanchez <erwing.sanchezsanchez@polito.it>
15
--
16
--     Rev. History   : 21 june 06 - First Draft 
17
--                                 
18
-------------------------------------------------------------------------------            
19
-------------------------------------------------------------------------------
20
 
21
library IEEE;
22
use IEEE.STD_LOGIC_1164.all;
23
use IEEE.std_logic_unsigned.all;
24
use IEEE.STD_LOGIC_ARITH.all;
25
use ieee.numeric_std.all;
26
library work;
27
use work.epc_tag.all;
28
 
29
 
30
entity receiver is
31
  generic (
32
    LOG2_10_TARI_CK_CYC        : integer := 9;  -- Log2(clock cycles for 10 maximum TARI value) (def:Log2(490) = 9 @TCk=520ns)
33
    DELIMITIER_TIME_CK_CYC_MIN : integer := 22;  -- Min Clock cycles for 12,5 us delimitier
34
    DELIMITIER_TIME_CK_CYC_MAX : integer := 24);  -- Max Clock cycles for 12,5 us delimitier
35
  port (
36
    clk       : in  std_logic;
37
    rst_n     : in  std_logic;
38
    tdi       : in  std_logic;
39
    en        : in  std_logic;
40
    CommDone  : out CommandInternalCode_t;
41
    Data_r    : out std_logic_vector(31 downto 0);
42
    CRC_r     : out std_logic_vector(15 downto 0);
43
    Pointer_r : out std_logic_vector(15 downto 0);
44
    RN16_r    : out std_logic_vector(15 downto 0);
45
    Length_r  : out std_logic_vector(7 downto 0);
46
    Mask_r    : out std_logic_vector(MASKLENGTH-1 downto 0));
47
 
48
 
49
end receiver;
50
 
51
 
52
architecture Receiver1 of receiver is
53
 
54
  component CommandDecoder
55
    generic (
56
      LOG2_10_TARI_CK_CYC        : integer;
57
      DELIMITIER_TIME_CK_CYC_MIN : integer;
58
      DELIMITIER_TIME_CK_CYC_MAX : integer);
59
    port (
60
      clk       : in  std_logic;
61
      rst_n     : in  std_logic;
62
      tdi       : in  std_logic;
63
      en        : in  std_logic;
64
      CommDone  : out CommandInternalCode_t;
65
      Data_r    : out std_logic_vector(31 downto 0);
66
      CRC_r     : out std_logic_vector(15 downto 0);
67
      Pointer_r : out std_logic_vector(15 downto 0);
68
      RN16_r    : out std_logic_vector(15 downto 0);
69
      Length_r  : out std_logic_vector(7 downto 0);
70
      Mask_r    : out std_logic_vector(MASKLENGTH-1 downto 0));
71
  end component;
72
 
73
 
74
begin
75
 
76
  CommandDecoder_i : CommandDecoder
77
    generic map (
78
      LOG2_10_TARI_CK_CYC        => LOG2_10_TARI_CK_CYC,
79
      DELIMITIER_TIME_CK_CYC_MIN => DELIMITIER_TIME_CK_CYC_MIN,
80
      DELIMITIER_TIME_CK_CYC_MAX => DELIMITIER_TIME_CK_CYC_MAX)
81
    port map (
82
      clk       => clk,
83
      rst_n     => rst_n,
84
      tdi       => tdi,
85
      en        => en,
86
      CommDone  => CommDone,
87
      Data_r    => Data_r,
88
      CRC_r     => CRC_r,
89
      Pointer_r => Pointer_r,
90
      RN16_r    => RN16_r,
91
      Length_r  => Length_r,
92
      Mask_r    => Mask_r);
93
 
94
 
95
end Receiver1;
96
 
97
 

powered by: WebSVN 2.1.0

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