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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.5/] [rtl/] [vlib/] [rri/] [rri_core_serport.vhd] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wfjm
-- $Id: rri_core_serport.vhd 314 2010-07-09 17:38:41Z mueller $
2
--
3
-- Copyright 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:    rri_core_serport - syn
16
-- Description:    rri: core + serport combo, with cpmon and rbmon
17
--
18
-- Dependencies:   rri_serport
19
--                 rri_core
20
--                 rritb_cpmon_sb  [sim only]
21
--                 rritb_rbmon_sb  [sim only]
22
--
23
-- Test bench:     -
24
--
25
-- Target Devices: generic
26
-- Tool versions:  xst 11.4; ghdl 0.26
27
--
28
-- Synthesized (xst):
29
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
30
-- 2010-04-03   275  11.4    L68 xc3s1000-4   280  600   18  375 s  9.8
31
--
32
-- Revision History: 
33
-- Date         Rev Version  Comment
34
-- 2010-06-05   301   1.2.2  renamed _rpmon -> _rbmon
35
-- 2010-06-03   300   1.2.1  use FAWIDTH=5 
36
-- 2010-05-02   287   1.2    ren CE_XSEC->CE_INT,RP_STAT->RB_STAT,AP_LAM->RB_LAM
37
--                           drop RP_IINT from interfaces; drop RTSFLUSH generic
38
-- 2010-04-18   279   1.1    drop RTSFBUF generic
39
-- 2010-04-10   275   1.0    Initial version 
40
------------------------------------------------------------------------------
41
 
42
library ieee;
43
use ieee.std_logic_1164.all;
44
use ieee.std_logic_arith.all;
45
 
46
use work.slvtypes.all;
47
use work.rrilib.all;
48
-- synthesis translate_off
49
use work.rritblib.all;
50
-- synthesis translate_on
51
 
52
entity rri_core_serport is              -- rri, core+serport with cpmon+rbmon
53
  generic (
54
    ATOWIDTH : positive :=  5;          -- access timeout counter width
55
    ITOWIDTH : positive :=  6;          -- idle timeout counter width
56
    FAWIDTH : positive :=  5;           -- rx fifo address port width
57
    CDWIDTH : positive := 13;           -- clk divider width
58
    CDINIT : natural   := 15);          -- clk divider initial/reset setting
59
  port (
60
    CLK  : in slbit;                    -- clock
61
    CE_USEC : in slbit;                 -- 1 usec clock enable
62
    CE_MSEC : in slbit;                 -- 1 msec clock enable
63
    CE_INT : in slbit := '0';           -- rri ito time unit 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 := '0';            -- clear to send   (act.low, board view)
68
    RTS_N : out slbit;                  -- request to send (act.low, board view)
69
    RB_MREQ : out rb_mreq_type;         -- rbus: request
70
    RB_SRES : in rb_sres_type;          -- rbus: response
71
    RB_LAM : in slv16;                  -- rbus: look at me
72
    RB_STAT : in slv3                   -- rbus: status flags
73
  );
74
end entity rri_core_serport;
75
 
76
 
77
architecture syn of rri_core_serport is
78
 
79
  signal CP_DI : slv9 := (others=>'0');
80
  signal CP_ENA : slbit := '0';
81
  signal CP_BUSY : slbit := '0';
82
  signal CP_DO : slv9 := (others=>'0');
83
  signal CP_VAL : slbit := '0';
84
  signal CP_HOLD : slbit := '0';
85
  signal CP_FLUSH : slbit := '0';
86
 
87
  signal RB_MREQ_L : rb_mreq_type := rb_mreq_init;  -- local, readable RB_MREQ
88
 
89
begin
90
 
91
  SER2RRI : rri_serport
92
    generic map (
93
      CPREF    => "1000",
94
      FAWIDTH  => FAWIDTH,
95
      CDWIDTH  => CDWIDTH,
96
      CDINIT   => CDINIT)
97
    port map (
98
      CLK      => CLK,
99
      CE_USEC  => CE_USEC,
100
      CE_MSEC  => CE_MSEC,
101
      RESET    => RESET,
102
      RXSD     => RXSD,
103
      TXSD     => TXSD,
104
      CTS_N    => CTS_N,
105
      RTS_N    => RTS_N,
106
      CP_DI    => CP_DI,
107
      CP_ENA   => CP_ENA,
108
      CP_BUSY  => CP_BUSY,
109
      CP_DO    => CP_DO,
110
      CP_VAL   => CP_VAL,
111
      CP_HOLD  => CP_HOLD,
112
      CP_FLUSH => CP_FLUSH
113
    );
114
 
115
  RRI : rri_core
116
    generic map (
117
      ATOWIDTH => ATOWIDTH,
118
      ITOWIDTH => ITOWIDTH)
119
    port map (
120
      CLK      => CLK,
121
      CE_INT   => CE_INT,
122
      RESET    => RESET,
123
      CP_DI    => CP_DI,
124
      CP_ENA   => CP_ENA,
125
      CP_BUSY  => CP_BUSY,
126
      CP_DO    => CP_DO,
127
      CP_VAL   => CP_VAL,
128
      CP_HOLD  => CP_HOLD,
129
      CP_FLUSH => CP_FLUSH,
130
      RB_MREQ  => RB_MREQ_L,
131
      RB_SRES  => RB_SRES,
132
      RB_LAM   => RB_LAM,
133
      RB_STAT  => RB_STAT
134
    );
135
 
136
  -- vhdl'93 unfortunately doesn't allow to read a signal bound to an out port
137
  -- because RB_MREQ is read by the monitors, an extra internal
138
  -- signal must be used. This will not be needed with vhdl'2000 anymore
139
 
140
  RB_MREQ <= RB_MREQ_L;
141
 
142
-- synthesis translate_off
143
  CPMON : rritb_cpmon_sb
144
    generic map (
145
      DWIDTH => CP_DI'length,
146
      ENAPIN => 15)
147
    port map (
148
      CLK     => CLK,
149
      CP_DI   => CP_DI,
150
      CP_ENA  => CP_ENA,
151
      CP_BUSY => CP_BUSY,
152
      CP_DO   => CP_DO,
153
      CP_VAL  => CP_VAL,
154
      CP_HOLD => CP_HOLD
155
    );
156
 
157
  RBMON : rritb_rbmon_sb
158
    generic map (
159
      DBASE  => 8,
160
      ENAPIN => 14)
161
    port map (
162
      CLK     => CLK,
163
      RB_MREQ => RB_MREQ_L,
164
      RB_SRES => RB_SRES,
165
      RB_LAM  => RB_LAM,
166
      RB_STAT => RB_STAT
167
    );
168
-- synthesis translate_on
169
 
170
end syn;

powered by: WebSVN 2.1.0

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