Project

General

Profile

Download (1.9 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc
3

    
4
-- This file is part of VESTs (Vhdl tESTs).
5

    
6
-- VESTs is free software; you can redistribute it and/or modify it
7
-- under the terms of the GNU General Public License as published by the
8
-- Free Software Foundation; either version 2 of the License, or (at
9
-- your option) any later version. 
10

    
11
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
12
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
-- for more details. 
15

    
16
-- You should have received a copy of the GNU General Public License
17
-- along with VESTs; if not, write to the Free Software Foundation,
18
-- Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
19

    
20
-- ---------------------------------------------------------------------
21
--
22
-- $Id: bv_images.vhd,v 1.2 2001-10-25 01:24:24 paw Exp $
23
-- $Revision: 1.2 $
24
--
25
-- ---------------------------------------------------------------------
26

    
27
--------------------------------------------------------------------------
28
--
29
--  bv_images package specification.
30
--
31
--  Functions that return the string image of values.
32
--  Each image is a correctly formed literal according to the
33
--  rules of VHDL-93.
34
--
35
--------------------------------------------------------------------------
36

    
37
package bv_images is
38

    
39
  -- Image of bit vector as binary bit string literal
40
  -- (in the format B"...")
41
  -- Length of result is bv'length + 3
42

    
43
  function image (bv : in bit_vector) return string;
44

    
45
  -- Image of bit vector as octal bit string literal
46
  -- (in the format O"...")
47
  -- Length of result is (bv'length+2)/3 + 3
48

    
49
  function image_octal (bv : in bit_vector) return string;
50

    
51
  -- Image of bit vector as hex bit string literal
52
  -- (in the format X"...")
53
  -- Length of result is (bv'length+3)/4 + 3
54

    
55
  function image_hex (bv : in bit_vector) return string;
56

    
57
end bv_images;
58

    
(15-15/267)