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

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [rtl/] [vhdl/] [ip/] [wb_gpio/] [WBOPRT08.vhd] - Blame information for rev 65

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

Line No. Rev Author Line
1 2 ameziti
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.numeric_std.all;
4
 
5
entity WBOPRT08 is
6
        port(
7
                -- WISHBONE SLAVE interface:
8
                ACK_O   : out std_ulogic;
9
                CLK_I   : in std_ulogic;
10
                DAT_I   : in std_ulogic_vector( 7 downto 0 );
11
                DAT_O   : out std_ulogic_vector( 7 downto 0 );
12
                RST_I   : in std_ulogic;
13
                STB_I   : in std_ulogic;
14
                WE_I    : in std_ulogic;
15
                -- Output port (non-WISHBONE signals):
16
                PRT_O   : out std_ulogic_vector( 7 downto 0 )
17
        );
18
end entity WBOPRT08;
19
architecture WBOPRT081 of WBOPRT08 is
20
        signal Q: std_ulogic_vector( 7 downto 0 );
21
begin
22
        REG: process( CLK_I )
23
        begin
24
                if( rising_edge( CLK_I ) ) then
25
                        if( RST_I = '1' ) then
26
                                Q <= B"00000000";
27
                        elsif( (STB_I and WE_I) = '1' ) then
28
                                Q <= DAT_I( 7 downto 0 );
29
                        else
30
                                Q <= Q;
31
                        end if;
32
                end if;
33
        end process REG;
34
 
35
        ACK_O <= STB_I;
36
        DAT_O <= Q;
37
        PRT_O <= Q;
38
 
39
end architecture WBOPRT081;

powered by: WebSVN 2.1.0

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