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

Subversion Repositories wishbone_out_port

[/] [wishbone_out_port/] [trunk/] [rtl/] [WBOPRT16.vhd] - Diff between revs 5 and 13

Only display areas with differences | Details | Blame | View Log

Rev 5 Rev 13
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
----                                                                                                                   ----
----                                                                                                                   ----
---- WISHBONE wishbone out port from b3 spec IP Core                       ----
---- WISHBONE wishbone out port from b3 spec IP Core                       ----
----                                                                                                                   ----
----                                                                                                                   ----
---- This file is part of the wishbone out port from b3 spec project       ----
---- This file is part of the wishbone out port from b3 spec project       ----
---- http://www.opencores.org/cores/xxx/                                                           ----
---- http://www.opencores.org/cores/xxx/                                                           ----
----                                                                                                                   ----
----                                                                                                                   ----
---- Description                                                                                                   ----
---- Description                                                                                                   ----
---- Implementation of the wishbone out port from b3 spec IP core          ----
---- Implementation of the wishbone out port from b3 spec IP core          ----
----  according to wishbone out port from b3 spec IP core specification    ----
----  according to wishbone out port from b3 spec IP core specification    ----
----    document.                                                          ----
----    document.                                                          ----
----                                                                                                                   ----
----                                                                                                                   ----
---- To Do:                                                                                                            ----
---- To Do:                                                                                                            ----
----    NA                                                                                                             ----
----    NA                                                                                                             ----
----                                                                       ----
----                                                                       ----
---- Taken directly from the wishbone out port from b3 spec, appendix A    ----
---- Taken directly from the wishbone out port from b3 spec, appendix A    ----
----  Changes made, 'tidy up', I like things in lines                      ----
----  Changes made, 'tidy up', I like things in lines                      ----
----                change name, as Xilinx tools ( 9.2 sp 4 ) do not like  ----
----                change name, as Xilinx tools ( 9.2 sp 4 ) do not like  ----
----                      entity same name as the file name.               ----
----                      entity same name as the file name.               ----
----                 Used others clause for sync reset.                    ----
----                 Used others clause for sync reset.                    ----
----                                                                                                                   ----
----                                                                                                                   ----
---- Author(s):                                                                                                ----
---- Author(s):                                                                                                ----
----   Andrew Mulcock, amulcock@opencores.org                                              ----
----   Andrew Mulcock, amulcock@opencores.org                                              ----
----                                                                                                                   ----
----                                                                                                                   ----
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
----                                                                                                                   ----
----                                                                                                                   ----
---- Copyright (C) 2008 Authors and OPENCORES.ORG                                          ----
---- Copyright (C) 2008 Authors and OPENCORES.ORG                                          ----
----                                                                                                                   ----
----                                                                                                                   ----
---- This source file may be used and distributed without                                  ----
---- This source file may be used and distributed without                                  ----
---- restriction provided that this copyright statement is not                     ----
---- restriction provided that this copyright statement is not                     ----
---- removed from the file and that any derivative work contains                   ----
---- removed from the file and that any derivative work contains                   ----
---- the original copyright notice and the associated disclaimer.                  ----
---- the original copyright notice and the associated disclaimer.                  ----
----                                                                                                                   ----
----                                                                                                                   ----
---- This source file is free software; you can redistribute it                ----
---- This source file is free software; you can redistribute it                ----
---- and/or modify it under the terms of the GNU Lesser General                ----
---- and/or modify it under the terms of the GNU Lesser General                ----
---- Public License as published by the Free Software Foundation;                  ----
---- Public License as published by the Free Software Foundation;                  ----
---- either version 2.1 of the License, or (at your option) any                    ----
---- either version 2.1 of the License, or (at your option) any                    ----
---- later version.                                                                                                ----
---- later version.                                                                                                ----
----                                                                                                                   ----
----                                                                                                                   ----
---- This source is distributed in the hope that it will be                                ----
---- This source is distributed in the hope that it will be                                ----
---- useful, but WITHOUT ANY WARRANTY; without even the implied            ----
---- useful, but WITHOUT ANY WARRANTY; without even the implied            ----
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR               ----
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR               ----
---- PURPOSE. See the GNU Lesser General Public License for more                   ----
---- PURPOSE. See the GNU Lesser General Public License for more                   ----
---- details.                                                                                                      ----
---- details.                                                                                                      ----
----                                                                                                                   ----
----                                                                                                                   ----
---- You should have received a copy of the GNU Lesser General                 ----
---- You should have received a copy of the GNU Lesser General                 ----
---- Public License along with this source; if not, download it                    ----
---- Public License along with this source; if not, download it                    ----
---- from http://www.opencores.org/lgpl.shtml                                              ----
---- from http://www.opencores.org/lgpl.shtml                                              ----
----                                                                                                                   ----
----                                                                                                                   ----
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--                                                                                                                         ----
--                                                                                                                         ----
-- CVS Revision History                                                                                    ----
-- CVS Revision History                                                                                    ----
--                                                                                                                         ----
--                                                                                                                         ----
-- $Log: not supported by cvs2svn $                                                                                                            ----
-- $Log: not supported by cvs2svn $                                                                                                            ----
--                                                                                                                         ----
--                                                                                                                         ----
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
 
 
entity WB_OPRT_16 is
entity WB_OPRT_16 is
    port(
    port(
    -- WISHBONE SLAVE interface:
    -- WISHBONE SLAVE interface:
    ACK_O   : out   std_logic;
    ACK_O   : out   std_logic;
    CLK_I   : in    std_logic;
    CLK_I   : in    std_logic;
    DAT_I   : in    std_logic_vector( 15 downto 0 );
    DAT_I   : in    std_logic_vector( 15 downto 0 );
    DAT_O   : out   std_logic_vector( 15 downto 0 );
    DAT_O   : out   std_logic_vector( 15 downto 0 );
    RST_I   : in    std_logic;
    RST_I   : in    std_logic;
    SEL_I   : in    std_logic_vector( 1 downto 0 );
    SEL_I   : in    std_logic_vector( 1 downto 0 );
    STB_I   : in    std_logic;
    STB_I   : in    std_logic;
    WE_I    : in    std_logic;
    WE_I    : in    std_logic;
    -- Output port (non-WISHBONE signals):
    -- Output port (non-WISHBONE signals):
    PRT_O   : out   std_logic_vector( 15 downto 0 )
    PRT_O   : out   std_logic_vector( 15 downto 0 )
    );
    );
