Only remove output nets for synthesis backends.

During elaboration only remove output nets for synthesis backends.
This commit is contained in:
Cary R 2007-10-25 13:31:00 -07:00 committed by Stephen Williams
parent dbce0cb05a
commit 221c99c5f4
1 changed files with 8 additions and 3 deletions

View File

@ -2513,9 +2513,14 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
if (expr_.count() == 0) {
assert(enet);
/* In this context we do not want all the inputs, so
do not remove outputs that are also inputs. */
NexusSet*nset = enet->nex_input(false);
/* For synthesis we want just the inputs, but for the rest we
* want inputs and outputs that may cause a value to change. */
extern const char *target; /* Target backend from main.cc */
bool rem_out = false;
if (!strcmp(target, "fpga") || !strcmp(target, "pal")) {
rem_out = true;
}
NexusSet*nset = enet->nex_input(rem_out);
if (nset == 0) {
cerr << get_line() << ": internal error: No NexusSet"
<< " from statement." << endl;