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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [vlib/] [serport/] [tb/] [tb_serport_uart_rxtx.vhd] - Diff between revs 2 and 13

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

Rev 2 Rev 13
Line 1... Line 1...
-- $Id: tb_serport_uart_rxtx.vhd 314 2010-07-09 17:38:41Z mueller $
-- $Id: tb_serport_uart_rxtx.vhd 417 2011-10-22 10:30:29Z 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 31... Line 31...
-- 2007-10-12    88  _ssim 0.26  8.1.03 I27   xc3s1000   c:ok
-- 2007-10-12    88  _ssim 0.26  8.1.03 I27   xc3s1000   c:ok
-- 2007-10-12    88  -     0.26  -            -          c:ok
-- 2007-10-12    88  -     0.26  -            -          c:ok
--
--
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2011-10-22   417   1.1.3  now numeric_std clean
-- 2010-04-24   281   1.1.2  use direct instatiation for tbd_
-- 2010-04-24   281   1.1.2  use direct instatiation for tbd_
-- 2008-03-24   129   1.1.1  CLK_CYCLE now 31 bits
-- 2008-03-24   129   1.1.1  CLK_CYCLE now 31 bits
-- 2007-10-21    91   1.1    now use 'send' command, self-checking (FAIL's)
-- 2007-10-21    91   1.1    now use 'send' command, self-checking (FAIL's)
-- 2007-10-12    88   1.0.1  avoid ieee.std_logic_unsigned, use cast to unsigned
-- 2007-10-12    88   1.0.1  avoid ieee.std_logic_unsigned, use cast to unsigned
-- 2007-08-27    76   1.0    Initial version 
-- 2007-08-27    76   1.0    Initial version 
------------------------------------------------------------------------------
------------------------------------------------------------------------------
 
 
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.simlib.all;
use work.simlib.all;
Line 55... Line 56...
 
 
architecture sim of tb_serport_uart_rxtx is
architecture sim of tb_serport_uart_rxtx is
 
 
  signal CLK :  slbit := '0';
  signal CLK :  slbit := '0';
  signal RESET :  slbit := '0';
  signal RESET :  slbit := '0';
  signal CLKDIV : slv13 := conv_std_logic_vector(15, 13);
  signal CLKDIV : slv13 := slv(to_unsigned(15, 13));
  signal RXDATA : slv8 := (others=>'0');
  signal RXDATA : slv8 := (others=>'0');
  signal RXVAL :  slbit := '0';
  signal RXVAL :  slbit := '0';
  signal RXERR  : slbit := '0';
  signal RXERR  : slbit := '0';
  signal RXACT : slbit := '0';
  signal RXACT : slbit := '0';
  signal TXSD : slbit := '0';
  signal TXSD : slbit := '0';
Line 147... Line 148...
            read_ea(iline, idelta);
            read_ea(iline, idelta);
            wait for idelta*clock_period;
            wait for idelta*clock_period;
 
 
          when ".rate " =>              -- .rate 
          when ".rate " =>              -- .rate 
            read_ea(iline, irate);
            read_ea(iline, irate);
            CLKDIV <= conv_std_logic_vector(irate-1, 13);
            CLKDIV <= slv(to_unsigned(irate-1, 13));
 
 
          when "send  " =>              -- send
          when "send  " =>              -- send
            read_ea(iline, idelta);
            read_ea(iline, idelta);
            read_ea(iline, itxdata);
            read_ea(iline, itxdata);
 
 
Line 212... Line 213...
  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);
 
 
      if R_MON_VAL_1 = '1' then
      if R_MON_VAL_1 = '1' then
        if R_MON_VAL_2 = '1' then
        if R_MON_VAL_2 = '1' then
          writetimestamp(oline, CLK_CYCLE, ": moni ");
          writetimestamp(oline, CLK_CYCLE, ": moni ");
          write(oline, string'("  FAIL MISSING DATA="));
          write(oline, string'("  FAIL MISSING DATA="));

powered by: WebSVN 2.1.0

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