end entity WB_OPRT_16;
end entity WB_OPRT_16;
 
 
architecture rtl of WB_OPRT_16 is
architecture rtl of WB_OPRT_16 is
    signal QH: std_logic_vector( 7 downto 0 );
    signal QH: std_logic_vector( 7 downto 0 );
    signal QL: std_logic_vector( 7 downto 0 );
    signal QL: std_logic_vector( 7 downto 0 );
begin
begin
 
 
REG: process( CLK_I )
REG: process( CLK_I )
begin
begin
    if( rising_edge( CLK_I ) ) then
    if( rising_edge( CLK_I ) ) then
        if( RST_I = '1' ) then
        if( RST_I = '1' ) then
            QH <= (others => '0');
            QH <= (others => '0');
        elsif( (STB_I and WE_I and SEL_I(1)) = '1' ) then
        elsif( (STB_I and WE_I and SEL_I(1)) = '1' ) then
            QH <= DAT_I( 15 downto 8 );
            QH <= DAT_I( 15 downto 8 );
        else
        else
            QH <= QH;
            QH <= QH;
        end if;
        end if;
     end if;
     end if;
 
 
     if( rising_edge( CLK_I ) ) then
     if( rising_edge( CLK_I ) ) then
        if( RST_I = '1' ) then
        if( RST_I = '1' ) then
            QL <= (others => '0');
            QL <= (others => '0');
        elsif( (STB_I and WE_I and SEL_I(0)) = '1' ) then
        elsif( (STB_I and WE_I and SEL_I(0)) = '1' ) then
            QL <= DAT_I( 7 downto 0 );
            QL <= DAT_I( 7 downto 0 );
        else
        else
            QL <= QL;
            QL <= QL;
        end if;
        end if;
    end if;
    end if;
end process REG;
end process REG;
 
 
 
 
    ACK_O <= STB_I;
    ACK_O <= STB_I;
    DAT_O( 15 downto 8 ) <= QH;
    DAT_O( 15 downto 8 ) <= QH;
    DAT_O( 7 downto 0 ) <= QL;
    DAT_O( 7 downto 0 ) <= QL;
    PRT_O( 15 downto 8 ) <= QH;
    PRT_O( 15 downto 8 ) <= QH;
    PRT_O( 7 downto 0 ) <= QL;
    PRT_O( 7 downto 0 ) <= QL;
 
 
 
 

powered by: WebSVN 2.1.0

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