Modelsim error when doing: port map(a => not(b))

Hi all,

I'm VERY sorry because I've seen much discussion about globally static expressions and Modelsim, but I cannot find a clear answer to this problem.

When you instantiate an entity, is quite common to negate one of the inputs. It would look something like this:

i_my_entity : MyEntity port map( ena => not(nEN) );

When we pass it to Modelsim for pre-synthesis simulation, it complains: "The actual for formal 'ena' is not a globally static expression".

I don't look for an answer for "why it does not work". I would like to know HOW can I make it work in a convenient way, different from assigning not(nEN) to a signal and passing this signal to the instantiation like this:

signal aNegation : std_logic; ... aNegation aNegation );

Regards. Jose.

Reply to
JL
Loading thread data ...

Hehehe, I answer to myself (and to those who found the same problem).

I found a possible answer here:

formatting link

The trick seems to be enclosing the NOT like this:

i_my_entity : MyEntity port map( ena => "not"(nEN) );

I'm trying now if it works, but what I can tell you for sure is that Modelsims compiles it.

Regards. Jose.

Reply to
JL

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.