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

Subversion Repositories udp_ip__core

[/] [udp_ip__core/] [trunk/] [UDP_IP_CORE/] [UDP_IP_CORE__Spartan3/] [REG_8b_wren.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 NikosAl
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    14:40:03 02/07/2010 
6
-- Design Name: 
7
-- Module Name:    REG_8b_wren - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity REG_8b_wren is
31
    Port ( rst : in  STD_LOGIC;
32
           clk : in  STD_LOGIC;
33
           wren : in  STD_LOGIC;
34
           input_val : in  STD_LOGIC_VECTOR (7 downto 0);
35
                          output_val : inout STD_LOGIC_VECTOR(7 downto 0));
36
end REG_8b_wren;
37
 
38
architecture Behavioral of REG_8b_wren is
39
 
40
begin
41
 
42
process(clk)
43
begin
44
if rst='1' then
45
        output_val<="00000000";
46
else
47
        if clk'event and clk='1' then
48
                if wren='1' then
49
                        output_val<=input_val;
50
                end if;
51
        end if;
52
end if;
53
end process;
54
 
55
end Behavioral;
56
 

powered by: WebSVN 2.1.0

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