Line 1... |
Line 1... |
-- $Id: rbd_bram.vhd 427 2011-11-19 21:04:11Z mueller $
|
-- $Id: rbd_bram.vhd 593 2014-09-14 22:21:33Z mueller $
|
--
|
--
|
-- Copyright 2010-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2010-2014 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 18... |
Line 18... |
-- Dependencies: memlib/ram_1swsr_wfirst_gen
|
-- Dependencies: memlib/ram_1swsr_wfirst_gen
|
--
|
--
|
-- Test bench: rlink/tb/tb_rlink_tba_ttcombo
|
-- Test bench: rlink/tb/tb_rlink_tba_ttcombo
|
--
|
--
|
-- Target Devices: generic
|
-- Target Devices: generic
|
-- Tool versions: xst 12.1, 13.1; ghdl 0.29
|
-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31
|
--
|
--
|
-- 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-12-26 349 12.1 M53d xc3s1000-4 23 61 - 34 s 6.3
|
-- 2010-12-26 349 12.1 M53d xc3s1000-4 23 61 - 34 s 6.3
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2014-09-13 593 4.1 no default rbus addess anymore, def=0
|
|
-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit
|
-- 2011-11-19 427 1.0.3 now numeric_std clean
|
-- 2011-11-19 427 1.0.3 now numeric_std clean
|
-- 2010-12-31 352 1.0.2 simplify irb_ack logic
|
-- 2010-12-31 352 1.0.2 simplify irb_ack logic
|
-- 2010-12-29 351 1.0.1 default addr 1111001x->1111010x
|
-- 2010-12-29 351 1.0.1 default addr 1111001x->1111010x
|
-- 2010-12-26 349 1.0 Initial version
|
-- 2010-12-26 349 1.0 Initial version
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
--
|
--
|
-- rbus registers:
|
-- rbus registers:
|
--
|
--
|
-- Address Bits Name r/w/f Function
|
-- Addr Bits Name r/w/f Function
|
-- bbbbbbb0 cntl r/w/- Control register
|
-- 0 cntl r/w/- Control register
|
-- 15:10 nbusy r/w/- busy cycles
|
-- 15:10 nbusy r/w/- busy cycles
|
-- 9:00 addr r/w/- bram address (will auto-increment)
|
-- 9:00 addr r/w/- bram address (will auto-increment)
|
-- bbbbbbb1 15:00 data r/w/- Data register (read/write to bram via addr)
|
-- 1 15:00 data r/w/- Data register (read/write to bram via addr)
|
--
|
--
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.numeric_std.all;
|
use ieee.numeric_std.all;
|
Line 52... |
Line 54... |
use work.rblib.all;
|
use work.rblib.all;
|
|
|
entity rbd_bram is -- rbus dev: rbus bram test target
|
entity rbd_bram is -- rbus dev: rbus bram test target
|
-- complete rrirp_aif interface
|
-- complete rrirp_aif interface
|
generic (
|
generic (
|
RB_ADDR : slv8 := slv(to_unsigned(2#11110100#,8)));
|
RB_ADDR : slv16 := (others=>'0'));
|
port (
|
port (
|
CLK : in slbit; -- clock
|
CLK : in slbit; -- clock
|
RESET : in slbit; -- reset
|
RESET : in slbit; -- reset
|
RB_MREQ : in rb_mreq_type; -- rbus: request
|
RB_MREQ : in rb_mreq_type; -- rbus: request
|
RB_SRES : out rb_sres_type -- rbus: response
|
RB_SRES : out rb_sres_type -- rbus: response
|
Line 148... |
Line 150... |
ibramen := '0';
|
ibramen := '0';
|
ibramwe := '0';
|
ibramwe := '0';
|
|
|
-- rbus address decoder
|
-- rbus address decoder
|
n.rbsel := '0';
|
n.rbsel := '0';
|
if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 1)=RB_ADDR(7 downto 1) then
|
if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 1)=RB_ADDR(15 downto 1) then
|
|
|
n.rbsel := '1';
|
n.rbsel := '1';
|
ibramen := '1';
|
ibramen := '1';
|
|
|
if irbena = '0' then -- addr valid and selected, but no req
|
if irbena = '0' then -- addr valid and selected, but no req
|