Line 1... |
Line 1... |
-- $Id: ibdr_pc11.vhd 350 2010-12-28 16:40:11Z mueller $
|
-- $Id: ibdr_pc11.vhd 427 2011-11-19 21:04:11Z mueller $
|
--
|
--
|
-- Copyright 2009-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2009-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
--
|
--
|
-- This program is free software; you may redistribute and/or modify it under
|
-- This program is free software; you may redistribute and/or modify it under
|
-- the terms of the GNU General Public License as published by the Free
|
-- the terms of the GNU General Public License as published by the Free
|
-- Software Foundation, either version 2, or at your option any later version.
|
-- Software Foundation, either version 2, or at your option any later version.
|
--
|
--
|
Line 16... |
Line 16... |
-- Description: ibus dev(rem): PC11
|
-- Description: ibus dev(rem): PC11
|
--
|
--
|
-- Dependencies: -
|
-- Dependencies: -
|
-- Test bench: xxdp: zpcae0
|
-- Test bench: xxdp: zpcae0
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 12.1; ghdl 0.18-0.29
|
-- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29
|
--
|
--
|
-- Synthesized (xst):
|
-- Synthesized (xst):
|
-- Date Rev ise Target flop lutl lutm slic t peri
|
-- Date Rev ise Target flop lutl lutm slic t peri
|
-- 2010-10-17 333 12.1 M53d xc3s1000-4 26 97 0 57 s 6.0
|
-- 2010-10-17 333 12.1 M53d xc3s1000-4 26 97 0 57 s 6.0
|
-- 2009-06-28 230 10.1.03 K39 xc3s1000-4 25 92 0 54 s 4.9
|
-- 2009-06-28 230 10.1.03 K39 xc3s1000-4 25 92 0 54 s 4.9
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-11-18 427 1.2.2 now numeric_std clean
|
-- 2010-10-23 335 1.2.1 rename RRI_LAM->RB_LAM;
|
-- 2010-10-23 335 1.2.1 rename RRI_LAM->RB_LAM;
|
-- 2010-10-17 333 1.2 use ibus V2 interface
|
-- 2010-10-17 333 1.2 use ibus V2 interface
|
-- 2010-06-11 303 1.1 use IB_MREQ.racc instead of RRI_REQ
|
-- 2010-06-11 303 1.1 use IB_MREQ.racc instead of RRI_REQ
|
-- 2009-06-28 230 1.0 prdy now inits to '1'; setting err bit in csr now
|
-- 2009-06-28 230 1.0 prdy now inits to '1'; setting err bit in csr now
|
-- causes interrupt, if enabled; validated with zpcae0
|
-- causes interrupt, if enabled; validated with zpcae0
|
-- 2009-06-01 221 0.9 Initial version (untested)
|
-- 2009-06-01 221 0.9 Initial version (untested)
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.numeric_std.all;
|
|
|
use work.slvtypes.all;
|
use work.slvtypes.all;
|
use work.iblib.all;
|
use work.iblib.all;
|
|
|
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
Line 59... |
Line 60... |
);
|
);
|
end ibdr_pc11;
|
end ibdr_pc11;
|
|
|
architecture syn of ibdr_pc11 is
|
architecture syn of ibdr_pc11 is
|
|
|
constant ibaddr_pc11 : slv16 := conv_std_logic_vector(8#177550#,16);
|
constant ibaddr_pc11 : slv16 := slv(to_unsigned(8#177550#,16));
|
|
|
constant ibaddr_rcsr : slv2 := "00"; -- rcsr address offset
|
constant ibaddr_rcsr : slv2 := "00"; -- rcsr address offset
|
constant ibaddr_rbuf : slv2 := "01"; -- rbuf address offset
|
constant ibaddr_rbuf : slv2 := "01"; -- rbuf address offset
|
constant ibaddr_pcsr : slv2 := "10"; -- pcsr address offset
|
constant ibaddr_pcsr : slv2 := "10"; -- pcsr address offset
|
constant ibaddr_pbuf : slv2 := "11"; -- pbuf address offset
|
constant ibaddr_pbuf : slv2 := "11"; -- pbuf address offset
|
Line 114... |
Line 115... |
|
|
begin
|
begin
|
|
|
proc_regs: process (CLK)
|
proc_regs: process (CLK)
|
begin
|
begin
|
if CLK'event and CLK='1' then
|
if rising_edge(CLK) then
|
if BRESET = '1' then -- BRESET is 1 for system and ibus reset
|
if BRESET = '1' then -- BRESET is 1 for system and ibus reset
|
R_REGS <= regs_init; --
|
R_REGS <= regs_init; --
|
if RESET = '0' then -- if RESET=0 we do just an ibus reset
|
if RESET = '0' then -- if RESET=0 we do just an ibus reset
|
R_REGS.rerr <= N_REGS.rerr; -- don't reset RERR flag
|
R_REGS.rerr <= N_REGS.rerr; -- don't reset RERR flag
|
R_REGS.perr <= N_REGS.perr; -- don't reset PERR flag
|
R_REGS.perr <= N_REGS.perr; -- don't reset PERR flag
|