-
Notifications
You must be signed in to change notification settings - Fork 22
/
numeric_std_additions.html
74 lines (72 loc) · 3.52 KB
/
numeric_std_additions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html><head><title>Additions to package numeric_std</title>
<!-- Changed by: , 26-Aug-2009 -->
<meta name="description" content="Support and compatibility packages for the VHDL-2008 standard">
<meta name="author" content="dbishop@vhdl.org">
<META NAME=keywords CONTENT="numeric_std, VHDL, VHDL-2008">
<META NAME=identifier-url CONTENT="http://vhdl.org/fphdl/numeric_std_additions.html">
<META NAME=distribution CONTENT=Global>
<META NAME=rating CONTENT=General>
<META NAME=copyright CONTENT=>
<META NAME=resource-type CONTENT=document>
<META NAME=reply-to CONTENT="dbishop@vhdl.org">
<META NAME=robots CONTENT=all>
<META NAME=language CONTENT=en>
<META HTTP-EQUIV=CONTENT-type CONTENT=text/html; charset=iso-8859-1>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#007F00">
<p>
<a href="numeric_std_additions.vhdl">numeric_std_additions.vhdl</a> -- Additions to the package "ieee.numeric_std"
</p>
<p>
Use model:<br>
<b>use ieee.std_logic_1164.all;<br>
use ieee.numeric_std.all;<br>
use ieee_proposed.numeric_std_additions.all;</b>
</p><p>
Dependencies: ieee.std_logic_1164, ieee.numeric_std
</p>
<ul>
<li> SIGNED or UNSIGNED + std_ulogic operators
<li> SIGNED or UNSIGNED - std_ulogic operators
<li> type UNRESOLVED_UNSIGNED (aliased to U_UNSIGNED) is an unresolved
verion of UNSIGNED. It is aliased to "UNSIGNED" for compatability.
<li> type UNRESOLVED_SIGNED (aliased to U_SIGNED) is an unresolved
verion of SIGNED. It is aliased to "SIGNED" for compatability.
<li> \?=\, \?/=\ - similar to "std_match", but return std_ulogic values.
\?<\, \?<=\, \?>\, \?>=\ - compare functions which retrun std_ulogic.
(these will be "?="... operators in the release)
<li> To_X01, To_X01Z, To_U01X, Is_X - same as std_logic_1164 functions,
but overloaded for SIGNED and UNSIGNED.
<li> "sla" and "sra" - Mathmetically correct versions of these functions.
<li> minimum and maximum - smaller or larger of two SIGNED or UNSIGNED values.
<li> find_leftmost and find_rightmost - finds the first bit in a string.<br>
Example:<br>
<b>find_leftmost (c12, '1'); -- returns the Log2 of "c12".</b>
returns -1 if not found.
<li> _reduce functions (and_reduce, nand_reduce, or_reduce ...) are defined
These functions reduce a SIGNED or an UNSIGNED to a single bit.
(will overload the "or" and "and", ... operators in the release)
<li> SIGNED or UNSIGNED and "std_ulogic" operations are defined.
These will perform a boolean operation of a vector. <br>Example:<br>
<b>"1" xor "1010" = "0101";</b>
<li> READ and WRITE procedures for "SIGNED", and "UNSIGNED" are defined.
<li> HREAD and HWRITE (Hex read and write) for SIGNED and UNSIGNED.
These are more "forgiving" than the ones
originally from "std_logic_textio"
<li> OREAD and OWRITE (octal read and write) for "SIGNED" and "UNSIGNED.
These are more "forgiving" than the ones
originally from "std_logic_textio"
<li> BREAD and BWRITE (binary read and write, same as "READ" and "WRITE" for
SIGNED and UNSIGNED.
<li> to_string function - Converts a "SIGNED" or "UNSIGNED" types into a
string. Example: <br>
<b>assert (UNS = "101") report "result was " & to_string(UNS) severity note;</b>
<li> to_hstring and to_ostring function (SIGNED or UNSIGNED to hex or octal
string)
</ul>
Please send feedback to <em>David W. Bishop
<a href="mailto:dbishop@vhdl.org">dbishop@vhdl.org</a></em>.  
</font>
</body>
</html>