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

Subversion Repositories p9813_rgb_led_string_driver

[/] [p9813_rgb_led_string_driver/] [trunk/] [rtl/] [VHDL/] [testbench/] [pull_pack_sim.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jclaytons
--
2
-- Package with Pullup and Pulldown
3
-- Useful in simulation
4
--
5
library IEEE ;
6
use IEEE.STD_LOGIC_1164.all;
7
use IEEE.NUMERIC_STD.all;
8
 
9
package pull_pack_sim is
10
 
11
  component pullup1
12
    port(
13
      pin : inout  std_logic
14
    );
15
  end component;
16
 
17
  component pulldn1
18
    port(
19
      pin : inout  std_logic
20
    );
21
  end component;
22
 
23
end pull_pack_sim;
24
 
25
-------------------------------------------------------------------------------
26
-------------------------------------------------------------------------------
27
 
28
library IEEE ;
29
use IEEE.STD_LOGIC_1164.all;
30
use IEEE.NUMERIC_STD.all;
31
 
32
entity pullup1 is
33
  port(
34
    pin : inout std_logic
35
  );
36
end pullup1;
37
 
38
architecture beh of pullup1 is
39
begin
40
  plp: process (pin)
41
  begin
42
    if (pin = '1') then
43
      pin <= '1';
44
    elsif (pin = 'Z') then
45
      pin <= '1';
46
    else
47
      pin <= 'Z';
48
    end if;
49
  end process;
50
end beh;
51
 
52
library IEEE ;
53
use IEEE.STD_LOGIC_1164.all;
54
use IEEE.NUMERIC_STD.all;
55
 
56
entity pulldn1 is
57
  port(
58
    pin : inout  std_logic
59
  );
60
end pulldn1;
61
 
62
architecture beh of pulldn1 is
63
begin
64
  plp: process (pin)
65
  begin
66
    if (pin = '0') then
67
      pin <= '0';
68
    elsif (pin = 'Z') then
69
      pin <= '0';
70
    else
71
      pin <= 'Z';
72
    end if;
73
  end process;
74
end beh;

powered by: WebSVN 2.1.0

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