w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
iob_keeper_gen.vhd
Go to the documentation of this file.
1-- $Id: iob_keeper_gen.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: iob_keeper_gen - sim
7-- Description: keeper for IOB, vector
8--
9-- Dependencies: -
10-- Test bench: -
11-- Target Devices: generic Spartan, Virtex
12-- Tool versions: xst 8.1-14.7; ghdl 0.18-0.31
13-- Revision History:
14-- Date Rev Version Comment
15-- 2010-06-03 299 1.1 add explicit R_KEEP and driver
16-- 2008-05-22 148 1.0 Initial version
17------------------------------------------------------------------------------
18
19library ieee;
20use ieee.std_logic_1164.all;
21
22use work.slvtypes.all;
23use work.xlib.all;
24
25entity iob_keeper_gen is -- keeper for IOB, vector
26 generic (
27 DWIDTH : positive := 16); -- data port width
28 port (
29 PAD : inout slv(DWIDTH-1 downto 0) -- i/o pad
30 );
32
33-- Is't possible to directly use 'PAD<='H' in proc_pad. Introduced R_KEEP and
34-- the explicit driver 'PAD<=R_KEEP' to state the keeper function more clearly.
35
36architecture sim of iob_keeper_gen is
37 signal R_KEEP : slv(DWIDTH-1 downto 0) := (others=>'W');
38begin
39
40 proc_keep: process (PAD)
41 begin
42 for i in PAD'range loop
43 if PAD(i) = '1' then
44 R_KEEP(i) <= 'H';
45 elsif PAD(i) = '0' then
46 R_KEEP(i) <= 'L';
47 elsif PAD(i)='X' or PAD(i)='U' then
48 R_KEEP(i) <= 'W';
49 end if;
50 end loop;
51 PAD <= R_KEEP;
52 end process proc_keep;
53
54end sim;
slv( DWIDTH- 1 downto 0) :=( others => 'W') R_KEEP
inout PAD slv( DWIDTH- 1 downto 0)
DWIDTH positive := 16
std_logic_vector slv
Definition: slvtypes.vhd:31
Definition: xlib.vhd:35