|
degate 0.1.1
|
#include <RuleChecker.h>

Public Member Functions | |
| RuleChecker () | |
| void | run (LogicModel_shptr lmodel) |
| The run method is abstract and must be implemented in derived classes. | |
Private Attributes | |
| std::list< RCBase_shptr > | checks |
Definition at line 31 of file RuleChecker.h.
| degate::RuleChecker::RuleChecker | ( | ) | [inline] |
Definition at line 39 of file RuleChecker.h.
References checks.
: RCBase("rc-all", "A collection of all RCs.") { checks.push_back(RCBase_shptr(new ERCOpenPorts())); checks.push_back(RCBase_shptr(new ERCNet())); }
| void degate::RuleChecker::run | ( | LogicModel_shptr | lmodel | ) | [inline, virtual] |
The run method is abstract and must be implemented in derived classes.
The implementation should check for design rule violations. Each RC violation must be stored via method add_rc_violation(). Note: Because run() can be called multiple times, at the beginning of run() you must clear the list of detected violations.
Implements degate::RCBase.
Definition at line 44 of file RuleChecker.h.
References degate::RCBase::add_rc_violation(), checks, degate::RCBase::clear_rc_violations(), debug(), degate::RCBase::get_rc_violations(), and TM.
{
debug(TM, "run RC");
clear_rc_violations();
BOOST_FOREACH(RCBase_shptr check, checks) {
std::cout << "RC: " << check->get_rc_class_name() << std::endl;
check->run(lmodel);
BOOST_FOREACH(RCViolation_shptr violation, check->get_rc_violations()) {
add_rc_violation(violation);
}
}
debug(TM, "found %d rc violations.", get_rc_violations().size());
}

std::list<RCBase_shptr> degate::RuleChecker::checks [private] |
Definition at line 35 of file RuleChecker.h.
Referenced by RuleChecker(), and run().
1.7.4