dlx/images_test-bench.vhdl

    1 --------------------------------------------------------------------------
    2 --
    3 --  Copyright (C) 1993, Peter J. Ashenden
    4 --  Mail:	Dept. Computer Science
    5 --		University of Adelaide, SA 5005, Australia
    6 --  e-mail:	petera@cs.adelaide.edu.au
    7 --
    8 --  This program is free software; you can redistribute it and/or modify
    9 --  it under the terms of the GNU General Public License as published by
   10 --  the Free Software Foundation; either version 1, or (at your option)
   11 --  any later version.
   12 --
   13 --  This program is distributed in the hope that it will be useful,
   14 --  but WITHOUT ANY WARRANTY; without even the implied warranty of
   15 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16 --  GNU General Public License for more details.
   17 --
   18 --  You should have received a copy of the GNU General Public License
   19 --  along with this program; if not, write to the Free Software
   20 --  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   21 --
   22 --------------------------------------------------------------------------
   23 --
   24 --  $RCSfile: images_test-bench.vhdl,v $  $Revision: 1.1 $  $Date: 2000/05/08 14:36:48 $
   25 --
   26 --------------------------------------------------------------------------
   27 --
   28 --  Architecture declaration for test bench for images package
   29 --
   30 
   31 use std.textio.all;
   32 
   33 use work.images.all;
   34 
   35 architecture bench of images_test is
   36 
   37 begin
   38 
   39   process
   40 
   41     variable L : line;
   42 
   43   begin
   44     ----------------------------------------------------------------
   45     -- Test binary image of a bit vector
   46     ----------------------------------------------------------------
   47     write(L, image(b"01"));
   48     writeline(output, L);
   49     write(L, image(b"01011010"));
   50     writeline(output, L);
   51 
   52     ----------------------------------------------------------------
   53     -- Test octal image of a bit vector
   54     ----------------------------------------------------------------
   55     write(L, image_octal(o"05"));
   56     writeline(output, L);
   57     write(L, image_octal(o"370"));
   58     writeline(output, L);
   59     write(L, image_octal(b"1"));
   60     writeline(output, L);
   61     write(L, image_octal(b"11000"));
   62     writeline(output, L);
   63 
   64     ----------------------------------------------------------------
   65     -- Test hex image of a bit vector
   66     ----------------------------------------------------------------
   67     write(L, image_hex(x"0C"));
   68     writeline(output, L);
   69     write(L, image_hex(x"F1"));
   70     writeline(output, L);
   71     write(L, image_hex("1"));
   72     writeline(output, L);
   73     write(L, image_hex(b"1001000"));
   74     writeline(output, L);
   75 
   76     ----------------------------------------------------------------
   77     -- Add further tests here ...
   78     ----------------------------------------------------------------
   79 
   80 
   81     ----------------------------------------------------------------
   82     -- end of tests
   83     ----------------------------------------------------------------
   84     wait;
   85   end process;
   86 
   87 end bench;
   88 
   89 
   90 

This page was generated using GHDL 0.14 (20040829) [Sokcho edition], a program written by Tristan Gingold