1 |
2 |
wfjm |
-- $Id: tbd_rri_core.vhd 314 2010-07-09 17:38:41Z mueller $
|
2 |
|
|
--
|
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 |
|
|
-- Module Name: tbd_rri_core - syn
|
16 |
|
|
-- Description: Wrapper for rri_core to avoid records. It has a port
|
17 |
|
|
-- interface which will not be modified by xst synthesis
|
18 |
|
|
-- (no records, no generic port).
|
19 |
|
|
--
|
20 |
|
|
-- Dependencies: rri_core
|
21 |
|
|
--
|
22 |
|
|
-- To test: rri_core
|
23 |
|
|
--
|
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 |
|
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 11.4; ghdl 0.18-0.26
|
35 |
|
|
-- Revision History:
|
36 |
|
|
-- Date Rev Version Comment
|
37 |
|
|
-- 2010-05-02 287 2.2.1 ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
|
38 |
|
|
-- drop RP_IINT signal from interfaces
|
39 |
|
|
-- 2010-04-03 274 2.2 add CP_FLUSH for rri_core, add CE_USEC
|
40 |
|
|
-- 2009-03-14 197 2.1 remove records in interface to allow _ssim usage
|
41 |
|
|
-- 2008-08-24 162 2.0 with new rb_mreq/rb_sres interface
|
42 |
|
|
-- 2007-11-25 98 1.1 added RP_IINT support; use entity rather arch
|
43 |
|
|
-- name to switch core/serport
|
44 |
|
|
-- 2007-07-02 63 1.0 Initial version
|
45 |
|
|
------------------------------------------------------------------------------
|
46 |
|
|
|
47 |
|
|
library ieee;
|
48 |
|
|
use ieee.std_logic_1164.all;
|
49 |
|
|
use ieee.std_logic_arith.all;
|
50 |
|
|
|
51 |
|
|
use work.slvtypes.all;
|
52 |
|
|
use work.rrilib.all;
|
53 |
|
|
|
54 |
|
|
entity tbd_rri_core is -- rri_core tb design
|
55 |
|
|
-- generic: ATOWIDTH=5; ITOWIDTH=6
|
56 |
|
|
-- implements tbd_rri_gen
|
57 |
|
|
port (
|
58 |
|
|
CLK : in slbit; -- clock
|
59 |
|
|
CE_INT : in slbit; -- rri ito time unit clock enable
|
60 |
|
|
CE_USEC : in slbit; -- 1 usec clock enable
|
61 |
|
|
RESET : in slbit; -- reset
|
62 |
|
|
CP_DI : in slv9; -- comm port: data in
|
63 |
|
|
CP_ENA : in slbit; -- comm port: data enable
|
64 |
|
|
CP_BUSY : out slbit; -- comm port: data busy
|
65 |
|
|
CP_DO : out slv9; -- comm port: data out
|
66 |
|
|
CP_VAL : out slbit; -- comm port: data valid
|
67 |
|
|
CP_HOLD : in slbit; -- comm port: data hold
|
68 |
|
|
RB_MREQ_req : out slbit; -- rbus: request - req
|
69 |
|
|
RB_MREQ_we : out slbit; -- rbus: request - we
|
70 |
|
|
RB_MREQ_initt : out slbit; -- rbus: request - init; avoid name coll
|
71 |
|
|
RB_MREQ_addr : out slv8; -- rbus: request - addr
|
72 |
|
|
RB_MREQ_din : out slv16; -- rbus: request - din
|
73 |
|
|
RB_SRES_ack : in slbit; -- rbus: response - ack
|
74 |
|
|
RB_SRES_busy : in slbit; -- rbus: response - busy
|
75 |
|
|
RB_SRES_err : in slbit; -- rbus: response - err
|
76 |
|
|
RB_SRES_dout : in slv16; -- rbus: response - dout
|
77 |
|
|
RB_LAM : in slv16; -- rbus: look at me
|
78 |
|
|
RB_STAT : in slv3; -- rbus: status flags
|
79 |
|
|
TXRXACT : out slbit -- txrx active flag
|
80 |
|
|
);
|
81 |
|
|
end entity tbd_rri_core;
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
architecture syn of tbd_rri_core is
|
85 |
|
|
|
86 |
|
|
signal CP_FLUSH : slbit := '0';
|
87 |
|
|
signal RB_MREQ : rb_mreq_type := rb_mreq_init;
|
88 |
|
|
signal RB_SRES : rb_sres_type := rb_sres_init;
|
89 |
|
|
|
90 |
|
|
begin
|
91 |
|
|
|
92 |
|
|
RB_MREQ_req <= RB_MREQ.req;
|
93 |
|
|
RB_MREQ_we <= RB_MREQ.we;
|
94 |
|
|
RB_MREQ_initt<= RB_MREQ.init;
|
95 |
|
|
RB_MREQ_addr <= RB_MREQ.addr;
|
96 |
|
|
RB_MREQ_din <= RB_MREQ.din;
|
97 |
|
|
|
98 |
|
|
RB_SRES.ack <= RB_SRES_ack;
|
99 |
|
|
RB_SRES.busy <= RB_SRES_busy;
|
100 |
|
|
RB_SRES.err <= RB_SRES_err;
|
101 |
|
|
RB_SRES.dout <= RB_SRES_dout;
|
102 |
|
|
|
103 |
|
|
UUT : rri_core
|
104 |
|
|
generic map (
|
105 |
|
|
ATOWIDTH => 5,
|
106 |
|
|
ITOWIDTH => 6)
|
107 |
|
|
port map (
|
108 |
|
|
CLK => CLK,
|
109 |
|
|
CE_INT => CE_INT,
|
110 |
|
|
RESET => RESET,
|
111 |
|
|
CP_DI => CP_DI,
|
112 |
|
|
CP_ENA => CP_ENA,
|
113 |
|
|
CP_BUSY => CP_BUSY,
|
114 |
|
|
CP_DO => CP_DO,
|
115 |
|
|
CP_VAL => CP_VAL,
|
116 |
|
|
CP_HOLD => CP_HOLD,
|
117 |
|
|
CP_FLUSH => CP_FLUSH,
|
118 |
|
|
RB_MREQ => RB_MREQ,
|
119 |
|
|
RB_SRES => RB_SRES,
|
120 |
|
|
RB_LAM => RB_LAM,
|
121 |
|
|
RB_STAT => RB_STAT
|
122 |
|
|
);
|
123 |
|
|
|
124 |
|
|
TXRXACT <= '0';
|
125 |
|
|
|
126 |
|
|
end syn;
|