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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [rtl/] [vlib/] [rlink/] [tb/] [tbu_rlink_sp1c.vhd] - Blame information for rev 27

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

Line No. Rev Author Line
1 27 wfjm
-- $Id: tbu_rlink_sp1c.vhd 593 2014-09-14 22:21:33Z mueller $
2 2 wfjm
--
3 27 wfjm
-- Copyright 2007-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 2 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 16 wfjm
-- Module Name:    tbu_rlink_sp1c - syn
16
-- Description:    Wrapper for rlink_sp1c to avoid records.
17 9 wfjm
--                 It has a port interface which will not be modified by xst
18 2 wfjm
--                 synthesis (no records, no generic port).
19
--
20 16 wfjm
-- Dependencies:   rlink_sp1c
21 2 wfjm
--
22 16 wfjm
-- To test:        rlink_sp1c
23 2 wfjm
--
24
-- Target Devices: generic
25
--
26
-- Synthesized (xst):
27
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
28 16 wfjm
-- 2011-12-22   442  13.1   O40d xc3s1000-4   348  704   64  473 s 9.08
29 2 wfjm
-- 2010-04-03   274  11.4   L68  xc3s1000-4   278  588   18  366 s 9.83
30
-- 2007-10-27    92  9.2.02 J39  xc3s1000-4   273  547   18    - t 9.65
31
-- 2007-10-27    92  9.1    J30  xc3s1000-4   273  545   18    - t 9.65
32
-- 2007-10-27    92  8.2.03 I34  xc3s1000-4   283  594   18  323 s 10.3
33
-- 2007-10-27    92  8.1.03 I27  xc3s1000-4   285  596   18    - s 9.32
34
--
35 27 wfjm
-- Tool versions:  xst 8.2-14.7; ghdl 0.18-0.31
36 9 wfjm
--
37 2 wfjm
-- Revision History: 
38
-- Date         Rev Version  Comment
39 27 wfjm
-- 2014-08-31   590   4.0    now full rlink v4 iface, 4 bit STAT
40
-- 2014-08-15   583   3.5    rb_mreq addr now 16 bit
41 16 wfjm
-- 2011-12-22   442   3.2    renamed and retargeted to test rlink_sp1c
42 13 wfjm
-- 2011-11-19   427   3.1.2  now numeric_std clean
43 9 wfjm
-- 2010-12-28   350   3.1.1  use CLKDIV/CDINIT=0;
44
-- 2010-12-26   348   3.1    use rlink_base now; add RTS/CTS ports
45
-- 2010-12-24   347   3.0.1  rename: CP_*->RL->*
46
-- 2010-12-05   343   3.0    rri->rlink renames; port to rbus V3 protocol;
47 2 wfjm
-- 2010-06-03   300   2.2.3  use default FAWIDTH for rri_core_serport
48
-- 2010-05-02   287   2.2.2  ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
49
--                           drop RP_IINT from interfaces; drop RTSFLUSH generic
50
-- 2010-04-18   279   2.2.1  drop RTSFBUF generic for rri_serport
51
-- 2010-04-03   274   2.2    add CP_FLUSH, add rri_serport handshake logic
52
-- 2009-03-14   197   2.1    remove records in interface to allow _ssim usage
53
-- 2008-08-24   162   2.0    with new rb_mreq/rb_sres interface
54
-- 2007-11-24    98   1.1    added RP_IINT support
55
-- 2007-07-02    63   1.0    Initial version 
56
------------------------------------------------------------------------------
57
 
58
library ieee;
59
use ieee.std_logic_1164.all;
60 13 wfjm
use ieee.numeric_std.all;
61 2 wfjm
 
62
use work.slvtypes.all;
63 9 wfjm
use work.rblib.all;
64
use work.rlinklib.all;
65 2 wfjm
 
