Is it possible to deactivate a process for synthesis
by means of the generate statement ?
for example:
IF Simulation=0 THEN
GENERATE
DEBUGGING: PROCESS
....
END PROCESS DEBUGGING;
END GENERATE;
Yes, but this syntax is not correct. Let simulation be defined similar to:
....
generic(
simulation : integer:=1 );
port(
....
the you can use it with:
gen_sim_label : if simulation=1 generate -- label is mandatory
-- do whatever you want here during simulation
end generate;
You could even use the generic parameter inside a process. Let me give
an example for a synchronous process:
process(reset,clock)
begin
if (reset='1') then
-- do some reset
elsif rising_edge(clock) then
-- do some synchronous stuff
if (simulation=1) then
assert ... -- some assertions
end if;
end if;
end process;
Note, that I don't know if synthesis tools will accept this. They will
definitely produce a warning that the code inside the if-statement
cannot be reached, but they might reject to synthesize, because the
"see" and unsynthesizable command.
Inside an inactive generate-statement they don't "see" anything.
Pragmas are unavoidable (AFAIK), if you want to comment something
outside the begin-end of an architecture. Example: For debugging it
could be useful to include a package, that defines a shared variable or
global signal. You can eliminate the code to access this shared variable
or global signal with an if-generate, but you can't eliminate the
include instruction.
Ralf
Ralf