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

Subversion Repositories t51

[/] [t51/] [trunk/] [bench/] [vhdl/] [TestBench52.vhd] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jesus
library IEEE;
2
use IEEE.std_logic_1164.all;
3
use work.StimLog.all;
4
 
5
entity TestBench52 is
6
end TestBench52;
7
 
8
architecture behaviour of TestBench52 is
9
 
10
        signal Clk                      : std_logic := '0';
11
        signal Rst_n            : std_logic := '0';
12
        signal RXD                      : std_logic;
13
        signal RXD_IsOut        : std_logic;
14
        signal RXD_Out          : std_logic;
15
        signal TXD                      : std_logic;
16
        signal INT0                     : std_logic := '0';
17
        signal P0                       : std_logic_vector(7 downto 0);
18
        signal P1                       : std_logic_vector(7 downto 0);
19
        signal P2                       : std_logic_vector(7 downto 0);
20
        signal P3                       : std_logic_vector(7 downto 0);
21 31 andreas
        signal p3_out   : std_logic_vector(7 downto 0);
22 47 andreas
  signal XRAM_WE_s   : std_logic;
23
  signal XRAM_STB_s  : std_logic;
24
  signal XRAM_CYC_s  : std_logic;
25
  signal XRAM_ACK_s  : std_logic;
26
  signal XRAM_DATI_s : std_logic_vector(7 downto 0);
27
  signal XRAM_ADR_s  : std_logic_vector(15 downto 0);
28
  signal XRAM_DATO_s : std_logic_vector(7 downto 0);
29 2 jesus
 
30
begin
31
 
32
        u0 : entity work.T8052
33
                port map(
34
                        Clk => Clk,
35
                        Rst_n => Rst_n,
36 31 andreas
                        P0_in => P0,
37
                        P1_in => P1,
38
                        P2_in => P2,
39
                        P3_in => P3,
40
                        P0_out => P0,
41
      P1_out => P1,
42
      P2_out => P2,
43
      P3_out => P3_out,
44 2 jesus
                        INT0 => INT0,
45
                        INT1 => '1',
46
                        T0 => '1',
47
                        T1 => '1',
48
                        T2 => '1',
49
                        T2EX => '1',
50
                        RXD => RXD,
51
                        RXD_IsO => RXD_IsOut,
52
                        RXD_O => RXD_Out,
53
                        TXD => TXD,
54 47 andreas
                        XRAM_WE_O  => XRAM_WE_s,
55
      XRAM_STB_O => XRAM_STB_s,
56
      XRAM_CYC_O => XRAM_CYC_s,
57
      XRAM_ACK_I => XRAM_ACK_s,
58
      XRAM_DAT_O => XRAM_DATO_s,
59
      XRAM_ADR_O => XRAM_ADR_s,
60
      XRAM_DAT_I => XRAM_DATI_s
61
                        );
62
 
63 2 jesus
        P3(0) <= RXD;
64 31 andreas
        P3(7 downto 1) <= P3_out(7 downto 1);
65 47 andreas
        XRAM_DATI_s    <= (others => '1');
66
        XRAM_ACK_s     <= XRAM_STB_s;
67 2 jesus
 
68 31 andreas
        as : AsyncStim generic map(FileName => "BASIC.txt", InterCharDelay => 5000 us, Baud => 57600, Bits => 8)
69 2 jesus
                                port map(RXD);
70
 
71 31 andreas
        al : AsyncLog generic map(FileName => "RX_Log.txt", Baud => 57600, Bits => 8)
72 2 jesus
                                port map(TXD);
73
 
74
        Clk <= not Clk after 45 ns;
75
        Rst_n <= '1' after 200 ns;
76
 
77
        INT0 <= not INT0 after 100 us;
78
 
79
end;

powered by: WebSVN 2.1.0

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