Thanks a lot,
Matt
--
*********************************************************
Matt Gavin BSEE U of Iowa '93
mtg...@uiuc.edu Go Iowa Hawks!!!!!
*********************************************************
Part of the std_logic_1164 package:
PACKAGE std_logic_1164 IS
-------------------------------------------------------------------
-- logic state system (unresolved)
-------------------------------------------------------------------
TYPE std_ulogic IS ( 'U', -- Uninitialized
'X', -- Forcing Unknown
'0', -- Forcing 0
'1', -- Forcing 1
'Z', -- High Impedance
'W', -- Weak Unknown
'L', -- Weak 0
'H', -- Weak 1
'-' -- Don't care
);
-------------------------------------------------------------------
-- unconstrained array of std_ulogic for use with the resolution function
-------------------------------------------------------------------
TYPE std_ulogic_vector IS ARRAY ( NATURAL RANGE <> ) OF std_ulogic;
-------------------------------------------------------------------
-- resolution function
-------------------------------------------------------------------
FUNCTION resolved ( s : std_ulogic_vector ) RETURN std_ulogic;
-------------------------------------------------------------------
-- *** industry standard logic type ***
-------------------------------------------------------------------
SUBTYPE std_logic IS resolved std_ulogic;
-------------------------------------------------------------------
-- unconstrained array of std_logic for use in declaring signal arrays
-------------------------------------------------------------------
TYPE std_logic_vector IS ARRAY ( NATURAL RANGE <>) OF std_logic;
Bert Molenkamp
Dept. of Computer Science
University of Twente
PO Box 217
7500 AE Enschede
the Netherlands
email: mole...@cs.utwente.nl
Dilbert: "You guys have it easy with thoses sissies 1164 types. When
VHDL first came out, we only had 1's and 0's!"
The STD_ULOGIC, STD_LOGIC, STD_ULOGIC_VECTOR and STD_LOGIC_VECTOR types
are the IEEE 1164 multi-valued logic types for VHDL modelling. They
can be found in the package IEEE.STD_LOGIC_1164. The logic values
are as follow:
'U' Unitialized (STD_ULOGIC'left)
'X'/'W' Strong/Weak unknown
'0'/'L' Strong/Weak 0
'1'/'H' Strong/Weak 1
'Z' High impedence
'-' Don't care (For synthesis only, treated as 'X')
The 'ULOGIC' types are unresolved versions of their "LOGIC" counterpart.
I personally prefer to use the former over the latter as a default blanket
type as it provide better documentation for the signals which DO require
to be resolved and error checking when I erroneously drive a signal more
than once.... The IEEE disagrees with me but then again, I'm not a member!
The IEEE is balloting a package to perform arithmetic operations on these
types called NUMERIC_STD. It is intended to replace vendor-supplied
arithmetic packages, such as Synopsys's STD_LOGIC_ARITH.
--
Janick Bergeron AnalySYS Inc. (613) 443-0428
Hardware Verification 25 Loiselle St, Suite 201 jan...@resudox.net
Consultant Embrun, ON, Canada, K0A 1W1
Synthesis - Verilog - VHDL
resolved vs. unresolved. If you have conflicting drivers of a net of
type std_logic, a resolution function is used to dictate the appropriate
value of the net vs. just assigning an unknown.
I think the values include 1,0,H,L,Z,X and U
- Protik
____________________________________________________________________________
| Protik Mia | email: ps...@hpespsm1.fc.hp.com |
| Hardware Design Engineer | phone: (303) 229-4748 |
| Hewlett-Packard Company | |
----------------------------------------------------------------------------
: resolved vs. unresolved. If you have conflicting drivers of a net of
: type std_logic, a resolution function is used to dictate the appropriate
: value of the net vs. just assigning an unknown.
: I think the values include 1,0,H,L,Z,X and U
The values are, in order U, X, 0, 1, Z, W, L, H, and -. U represents an
uninitialized net, and appears first so that this value becomes the default
value of all nets. - represents don't care; primarily useful for synthesis and
test vector description.
--
Paul Menchini |email: me...@mench.com |*********************************
Menchini & Associates|voice: 919-990-9506 |* PLEASE NOTE MY NEW EMAIL *
2 Davis Dr./POB 13036|pager: 800-306-8494 |* ADDRESS! *
RTP, NC 27709-3036 |fax: 919-990-9507 |*********************************
I have just started using VHDL under Synopsis and I am facing a small
problem which looks trivial but could not solve it. I will appreciate
any help.
I was trying to write a behavioral model for an ADDER which adds two
integers. I checked my code with VHDLAN and had no problems. Then I was
trying to simulate it using VHDLDBX. The first simulation was OK. When I
tried to simulate it later, I got "Arithmetic operation overflow".
The problem is that the debugger is assuming a value for the input signal
which is out of range. I am not sure if this has to do with the code or
with the Synopsys package
The code is as follows:
-----------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
entity adder is
port(in1,in2 : IN INTEGER;
sum : OUT INTEGER);
end adder;
architecture impl of adder is
signal sum_signed: INTEGER;
begin
sum_signed <= in1 + in2;
sum <= sum_signed;
end impl;
-----------------------------
Many thanks in advance,
Ammar
From: Frank J. Ludicky, Sundstrand Aerospace
I don't know what your test-bench for this looks like but when signals
are initiallized before simulation, their initial values are set to either
a
user defined default which you would have to give in the entity
declaration or the left most value of the type, for integers, this would
probably be -2 ^ 31. If in1 and in2 are added together with each at the
left most value, the result will be a value outside the legal values for
the predefined integer type.
I hope this helps. FJL