Make patch for pr1792108 synth aware.

This patch makes the behavior selection fro pr1792108 depend on the
synth* functors.
This commit is contained in:
Cary R 2007-10-30 19:14:09 -07:00 committed by Stephen Williams
parent 221c99c5f4
commit 2ea6692833
2 changed files with 10 additions and 2 deletions

View File

@ -2515,9 +2515,9 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
assert(enet); assert(enet);
/* For synthesis we want just the inputs, but for the rest we /* For synthesis we want just the inputs, but for the rest we
* want inputs and outputs that may cause a value to change. */ * want inputs and outputs that may cause a value to change. */
extern const char *target; /* Target backend from main.cc */ extern bool synthesis; /* Synthesis flag from main.cc */
bool rem_out = false; bool rem_out = false;
if (!strcmp(target, "fpga") || !strcmp(target, "pal")) { if (synthesis) {
rem_out = true; rem_out = true;
} }
NexusSet*nset = enet->nex_input(rem_out); NexusSet*nset = enet->nex_input(rem_out);

View File

@ -144,6 +144,11 @@ const bool CASE_SENSITIVE = false;
const bool CASE_SENSITIVE = true; const bool CASE_SENSITIVE = true;
#endif #endif
/*
* Are we doing synthesis?
*/
bool synthesis = false;
extern void cprop(Design*des); extern void cprop(Design*des);
extern void synth(Design*des); extern void synth(Design*des);
extern void synth2(Design*des); extern void synth2(Design*des);
@ -371,6 +376,9 @@ static void read_iconfig_file(const char*ipath)
parm_to_flagmap(parm); parm_to_flagmap(parm);
} else if (strcmp(buf,"functor") == 0) { } else if (strcmp(buf,"functor") == 0) {
if (strncmp(cp, "synth", 5) == 0) {
synthesis = true; // We are doing synthesis.
}
net_func tmp = name_to_net_func(cp); net_func tmp = name_to_net_func(cp);
if (tmp == 0) { if (tmp == 0) {
cerr << "No such design transform function ``" cerr << "No such design transform function ``"