w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
tbd_nx_cram_memctl_as.vhd
Go to the documentation of this file.
1-- $Id: tbd_nx_cram_memctl_as.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2010-2016 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: tbd_nx_cram_memctl_as - syn
7-- Description: Wrapper for nx_cram_memctl_as to avoid records & generics.
8-- It has a port interface which will not be modified by xst
9-- synthesis (no records, no generic port).
10--
11-- Dependencies: nx_cram_memctl_as
12-- To test: nx_cram_memctl_as
13--
14-- Target Devices: generic
15--
16-- Synthesized (xst):
17-- Date Rev ise Target flop lutl lutm slic t peri
18-- 2010-06-03 299 11.4 L68 xc3s1200e-4 91 122 0 107 t 11.4
19-- 2010-05-30 297 11.4 L68 xc3s1200e-4 91 99 0 95 t 13.1
20--
21-- Tool versions: xst 11.4-14.7; ghdl 0.26-0.31
22-- Revision History:
23-- Date Rev Version Comment
24-- 2016-08-27 802 1.2.1 use cram_read0delay ect
25-- 2011-11-26 433 1.2 renamed from tbd_n2_cram_memctl_as
26-- 2011-11-23 432 1.1 remove O_FLA_CE_N port from n2_cram_memctl
27-- 2010-06-03 298 1.0.1 add hack to force IOB'FFs to O_MEM_ADDR
28-- 2010-05-30 297 1.0 Initial version
29------------------------------------------------------------------------------
30
31library ieee;
32use ieee.std_logic_1164.all;
33
34use work.slvtypes.all;
35use work.nxcramlib.all;
36
37entity tbd_nx_cram_memctl_as is -- CRAM controller (async mode) [tb wrap]
38 -- generic: READ0=2;READ1=2;WRITE=3
39 port (
40 CLK : in slbit; -- clock
41 RESET : in slbit; -- reset
42 REQ : in slbit; -- request
43 WE : in slbit; -- write enable
44 BUSY : out slbit; -- controller busy
45 ACK_R : out slbit; -- acknowledge read
46 ACK_W : out slbit; -- acknowledge write
47 ACT_R : out slbit; -- signal active read
48 ACT_W : out slbit; -- signal active write
49 ADDR : in slv22; -- address (32 bit word address)
50 BE : in slv4; -- byte enable
51 DI : in slv32; -- data in (memory view)
52 DO : out slv32; -- data out (memory view)
53 O_MEM_CE_N : out slbit; -- cram: chip enable (act.low)
54 O_MEM_BE_N : out slv2; -- cram: byte enables (act.low)
55 O_MEM_WE_N : out slbit; -- cram: write enable (act.low)
56 O_MEM_OE_N : out slbit; -- cram: output enable (act.low)
57 O_MEM_ADV_N : out slbit; -- cram: address valid (act.low)
58 O_MEM_CLK : out slbit; -- cram: clock
59 O_MEM_CRE : out slbit; -- cram: command register enable
60 I_MEM_WAIT : in slbit; -- cram: mem wait
61 O_MEM_ADDR : out slv23; -- cram: address lines
62 IO_MEM_DATA : inout slv16 -- cram: data lines
63 );
65
66
67architecture syn of tbd_nx_cram_memctl_as is
68
69 signal ADDR_X : slv22 := (others=>'0');
70
71begin
72
73 -- Note: This is a hack to ensure that the IOB flops are on the O_MEM_ADDR
74 -- pins. Without par might choose to use IFF's on ADDR, causing varying
75 -- routing delays to O_MEM_ADDR. Didn't find a better way, setting
76 -- iob "false" attributes in ADDR didn't help.
77 -- This logic doesn't hurt, and prevents that IFFs for ADDR compete with
78 -- OFF's for O_MEM_ADDR.
79
80 ADDR_X <= ADDR when RESET='0' else (others=>'0');
81
82 CRAMCTL : nx_cram_memctl_as
83 generic map (
84 READ0DELAY => cram_read0delay(50), -- assume 50 MHz system clock. Must be
85 READ1DELAY => cram_read1delay(50), -- modified when clock_period is
86 WRITEDELAY => cram_writedelay(50)) -- changed in tb_nx_cram_memctl !!
87 port map (
88 CLK => CLK,
89 RESET => RESET,
90 REQ => REQ,
91 WE => WE,
92 BUSY => BUSY,
93 ACK_R => ACK_R,
94 ACK_W => ACK_W,
95 ACT_R => ACT_R,
96 ACT_W => ACT_W,
97 ADDR => ADDR_X,
98 BE => BE,
99 DI => DI,
100 DO => DO,
111 );
112
113end syn;
READ0DELAY positive := 4
WRITEDELAY positive := 4
inout IO_MEM_DATA slv16
READ1DELAY positive := 2
std_logic_vector( 22 downto 0) slv23
Definition: slvtypes.vhd:56
std_logic_vector( 3 downto 0) slv4
Definition: slvtypes.vhd:36
std_logic_vector( 31 downto 0) slv32
Definition: slvtypes.vhd:59
std_logic_vector( 15 downto 0) slv16
Definition: slvtypes.vhd:48
std_logic_vector( 21 downto 0) slv22
Definition: slvtypes.vhd:55
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 1 downto 0) slv2
Definition: slvtypes.vhd:34
slv22 :=( others => '0') ADDR_X