Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of #ifdef in VHDL for simulation/synthesis separation?

Tags:

vhdl

In order to ease the visual reading of simulation waves, I would like to assign some signals to "XXXX", but only at simulation time, and thus I want the logical synthesis tool (ISE in my case) to skip those instructions.

Two questions from here:

  1. Is there an equivalent technique of a #ifdef SIMULATION_TIME, like in C ?
  2. Would an assignment to "XXXX" have any influence on the logical synthesis (reset to 0 ? warnings ? nothing ?). If it has no impact at all, then my question is answered. If not, I still need to assign to "XXXX"...

Thanks.

like image 512
Aurelien Ribon Avatar asked Feb 25 '11 14:02

Aurelien Ribon


People also ask

Is it equivalent to or equivalent of?

The adjective equivalent is used when something has the same value, amount, meaning etc. as another thing. The most common preposition used with this adjective is to: 150 grams are equivalent to a medium-sized potato.

What does it mean for equivalent?

Definition of equivalent 1 : equal in force, amount, or value also : equal in area or volume but not superposable a square equivalent to a triangle. 2a : like in signification or import. b : having logical equivalence equivalent statements. 3 : corresponding or virtually identical especially in effect or function.

What is equivalent and example?

In math, equivalent is different from equal. Equal means same in all aspects, whereas equivalent means similar but not identical. For example, 2 is said to be equal to 2 but equivalent to 1 + 1.

What does equivalent mean equal?

Equal and equivalent are terms that are used frequently in mathematics. The main difference between equal and equivalent is that the term equal refers to things that are similar in all aspects, whereas the term equivalent refers to things that are similar in a particular aspect.


1 Answers

(1) You're looking for

--pragma synthesis_off
  -- your simulation-only code
--pragma synthesis_on

(2) You might get some warnings from ISE, especially when these signals drive logic. Just make sure, that the signals have a defined value before you use them. This method should work then, as well.

like image 184
Deve Avatar answered Oct 03 '22 11:10

Deve