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

Subversion Repositories spdif_interface

[/] [spdif_interface/] [trunk/] [rtl/] [vhdl/] [rx_wb_decoder.vhd] - Diff between revs 29 and 31

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 29 Rev 31
Line 43... Line 43...
----------------------------------------------------------------------
----------------------------------------------------------------------
--
--
-- CVS Revision History
-- CVS Revision History
--
--
-- $Log: not supported by cvs2svn $
-- $Log: not supported by cvs2svn $
 
-- Revision 1.1  2004/06/23 18:09:57  gedra
 
-- Wishbone bus cycle decoder.
 
--
--
--
 
 
library IEEE;
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_arith.all;
--use ieee.std_logic_unsigned.all;
use ieee.std_logic_unsigned.all;
 
 
entity rx_wb_decoder is
entity rx_wb_decoder is
  generic (DATA_WIDTH: integer;
  generic (DATA_WIDTH: integer;
           ADDR_WIDTH: integer);
           ADDR_WIDTH: integer);
  port (
  port (
Line 91... Line 94...
  constant REG_RXINTMASK : std_logic_vector(6 downto 0) := "0000011";
  constant REG_RXINTMASK : std_logic_vector(6 downto 0) := "0000011";
  constant REG_RXINTSTAT : std_logic_vector(6 downto 0) := "0000100";
  constant REG_RXINTSTAT : std_logic_vector(6 downto 0) := "0000100";
  signal iack, iwr, ird : std_logic;
  signal iack, iwr, ird : std_logic;
  signal acnt: integer range 0 to 2**(ADDR_WIDTH - 1) - 1;
  signal acnt: integer range 0 to 2**(ADDR_WIDTH - 1) - 1;
  signal all_ones : std_logic_vector(ADDR_WIDTH - 1 downto 0);
  signal all_ones : std_logic_vector(ADDR_WIDTH - 1 downto 0);
 
  signal rdout : std_logic_vector(DATA_WIDTH - 1 downto 0);
 
 
begin
begin
 
 
  wb_ack_o <= iack;
  wb_ack_o <= iack;
 
 
Line 153... Line 157...
 
 
-- read generation
-- read generation
  ird <= '1' when wb_cyc_i = '1' and wb_sel_i = '1' and wb_stb_i = '1' and
  ird <= '1' when wb_cyc_i = '1' and wb_sel_i = '1' and wb_stb_i = '1' and
         wb_we_i = '0' else '0';
         wb_we_i = '0' else '0';
 
 
 
  wb_dat_o <= data_out when wb_adr_i(ADDR_WIDTH - 1) = '1' else rdout;
 
 
 
  DREG: process (wb_clk_i)              -- clock data from registers
 
  begin
 
    if rising_edge(wb_clk_i) then
 
      rdout <= data_out;
 
    end if;
 
  end process DREG;
 
 
-- sample memory read address. This needs special attention due to read latency
-- sample memory read address. This needs special attention due to read latency
  mem_addr <= CONV_STD_LOGIC_VECTOR(acnt, ADDR_WIDTH - 1) when
  mem_addr <= CONV_STD_LOGIC_VECTOR(acnt, ADDR_WIDTH - 1) when
              wb_cti_i = "010" and wb_we_i = '0' and iack = '1' and
              wb_cti_i = "010" and wb_we_i = '0' and iack = '1' and
              wb_bte_i = "00" else wb_adr_i(ADDR_WIDTH - 2 downto 0);
              wb_bte_i = "00" else wb_adr_i(ADDR_WIDTH - 2 downto 0);
 
 
  all_ones <= (others => '1');
  all_ones(ADDR_WIDTH - 1 downto 0) <= (others => '1');
 
 
  SMA: process (wb_clk_i, wb_rst_i)
  SMA: process (wb_clk_i, wb_rst_i)
  begin
  begin
    if wb_rst_i = '1' then
    if wb_rst_i = '1' then
      acnt <= 0;
      acnt <= 0;

powered by: WebSVN 2.1.0

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