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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [vlib/] [xlib/] [iob_keeper_gen.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wfjm
-- $Id: iob_keeper_gen.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:    iob_keeper_gen - sim
16
-- Description:    keeper for IOB, vector
17
--
18
-- Dependencies:   -
19
-- Test bench:     -
20
-- Target Devices: generic Spartan, Virtex
21
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
22
-- Revision History: 
23
-- Date         Rev Version  Comment
24
-- 2010-06-03   299   1.1    add explicit R_KEEP and driver
25
-- 2008-05-22   148   1.0    Initial version 
26
------------------------------------------------------------------------------
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
 
31
use work.slvtypes.all;
32
use work.xlib.all;
33
 
34
entity iob_keeper_gen is                -- keeper for IOB, vector
35
  generic (
36
    DWIDTH : positive := 16);           -- data port width
37
  port (
38
    PAD  : inout slv(DWIDTH-1 downto 0)  -- i/o pad
39
  );
40
end iob_keeper_gen;
41
 
42
-- Is't possible to directly use 'PAD<='H' in proc_pad. Introduced R_KEEP and
43
-- the explicit driver 'PAD<=R_KEEP' to state the keeper function more clearly.
44
 
45
architecture sim of iob_keeper_gen is
46
  signal R_KEEP : slv(DWIDTH-1 downto 0) := (others=>'W');
47
begin
48
 
49
  proc_keep: process (PAD)
50
  begin
51
    for i in PAD'range loop
52
      if PAD(i) = '1' then
53
        R_KEEP(i) <= 'H';
54
      elsif PAD(i) = '0' then
55
        R_KEEP(i) <= 'L';
56
      elsif PAD(i)='X' or PAD(i)='U' then
57
        R_KEEP(i) <= 'W';
58
      end if;
59
    end loop;
60
    PAD <= R_KEEP;
61
  end process proc_keep;
62
 
63
end sim;

powered by: WebSVN 2.1.0

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