Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Boolean port

Reply
Thread Tools

Boolean port

 
 
Dan
Guest
Posts: n/a
 
      12-01-2007
I'm trying to simulate an entity that has a boolean output port, but
ModelSim alerts me with this message:

"Types do not match between component and entity for port <port_name>"

(Filename "Name_of_my_entity_timesim.vhd" Line 30)

I opened that file and I notice that the boolean signal is represented as
std_logic_vector (0 downto 0)

?

I worked around the problem using a std_logic type instead of boolean, but I
would like to know about other suggestions.

Is this a known problem when simulating boolean signals?

Thanks,

 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      12-01-2007
On Sat, 1 Dec 2007 15:34:12 +0100, "Dan" <> wrote:

>I'm trying to simulate an entity that has a boolean output port, but
>ModelSim alerts me with this message:
>
> "Types do not match between component and entity for port <port_name>"
>
>I opened that file and I notice that the boolean signal is represented as
>std_logic_vector (0 downto 0)
>
>?
>Is this a known problem when simulating boolean signals?


It's a known problem when ports on a component and
an entity are of different type

Was the component automatically generated in some way
from the entity? If so, the automatic tool is buggy.

Read my lips: VHDL IS A STRONGLY TYPED LANGUAGE.
boolean != std_logic
std_logic != std_logic_vector(0 downto 0)

There's nothing wrong with using boolean signals, provided
you are happy for your simulations to use 2-state logic.
But a port of boolean type can only be connected to a
signal of boolean type, and so on. And the data types of
ports on component and entity must match, or else must
be type-converted in a configuration's port map.

You may find it's less hassle to use direct instantiation,
so that you don't use components at all. You then need
only to concern yourself with matching signal types to
the types of ports of the entity.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK

http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      12-03-2007
On Dec 1, 8:34 am, "Dan" <nom...@noserver.com> wrote:
> I'm trying to simulate an entity that has a boolean output port, but
> ModelSim alerts me with this message:
>
> "Types do not match between component and entity for port <port_name>"
>
> (Filename "Name_of_my_entity_timesim.vhd" Line 30)
>
> I opened that file and I notice that the boolean signal is represented as
> std_logic_vector (0 downto 0)
>
> ?
>
> I worked around the problem using a std_logic type instead of boolean, but I
> would like to know about other suggestions.
>
> Is this a known problem when simulating boolean signals?
>
> Thanks,


If you use a boolean port at the top level of your RTL (synthesizable
code), then the gate level model will change to std_logic. I suspect
this may be related to your problem. Are you trying to use a
configuration to bind your testbench to your gate level model? Look up
port (or type) conversion functions. They can be called in the port
map of the UUT in the configuration of your testbench.

Andy
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtle difference between boolean value and boolean comparison? Metre Meter Javascript 7 08-06-2010 08:40 PM
difference between 'boolean' and 'java.lang.Boolean' J Leonard Java 4 01-19-2008 02:56 AM
Boolean as port type Yaseen Zaidi VHDL 1 04-16-2006 09:39 PM
Overhead of 4-port over 2-port SRAM John T. Goodman VHDL 0 01-25-2005 04:27 PM
about "match ip rtp starting-port-number port-range" Weiguang Shi Cisco 1 10-25-2003 07:14 AM



Advertisments
 



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