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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [rtl/] [vlib/] [rlink/] [tb/] [tb_rlink.vhd] - Diff between revs 9 and 13

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

Rev 9 Rev 13
Line 1... Line 1...
-- $Id: tb_rlink.vhd 351 2010-12-30 21:50:54Z mueller $
-- $Id: tb_rlink.vhd 427 2011-11-19 21:04:11Z mueller $
--
--
-- Copyright 2007-2010 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2007-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 25... Line 25...
-- To test:        rlink_core     (via tbd_rlink_direct)
-- To test:        rlink_core     (via tbd_rlink_direct)
--                 rlink_base     (via tbd_rlink_serport)
--                 rlink_base     (via tbd_rlink_serport)
--                 rlink_serport  (via tbd_rlink_serport)
--                 rlink_serport  (via tbd_rlink_serport)
--
--
-- Target Devices: generic
-- Target Devices: generic
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29
-- Tool versions:  xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29
--
--
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2011-11-19   427   3.0.7  fix crc8_update_tbl usage; now numeric_std clean
-- 2010-12-29   351   3.0.6  use new rbd_tester addr 111100xx (from 111101xx)
-- 2010-12-29   351   3.0.6  use new rbd_tester addr 111100xx (from 111101xx)
-- 2010-12-26   348   3.0.5  use simbus to export clkcycle (for tbd_..serport)
-- 2010-12-26   348   3.0.5  use simbus to export clkcycle (for tbd_..serport)
-- 2010-12-23   347   3.0.4  use rb_mon, rlink_mon directly; rename CP_*->RL_*
-- 2010-12-23   347   3.0.4  use rb_mon, rlink_mon directly; rename CP_*->RL_*
-- 2010-12-22   346   3.0.3  add .rlmon and .rbmon commands
-- 2010-12-22   346   3.0.3  add .rlmon and .rbmon commands
-- 2010-12-21   345   3.0.2  rename commands .[rt]x... to [rt]x...;
-- 2010-12-21   345   3.0.2  rename commands .[rt]x... to [rt]x...;
Line 92... Line 93...
--
--
------------------------------------------------------------------------------
------------------------------------------------------------------------------
 
 
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 ieee.std_logic_textio.all;
use ieee.std_logic_textio.all;
use std.textio.all;
use std.textio.all;
 
 
use work.slvtypes.all;
use work.slvtypes.all;
use work.genlib.all;
use work.genlib.all;
Line 225... Line 226...
  RB_SRES_err   <= RB_SRES.err;
  RB_SRES_err   <= RB_SRES.err;
  RB_SRES_dout  <= RB_SRES.dout;
  RB_SRES_dout  <= RB_SRES.dout;
 
 
  RBTEST : rbd_tester
  RBTEST : rbd_tester
    generic map (
    generic map (
      RB_ADDR => conv_std_logic_vector(2#11110000#,8))
      RB_ADDR => slv(to_unsigned(2#11110000#,8)))
    port map (
    port map (
      CLK      => CLK,
      CLK      => CLK,
      RESET    => '0',
      RESET    => '0',
      RB_MREQ  => RB_MREQ,
      RB_MREQ  => RB_MREQ,
      RB_SRES  => RB_SRES,
      RB_SRES  => RB_SRES,
Line 316... Line 317...
 
 
    procedure do_tx8 (data : inout slv8)  is
    procedure do_tx8 (data : inout slv8)  is
    begin
    begin
      txlist(ntxlist) := '0' & data;
      txlist(ntxlist) := '0' & data;
      ntxlist := ntxlist + 1;
      ntxlist := ntxlist + 1;
      crc8_update_tbl(txcrc, data);
      txcrc := crc8_update_tbl(txcrc, data);
    end procedure do_tx8;
    end procedure do_tx8;
 
 
    procedure do_tx16 (data : inout slv16)  is
    procedure do_tx16 (data : inout slv16)  is
    begin
    begin
      do_tx8(data( 7 downto 0));
      do_tx8(data( 7 downto 0));
Line 329... Line 330...
 
 
    procedure do_rx8 (data : inout slv8)  is
    procedure do_rx8 (data : inout slv8)  is
    begin
    begin
      sv_rxlist(sv_nrxlist) := '0' & data;
      sv_rxlist(sv_nrxlist) := '0' & data;
      sv_nrxlist := sv_nrxlist + 1;
      sv_nrxlist := sv_nrxlist + 1;
      crc8_update_tbl(rxcrc, data);
      rxcrc := crc8_update_tbl(rxcrc, data);
    end procedure do_rx8;
    end procedure do_rx8;
 
 
    procedure do_rx16 (data : inout slv16)  is
    procedure do_rx16 (data : inout slv16)  is
    begin
    begin
      do_rx8(data( 7 downto 0));
      do_rx8(data( 7 downto 0));
Line 624... Line 625...
  proc_moni: process
  proc_moni: process
    variable oline : line;
    variable oline : line;
  begin
  begin
 
 
    loop
    loop
      wait until CLK'event and CLK='1';
      wait until rising_edge(CLK);
      wait for c2out_time;
      wait for c2out_time;
 
 
      if RL_VAL = '1' then
      if RL_VAL = '1' then
        writetimestamp(oline, SB_CLKCYCLE, ": moni");
        writetimestamp(oline, SB_CLKCYCLE, ": moni");
        write(oline, RL_DO(8), right, 3);
        write(oline, RL_DO(8), right, 3);

powered by: WebSVN 2.1.0

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