1 |
13 |
wfjm |
-- $Id: tbd_rlink_direct.vhd 427 2011-11-19 21:04:11Z mueller $
|
2 |
2 |
wfjm |
--
|
3 |
|
|
-- Copyright 2007-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
4 |
|
|
--
|
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 |
9 |
wfjm |
-- Module Name: tbd_rlink_direct - syn
|
16 |
|
|
-- Description: Wrapper for rlink_core to avoid records. It has a port
|
17 |
2 |
wfjm |
-- interface which will not be modified by xst synthesis
|
18 |
|
|
-- (no records, no generic port).
|
19 |
|
|
--
|
20 |
9 |
wfjm |
-- Dependencies: rlink_core
|
21 |
2 |
wfjm |
--
|
22 |
9 |
wfjm |
-- To test: rlink_core
|
23 |
2 |
wfjm |
--
|
24 |
|
|
-- Target Devices: generic
|
25 |
|
|
--
|
26 |
|
|
-- Synthesized (xst):
|
27 |
|
|
-- Date Rev ise Target flop lutl lutm slic t peri
|
28 |
|
|
-- 2007-11-24 92 8.1.03 I27 xc3s1000-4 143 309 0 166 s 7.64
|
29 |
|
|
-- 2007-10-27 92 9.2.02 J39 xc3s1000-4 148 320 0 - t 8.34
|
30 |
|
|
-- 2007-10-27 92 9.1 J30 xc3s1000-4 148 315 0 - t 8.34
|
31 |
|
|
-- 2007-10-27 92 8.2.03 I34 xc3s1000-4 153 302 0 162 s 7.65
|
32 |
|
|
-- 2007-10-27 92 8.1.03 I27 xc3s1000-4 138 306 0 - s 7.64
|
33 |
|
|
--
|
34 |
9 |
wfjm |
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29
|
35 |
|
|
--
|
36 |
2 |
wfjm |
-- Revision History:
|
37 |
|
|
-- Date Rev Version Comment
|
38 |
9 |
wfjm |
-- 2010-12-25 348 3.0.2 drop RL_FLUSH, add RL_MONI for rlink_core
|
39 |
|
|
-- 2010-12-24 347 3.0.1 rename: CP_*->RL->*
|
40 |
|
|
-- 2010-12-05 343 3.0 rri->rlink renames; port to rbus V3 protocol;
|
41 |
2 |
wfjm |
-- 2010-05-02 287 2.2.1 ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
|
42 |
|
|
-- drop RP_IINT signal from interfaces
|
43 |
|
|
-- 2010-04-03 274 2.2 add CP_FLUSH for rri_core, add CE_USEC
|
44 |
|
|
-- 2009-03-14 197 2.1 remove records in interface to allow _ssim usage
|
45 |
|
|
-- 2008-08-24 162 2.0 with new rb_mreq/rb_sres interface
|
46 |
|
|
-- 2007-11-25 98 1.1 added RP_IINT support; use entity rather arch
|
47 |
|
|
-- name to switch core/serport
|
48 |
|
|
-- 2007-07-02 63 1.0 Initial version
|
49 |
|
|
------------------------------------------------------------------------------
|
50 |
|
|
|
51 |
|
|
library ieee;
|
52 |
|
|
use ieee.std_logic_1164.all;
|
53 |
|
|
|
54 |
|
|
use work.slvtypes.all;
|
55 |
9 |
wfjm |
use work.rblib.all;
|
56 |
|
|
use work.rlinklib.all;
|
57 |
2 |
wfjm |
|
58 |
9 |
wfjm |
entity tbd_rlink_direct is -- rlink_core only tb design
|
59 |
2 |
wfjm |
-- generic: ATOWIDTH=5; ITOWIDTH=6
|
60 |
9 |
wfjm |
-- implements tbd_rlink_gen
|
61 |
2 |
wfjm |
port (
|
62 |
|
|
CLK : in slbit; -- clock
|
63 |
9 |
wfjm |
CE_INT : in slbit; -- rlink ito time unit clock enable
|
64 |
2 |
wfjm |
CE_USEC : in slbit; -- 1 usec clock enable
|
65 |
|
|
RESET : in slbit; -- reset
|
66 |
9 |
wfjm |
RL_DI : in slv9; -- rlink: data in
|
67 |
|
|
RL_ENA : in slbit; -- rlink: data enable
|
68 |
|
|
RL_BUSY : out slbit; -- rlink: data busy
|
69 |
|
|
RL_DO : out slv9; -- rlink: data out
|
70 |
|
|
RL_VAL : out slbit; -- rlink: data valid
|
71 |
|
|
RL_HOLD : in slbit; -- rlink: data hold
|
72 |
|
|
RB_MREQ_aval : out slbit; -- rbus: request - aval
|
73 |
|
|
RB_MREQ_re : out slbit; -- rbus: request - re
|
74 |
2 |
wfjm |
RB_MREQ_we : out slbit; -- rbus: request - we
|
75 |
|
|
RB_MREQ_initt : out slbit; -- rbus: request - init; avoid name coll
|
76 |
|
|
RB_MREQ_addr : out slv8; -- rbus: request - addr
|
77 |
|
|
RB_MREQ_din : out slv16; -- rbus: request - din
|
78 |
|
|
RB_SRES_ack : in slbit; -- rbus: response - ack
|
79 |
|
|
RB_SRES_busy : in slbit; -- rbus: response - busy
|
80 |
|
|
RB_SRES_err : in slbit; -- rbus: response - err
|
81 |
|
|
RB_SRES_dout : in slv16; -- rbus: response - dout
|
82 |
|
|
RB_LAM : in slv16; -- rbus: look at me
|
83 |
|
|
RB_STAT : in slv3; -- rbus: status flags
|
84 |
|
|
TXRXACT : out slbit -- txrx active flag
|
85 |
|
|
);
|
86 |
9 |
wfjm |
end entity tbd_rlink_direct;
|
87 |
2 |
wfjm |
|
88 |
|
|
|
89 |
9 |
wfjm |
architecture syn of tbd_rlink_direct is
|
90 |
2 |
wfjm |
|
91 |
9 |
wfjm |
signal RL_MONI : rl_moni_type := rl_moni_init;
|
92 |
2 |
wfjm |
signal RB_MREQ : rb_mreq_type := rb_mreq_init;
|
93 |
|
|
signal RB_SRES : rb_sres_type := rb_sres_init;
|
94 |
|
|
|
95 |
|
|
begin
|
96 |
|
|
|
97 |
9 |
wfjm |
RB_MREQ_aval <= RB_MREQ.aval;
|
98 |
|
|
RB_MREQ_re <= RB_MREQ.re;
|
99 |
2 |
wfjm |
RB_MREQ_we <= RB_MREQ.we;
|
100 |
|
|
RB_MREQ_initt<= RB_MREQ.init;
|
101 |
|
|
RB_MREQ_addr <= RB_MREQ.addr;
|
102 |
|
|
RB_MREQ_din <= RB_MREQ.din;
|
103 |
|
|
|
104 |
|
|
RB_SRES.ack <= RB_SRES_ack;
|
105 |
|
|
RB_SRES.busy <= RB_SRES_busy;
|
106 |
|
|
RB_SRES.err <= RB_SRES_err;
|
107 |
|
|
RB_SRES.dout <= RB_SRES_dout;
|
108 |
|
|
|
109 |
9 |
wfjm |
UUT : rlink_core
|
110 |
2 |
wfjm |
generic map (
|
111 |
|
|
ATOWIDTH => 5,
|
112 |
|
|
ITOWIDTH => 6)
|
113 |
|
|
port map (
|
114 |
|
|
CLK => CLK,
|
115 |
|
|
CE_INT => CE_INT,
|
116 |
|
|
RESET => RESET,
|
117 |
9 |
wfjm |
RL_DI => RL_DI,
|
118 |
|
|
RL_ENA => RL_ENA,
|
119 |
|
|
RL_BUSY => RL_BUSY,
|
120 |
|
|
RL_DO => RL_DO,
|
121 |
|
|
RL_VAL => RL_VAL,
|
122 |
|
|
RL_HOLD => RL_HOLD,
|
123 |
|
|
RL_MONI => RL_MONI,
|
124 |
2 |
wfjm |
RB_MREQ => RB_MREQ,
|
125 |
|
|
RB_SRES => RB_SRES,
|
126 |
|
|
RB_LAM => RB_LAM,
|
127 |
|
|
RB_STAT => RB_STAT
|
128 |
|
|
);
|
129 |
|
|
|
130 |
|
|
TXRXACT <= '0';
|
131 |
|
|
|
132 |
|
|
end syn;
|