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

Subversion Repositories RISCMCU

[/] [RISCMCU/] [trunk/] [vhdl/] [v_rom.vhd] - Blame information for rev 28

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 yapzihe
----------------------------------------------------------------------------
2
----                                                                    ----
3
---- WISHBONE RISCMCU IP Core                                           ----
4
----                                                                    ----
5
---- This file is part of the RISCMCU project                           ----
6
---- http://www.opencores.org/projects/riscmcu/                         ----
7
----                                                                    ----
8
---- Description                                                        ----
9
---- Implementation of a RISC Microcontroller based on Atmel AVR        ----
10
---- AT90S1200 instruction set and features with Altera Flex10k20 FPGA. ----
11
----                                                                    ----
12
---- Author(s):                                                         ----
13
----    - Yap Zi He, yapzihe@hotmail.com                                ----
14
----                                                                    ----
15
----------------------------------------------------------------------------
16
----                                                                    ----
17
---- Copyright (C) 2001 Authors and OPENCORES.ORG                       ----
18
----                                                                    ----
19
---- This source file may be used and distributed without               ----
20
---- restriction provided that this copyright statement is not          ----
21
---- removed from the file and that any derivative work contains        ----
22
---- the original copyright notice and the associated disclaimer.       ----
23
----                                                                    ----
24
---- This source file is free software; you can redistribute it         ----
25
---- and/or modify it under the terms of the GNU Lesser General         ----
26
---- Public License as published by the Free Software Foundation;       ----
27
---- either version 2.1 of the License, or (at your option) any         ----
28
---- later version.                                                     ----
29
----                                                                    ----
30
---- This source is distributed in the hope that it will be             ----
31
---- useful, but WITHOUT ANY WARRANTY; without even the implied         ----
32
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR            ----
33
---- PURPOSE. See the GNU Lesser General Public License for more        ----
34
---- details.                                                           ----
35
----                                                                    ----
36
---- You should have received a copy of the GNU Lesser General          ----
37
---- Public License along with this source; if not, download it         ----
38
---- from http://www.opencores.org/lgpl.shtml                           ----
39
----                                                                    ----
40
----------------------------------------------------------------------------
41
 
42
library ieee;
43
use ieee.std_logic_1164.all;
44
 
45
entity v_rom is
46
 port(  pc : in std_logic_vector(8 downto 0);
47
                instruction : out std_logic_vector(15 downto 0));
48
end v_rom;
49
 
50
architecture rom of v_rom is
51
 
52
        component LPM_ROM
53
        generic (
54
                LPM_WIDTH: integer := 16;
55
                LPM_WIDTHAD: integer := 9;
56
                LPM_NUMWORDS: integer := 512;
57
                LPM_FILE: string := "program.mif";
58
                LPM_ADDRESS_CONTROL: string := "UNREGISTERED";
59
                LPM_OUTDATA: string := "UNREGISTERED"
60
        );
61
        port (
62
                ADDRESS: in STD_LOGIC_VECTOR(LPM_WIDTHAD-1 downto 0);
63
                inclock: IN STD_LOGIC := '0';
64
                outclock: IN STD_LOGIC := '0';
65
                memenab: IN STD_LOGIC := '1';
66
                Q: out STD_LOGIC_VECTOR(LPM_WIDTH-1 downto 0)
67
        );
68
        end component;
69
 
70
signal gnd, vcc : std_logic;
71
 
72
begin
73
 
74
vcc <= '1';
75
gnd <= '0';
76
 
77
        v1 : LPM_ROM
78
                port map (address => pc, memenab => vcc, q => instruction);
79
 
80
end rom;

powered by: WebSVN 2.1.0

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