66 16 wfjm
entity tbu_rlink_sp1c is                -- rlink core+serport combo
67 2 wfjm
  port (
68
    CLK  : in slbit;                    -- clock
69 9 wfjm
    CE_INT : in slbit;                  -- rlink ito time unit clock enable
70 2 wfjm
    CE_USEC : in slbit;                 -- 1 usec clock enable
71
    CE_MSEC : in slbit;                 -- 1 msec clock enable
72
    RESET  : in slbit;                  -- reset
73 9 wfjm
    RXSD : in slbit;                    -- receive serial data      (board view)
74
    TXSD : out slbit;                   -- transmit serial data     (board view)
75
    CTS_N : in slbit;                   -- clear to send   (act.low, board view)
76
    RTS_N : out slbit;                  -- request to send (act.low, board view)
77
    RB_MREQ_aval : out slbit;           -- rbus: request - aval
78
    RB_MREQ_re : out slbit;             -- rbus: request - re
79 2 wfjm
    RB_MREQ_we : out slbit;             -- rbus: request - we
80
    RB_MREQ_initt: out slbit;           -- rbus: request - init; avoid name coll
81 27 wfjm
    RB_MREQ_addr : out slv16;           -- rbus: request - addr
82 2 wfjm
    RB_MREQ_din : out slv16;            -- rbus: request - din
83
    RB_SRES_ack : in slbit;             -- rbus: response - ack
84
    RB_SRES_busy : in slbit;            -- rbus: response - busy
85
    RB_SRES_err : in slbit;             -- rbus: response - err
86
    RB_SRES_dout : in slv16;            -- rbus: response - dout
87
    RB_LAM : in slv16;                  -- rbus: look at me
88 27 wfjm
    RB_STAT : in slv4                   -- rbus: status flags
89 2 wfjm
  );
90 16 wfjm
end entity tbu_rlink_sp1c;
91 2 wfjm
 
92
 
93 16 wfjm
architecture syn of tbu_rlink_sp1c is
94 2 wfjm
 
95 9 wfjm
  constant CDWIDTH : positive := 13;
96 16 wfjm
  constant c_cdinit : natural := 0;   -- NOTE: change in tbd_rlink_sp1c !!
97 9 wfjm
 
98 2 wfjm
  signal RB_MREQ : rb_mreq_type := rb_mreq_init;
99
  signal RB_SRES : rb_sres_type := rb_sres_init;
100
 
101 9 wfjm
  signal RLB_DI : slv8 := (others=>'0');
102
  signal RLB_ENA : slbit := '0';
103
  signal RLB_BUSY : slbit := '0';
104
  signal RLB_DO : slv8 := (others=>'0');
105
  signal RLB_VAL : slbit := '0';
106
  signal RLB_HOLD : slbit := '0';
107 2 wfjm
 
108
begin
109
 
110 9 wfjm
  RB_MREQ_aval <= RB_MREQ.aval;
111
  RB_MREQ_re   <= RB_MREQ.re;
112 2 wfjm
  RB_MREQ_we   <= RB_MREQ.we;
113
  RB_MREQ_initt<= RB_MREQ.init;
114
  RB_MREQ_addr <= RB_MREQ.addr;
115
  RB_MREQ_din  <= RB_MREQ.din;
116
 
117
  RB_SRES.ack  <= RB_SRES_ack;
118
  RB_SRES.busy <= RB_SRES_busy;
119
  RB_SRES.err  <= RB_SRES_err;
120
  RB_SRES.dout <= RB_SRES_dout;
121 9 wfjm
 
122 16 wfjm
  RLINK : rlink_sp1c
123 9 wfjm
    generic map (
124 27 wfjm
      BTOWIDTH     =>  5,
125
      RTAWIDTH     => 11,
126
      SYSID        => x"76543210",
127 16 wfjm
      IFAWIDTH     => 5,
128
      OFAWIDTH     => 5,
129 27 wfjm
      ENAPIN_RLMON => sbcntl_sbf_rlmon,
130
      ENAPIN_RLBMON=> sbcntl_sbf_rlbmon,
131
      ENAPIN_RBMON => sbcntl_sbf_rbmon,
132 16 wfjm
      CDWIDTH      => 15,
133
      CDINIT       => c_cdinit)
134 2 wfjm
    port map (
135 16 wfjm
      CLK      => CLK,
136
      CE_USEC  => CE_USEC,
137
      CE_MSEC  => CE_MSEC,
138
      CE_INT   => CE_INT,
139
      RESET    => RESET,
140
      ENAXON   => '0',
141
      ENAESC   => '0',
142
      RXSD     => RXSD,
143
      TXSD     => TXSD,
144
      CTS_N    => CTS_N,
145
      RTS_N    => RTS_N,
146
      RB_MREQ  => RB_MREQ,
147
      RB_SRES  => RB_SRES,
148
      RB_LAM   => RB_LAM,
149
      RB_STAT  => RB_STAT,
150
      RL_MONI  => open
151
  --  SER_MONI => open  -- ISE 13.1 err's when a second record is mapped open
152 2 wfjm
    );
153
 
154
end syn;

powered by: WebSVN 2.1.0

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