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

Subversion Repositories igor

[/] [igor/] [trunk/] [processor/] [mc/] [memtest.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 atypic
library ieee;
2
use ieee.std_logic_1164.all;
3
use work.leval_package.all;
4
 
5
 
6
entity memtest is
7
  port(
8
    clk : in std_logic;
9
    rst : in std_logic;
10
    pause : in std_logic;
11
    fpga_data : inout std_logic_vector(WORD_SIZE - 1 downto 0);
12
    fpga_addr : out     std_logic_vector(ADDR_SIZE - 1 downto 0);
13
    avr_irq : out std_logic;
14
    wait_f : in  std_logic;
15
    read : out std_logic;
16
    write : out std_logic;
17
    led : out std_logic_vector(7 downto 0));
18
end entity;
19
 
20
architecture rtl of memtest is
21
  -- Components:
22
  component leval is
23
  port (
24
     pause : in std_logic;
25
     rst : in std_logic;
26
     clk : in std_logic;
27
     data_bus : inout std_logic_vector(BUS_SIZE-1 downto 0);
28
     addr_bus : out std_logic_vector(ADDR_SIZE-1 downto 0);
29
     wait_s : in std_logic;
30
     read  : out std_logic;
31
     write : out std_logic;
32
     led       : out std_logic_vector(7 downto 0));
33
  end   component;
34
 
35
  component addr_decoder is
36
  port (
37
    leval_addr  : in std_logic_vector(ADDR_SIZE - 1 downto 0);
38
    avr_irq             : out std_logic;
39
    wt                  : out std_logic
40
  );
41
  end component;
42
 
43
  component ext_mem is
44
    port(
45
      we : in std_logic;
46
      re : in std_logic;
47
      a : in std_logic_vector(4 downto 0);
48
      d : inout std_logic_vector(WORD_SIZE - 1 downto 0)
49
    );
50
  end component;
51
 
52
  -- Signals:
53
  signal addr_s : std_logic_vector(ADDR_SIZE - 1 downto 0);
54
  signal data_s : std_logic_vector(WORD_SIZE - 1 downto 0);
55
  signal data_out_s : std_logic_vector(WORD_SIZE - 1 downto 0);
56
  signal data_in_s : std_logic_vector(WORD_SIZE - 1 downto 0);
57
  signal write_s : std_logic;
58
  signal read_s : std_logic;
59
  signal wait_s : std_logic;
60
 
61
 
62
  signal flash_ce0      : std_logic;
63
  signal flash_ce1      : std_logic := '0';
64
 
65
begin
66
 
67
  LEVAL_CPU : leval
68
  port map(
69
    pause => '0', -- TODO: set to pause
70
    clk => clk,
71
    rst => rst,
72
    data_bus => data_s,
73
    addr_bus    => addr_s,
74
    wait_s      => wait_s,
75
    read                => read_s,
76
    write               => write_s,
77
    led => led
78
  );
79
 
80
  dmem : ext_mem
81
  port map (
82
    we => write_s,
83
    re => read_s,
84
    a => addr_s(4 downto 0),
85
    d => data_s
86
  );
87
 
88
  ADDR_DEC      : addr_decoder
89
  port map (
90
    leval_addr => addr_s,
91
    avr_irq => avr_irq,
92
    wt => wait_s
93
  );
94
 
95
 
96
end architecture rtl;
97
 
98
 

powered by: WebSVN 2.1.0

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