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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [rtl/] [bplib/] [fx2rlink/] [fx2rlinklib.vhd] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
-- $Id: fx2rlinklib.vhd 672 2015-05-02 21:58:28Z mueller $
2 20 wfjm
--
3 30 wfjm
-- Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 20 wfjm
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Package Name:   fx2rlinklib
16
-- Description:    Definitions for rlink + fx2 interface combos
17
--
18
-- Dependencies:   -
19 27 wfjm
-- Tool versions:  xst 13.3-14.7; ghdl 0.29-0.31
20 20 wfjm
--
21
-- Revision History: 
22
-- Date         Rev Version  Comment
23 30 wfjm
-- 2015-04-11   666   1.2    rlink_sp1c_fx2: drop ENAESC
24 27 wfjm
-- 2014-08-28   588   1.1    use new rlink v4 iface generics and 4 bit STAT
25 20 wfjm
-- 2013-04-20   509   1.0    Initial version 
26
------------------------------------------------------------------------------
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
use ieee.numeric_std.all;
31
 
32
use work.slvtypes.all;
33
use work.rblib.all;
34
use work.rlinklib.all;
35
use work.serportlib.all;
36
use work.fx2lib.all;
37
 
38
package fx2rlinklib is
39
 
40
--
41
-- core + fx2 interface combo
42
--
43
 
44
component rlink_sp1c_fx2 is             -- rlink_core8+serport_1clk+fx2_ic combo
45
  generic (
46 27 wfjm
    BTOWIDTH : positive :=  5;          -- rbus timeout counter width
47
    RTAWIDTH : positive := 12;          -- retransmit buffer address width
48
    SYSID : slv32 := (others=>'0');     -- rlink system id
49 20 wfjm
    IFAWIDTH : natural :=  5;           -- ser input fifo addr width  (0=none)
50
    OFAWIDTH : natural :=  5;           -- ser output fifo addr width (0=none)
51
    PETOWIDTH : positive := 10;         -- fx2 packet end time-out counter width
52
    CCWIDTH :   positive :=  5;         -- fx2 chunk counter width
53 27 wfjm
    ENAPIN_RLMON : integer := -1;       -- SB_CNTL for rlmon  (-1=none)
54
    ENAPIN_RLBMON: integer := -1;       -- SB_CNTL for rlbmon (-1=none)
55
    ENAPIN_RBMON : integer := -1;       -- SB_CNTL for rbmon  (-1=none)
56 20 wfjm
    CDWIDTH : positive := 13;           -- clk divider width
57 30 wfjm
    CDINIT : natural   := 15;           -- clk divider initial/reset setting
58
    RBMON_AWIDTH : natural := 0;        -- rbmon: buffer size (0=none)
59
    RBMON_RBADDR : slv16 := slv(to_unsigned(16#ffe8#,16))); -- rbmon: base addr
60 20 wfjm
  port (
61
    CLK  : in slbit;                    -- clock
62
    CE_USEC : in slbit;                 -- 1 usec clock enable
63
    CE_MSEC : in slbit;                 -- 1 msec clock enable
64 27 wfjm
    CE_INT : in slbit := '0';           -- rri ato time unit clock enable
65 20 wfjm
    RESET  : in slbit;                  -- reset
66
    ENAXON : in slbit;                  -- enable xon/xoff handling
67
    ENAFX2 : in slbit;                  -- enable fx2 usage
68
    RXSD : in slbit;                    -- receive serial data      (board view)
69
    TXSD : out slbit;                   -- transmit serial data     (board view)
70
    CTS_N : in slbit := '0';            -- clear to send   (act.low, board view)
71
    RTS_N : out slbit;                  -- request to send (act.low, board view)
72
    RB_MREQ : out rb_mreq_type;         -- rbus: request
73
    RB_SRES : in rb_sres_type;          -- rbus: response
74
    RB_LAM : in slv16;                  -- rbus: look at me
75 27 wfjm
    RB_STAT : in slv4;                  -- rbus: status flags
76 20 wfjm
    RL_MONI : out rl_moni_type;         -- rlink_core: monitor port
77
    RLB_MONI : out rlb_moni_type;       -- rlink 8b: monitor port
78
    SER_MONI : out serport_moni_type;   -- ser: monitor port
79
    FX2_MONI : out fx2ctl_moni_type;    -- fx2: monitor port
80
    I_FX2_IFCLK : in slbit;             -- fx2: interface clock
81
    O_FX2_FIFO : out slv2;              -- fx2: fifo address
82
    I_FX2_FLAG : in slv4;               -- fx2: fifo flags
83
    O_FX2_SLRD_N : out slbit;           -- fx2: read enable    (act.low)
84
    O_FX2_SLWR_N : out slbit;           -- fx2: write enable   (act.low)
85
    O_FX2_SLOE_N : out slbit;           -- fx2: output enable  (act.low)
86
    O_FX2_PKTEND_N : out slbit;         -- fx2: packet end     (act.low)
87
    IO_FX2_DATA : inout slv8            -- fx2: data lines
88
  );
89
end component;
90
 
91
component ioleds_sp1c_fx2               -- io activity leds for rlink_sp1c_fx2
92
  port (
93
    CLK  : in slbit;                    -- clock
94
    CE_USEC : in slbit;                 -- 1 usec clock enable
95
    RESET  : in slbit;                  -- reset
96
    ENAFX2 : in slbit;                  -- enable fx2 usage
97
    RB_SRES : in rb_sres_type;          -- rbus: response
98
    RLB_MONI : in rlb_moni_type;        -- rlink 8b: monitor port
99
    SER_MONI : in serport_moni_type;    -- ser: monitor port
100
    IOLEDS : out slv4                   -- 4 bit IO monitor (e.g. for DSP_DP)
101
  );
102
end component;
103
 
104
end package fx2rlinklib;

powered by: WebSVN 2.1.0

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