|
degate 0.1.1
|
Electrical Rule Checks that detects open ports, that means if a port is electrically unconnected. More...
#include <ERCOpenPorts.h>

Public Member Functions | |
| ERCOpenPorts () | |
| void | run (LogicModel_shptr lmodel) |
| The run method is abstract and must be implemented in derived classes. | |
Electrical Rule Checks that detects open ports, that means if a port is electrically unconnected.
Definition at line 35 of file ERCOpenPorts.h.
| ERCOpenPorts::ERCOpenPorts | ( | ) |
Definition at line 27 of file ERCOpenPorts.cc.
: RCBase("open_port", "Check for unconnected ports.", RC_WARNING) { }
| void ERCOpenPorts::run | ( | LogicModel_shptr | lmodel | ) | [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 31 of file ERCOpenPorts.cc.
References degate::RCBase::add_rc_violation(), degate::RCBase::clear_rc_violations(), debug(), degate::RCBase::get_rc_class_name(), and TM.
{
clear_rc_violations();
if(lmodel == NULL) return;
// iterate over Gates
debug(TM, "\tRC: iterate over gates.");
for(LogicModel::gate_collection::iterator g_iter = lmodel->gates_begin();
g_iter != lmodel->gates_end(); ++g_iter) {
Gate_shptr gate = g_iter->second;
for(Gate::port_const_iterator p_iter = gate->ports_begin();
p_iter != gate->ports_end(); ++p_iter) {
GatePort_shptr port = *p_iter;
assert(port != NULL);
Net_shptr net = port->get_net();
if(net == NULL || net->size() <= 1) {
boost::format f("Port %1% is unconnected.");
f % port->get_descriptive_identifier();
debug(TM, "\tRC: found a vioation.");
add_rc_violation(RCViolation_shptr(new RCViolation(port, f.str(),
get_rc_class_name())));
}
}
}
}

1.7.4