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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [JFIFGen/] [HeaderRAM.vhd] - Blame information for rev 65

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 65 mikel262
-- HeaderRam.vhd Khaleghian 8 Nov 2010
2
 
3
library ieee;
4
library work;
5
use ieee.std_logic_1164.all;
6
use ieee.std_logic_unsigned.all;
7
use work.all;
8
entity HeaderRam is
9
port (
10
d : in STD_LOGIC_VECTOR(7 downto 0);
11
waddr : in STD_LOGIC_VECTOR(9 downto 0);
12
raddr : in STD_LOGIC_VECTOR(9 downto 0);
13
we : in STD_LOGIC;
14
clk : in STD_LOGIC;
15
q : out STD_LOGIC_VECTOR(7 downto 0)
16
);
17
end HeaderRam;
18
 
19
architecture syn of HeaderRam is
20
type ram_type is array (1023 downto 0) of std_logic_vector (7 downto 0);
21
signal RAM : ram_type;
22
signal read_addr: STD_LOGIC_VECTOR(9 downto 0);
23
begin
24
q <= RAM(conv_integer(read_addr)) ;
25
process (clk)
26
begin
27
if clk'event and clk = '1'
28
then
29
if we='1' then
30
RAM(conv_integer(waddr)) <= d;
31
end if;
32
read_addr <= raddr;
33
end if;
34
end process;
35
end syn;

powered by: WebSVN 2.1.0

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