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

Subversion Repositories pc_fpga_com

[/] [pc_fpga_com/] [trunk/] [UDP_IP_CORE_FLEX_Virtex5/] [REG_16B_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:    21:15:16 11/27/2009 
6
-- Design Name: 
7
-- Module Name:    REG_16B_WREN - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 16bit wide Register with write enable option. 
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_16B_WREN is
31
    Port ( rst : in  STD_LOGIC;
32
                          clk : in  STD_LOGIC;
33
           wren : in  STD_LOGIC;
34
           input : in  STD_LOGIC_VECTOR (15 downto 0);
35
           output : out  STD_LOGIC_VECTOR (15 downto 0));
36
end REG_16B_WREN;
37
 
38
architecture Behavioral of REG_16B_WREN is
39
 
40
begin
41
 
42
process(clk)
43
begin
44
if rst='1' then
45
        output<="0000000000000000";
46
else
47
if clk'event and clk='1' then
48
        if wren='1' then
49
                output<=input;
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.