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