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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [rtl/] [bplib/] [nxcramlib/] [tb/] [tbd_nx_cram_memctl_as.vhd] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 wfjm
-- $Id: tbd_nx_cram_memctl_as.vhd 433 2011-11-27 22:04:39Z mueller $
2
--
3
-- Copyright 2010-2011 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_nx_cram_memctl_as - syn
16
-- Description:    Wrapper for nx_cram_memctl_as to avoid records & generics.
17
--                 It has a port interface which will not be modified by xst
18
--                 synthesis (no records, no generic port).
19
--
20
-- Dependencies:   nx_cram_memctl_as
21
-- To test:        nx_cram_memctl_as
22
--
23
-- Target Devices: generic
24
--
25
-- Synthesized (xst):
26
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
27
-- 2010-06-03   299  11.4   L68  xc3s1200e-4   91  122    0  107 t 11.4 
28
-- 2010-05-30   297  11.4   L68  xc3s1200e-4   91   99    0   95 t 13.1 
29
--
30
-- Tool versions:  xst 11.4, 13.1; ghdl 0.26-0.29
31
-- Revision History: 
32
-- Date         Rev Version  Comment
33
-- 2011-11-26   433   1.2    renamed from tbd_n2_cram_memctl_as
34
-- 2011-11-23   432   1.1    remove O_FLA_CE_N port from n2_cram_memctl
35
-- 2010-06-03   298   1.0.1  add hack to force IOB'FFs to O_MEM_ADDR
36
-- 2010-05-30   297   1.0    Initial version 
37
------------------------------------------------------------------------------
38
 
39
library ieee;
40
use ieee.std_logic_1164.all;
41
 
42
use work.slvtypes.all;
43
use work.nxcramlib.all;
44
 
45
entity tbd_nx_cram_memctl_as is         -- CRAM driver (async mode) [tb design]
46
                                        -- generic: READ0=2;READ1=2;WRITE=3
47
  port (
48
    CLK : in slbit;                     -- clock
49
    RESET : in slbit;                   -- reset
50
    REQ   : in slbit;                   -- request
51
    WE    : in slbit;                   -- write enable
52
    BUSY : out slbit;                   -- controller busy
53
    ACK_R : out slbit;                  -- acknowledge read
54
    ACK_W : out slbit;                  -- acknowledge write
55
    ACT_R : out slbit;                  -- signal active read
56
    ACT_W : out slbit;                  -- signal active write
57
    ADDR : in slv22;                    -- address  (32 bit word address)
58
    BE : in slv4;                       -- byte enable
59
    DI : in slv32;                      -- data in  (memory view)
60
    DO : out slv32;                     -- data out (memory view)
61
    O_MEM_CE_N : out slbit;             -- cram: chip enable   (act.low)
62
    O_MEM_BE_N : out slv2;              -- cram: byte enables  (act.low)
63
    O_MEM_WE_N : out slbit;             -- cram: write enable  (act.low)
64
    O_MEM_OE_N : out slbit;             -- cram: output enable (act.low)
65
    O_MEM_ADV_N : out slbit;            -- cram: address valid (act.low)
66
    O_MEM_CLK : out slbit;              -- cram: clock
67
    O_MEM_CRE : out slbit;              -- cram: command register enable
68
    I_MEM_WAIT : in slbit;              -- cram: mem wait
69
    O_MEM_ADDR  : out slv23;            -- cram: address lines
70
    IO_MEM_DATA : inout slv16           -- cram: data lines
71
  );
72
end tbd_nx_cram_memctl_as;
73
 
74
 
75
architecture syn of tbd_nx_cram_memctl_as is
76
 
77
  signal ADDR_X : slv22 := (others=>'0');
78
 
79
begin
80
 
81
  -- Note: This is a HACk to ensure that the IOB flops are on the O_MEM_ADDR
82
  --   pins. Without par might choose to use IFF's on ADDR, causing varying
83
  --   routing delays to O_MEM_ADDR. Didn't find a better way, setting
84
  --   iob "false" attributes in ADDR didn't help.
85
  --   This logic doesn't hurt, and prevents that IFFs for ADDR compete with
86
  --   OFF's for O_MEM_ADDR.
87
 
88
  ADDR_X <= ADDR when RESET='0' else (others=>'0');
89
 
90
  MEMCTL : nx_cram_memctl_as
91
    generic map (
92
      READ0DELAY => 2,
93
      READ1DELAY => 2,
94
      WRITEDELAY => 3)
95
    port map (
96
      CLK    => CLK,
97
      RESET  => RESET,
98
      REQ    => REQ,
99
      WE     => WE,
100
      BUSY   => BUSY,
101
      ACK_R  => ACK_R,
102
      ACK_W  => ACK_W,
103
      ACT_R  => ACT_R,
104
      ACT_W  => ACT_W,
105
      ADDR   => ADDR_X,
106
      BE     => BE,
107
      DI     => DI,
108
      DO     => DO,
109
      O_MEM_CE_N  => O_MEM_CE_N,
110
      O_MEM_BE_N  => O_MEM_BE_N,
111
      O_MEM_WE_N  => O_MEM_WE_N,
112
      O_MEM_OE_N  => O_MEM_OE_N,
113
      O_MEM_ADV_N => O_MEM_ADV_N,
114
      O_MEM_CLK   => O_MEM_CLK,
115
      O_MEM_CRE   => O_MEM_CRE,
116
      I_MEM_WAIT  => I_MEM_WAIT,
117
      O_MEM_ADDR  => O_MEM_ADDR,
118
      IO_MEM_DATA => IO_MEM_DATA
119
    );
120
 
121
end syn;

powered by: WebSVN 2.1.0

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