From d4d7c14b360f5a18b521245b413a52b80d557fc5 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 28 Jan 2009 21:01:49 -0800 Subject: [PATCH] Elide $sdf_anotate when specify is turned off. Not only does this have a trivial performance benefit, it also will prevent annotation warnings when the user turns of specify support. --- elaborate.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/elaborate.cc b/elaborate.cc index f51cf25b2..a974bf988 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -2404,6 +2404,12 @@ NetProc* PCallTask::elaborate_sys(Design*des, NetScope*scope) const { assert(scope); + if (path_.size() > 1) { + cerr << get_fileline() << ": error: Hierarchical system task names" + << " make no sense: " << path_ << endl; + des->errors += 1; + } + unsigned parm_count = nparms(); /* Catch the special case that the system task has no @@ -2442,6 +2448,18 @@ NetProc* PCallTask::elaborate_sys(Design*des, NetScope*scope) const } } + // Special case: Specify blocks are turned off, and this is an + // $sdf_annotate system task. There will be nothing for $sdf + // to annotate, and the user is intending to turn the behavior + // off anyhow, so replace the system task invocation with a no-op. + if (gn_specify_blocks_flag == false + & peek_tail_name(path_) == "$sdf_annotate") { + + NetBlock*noop = new NetBlock(NetBlock::SEQU, scope); + noop->set_line(*this); + return noop; + } + NetSTask*cur = new NetSTask(peek_tail_name(path_), eparms); cur->set_line(*this); return cur;