Backport Nexus::has_floating_input() from master branch.
Needed to support check for output port coercion.
This commit is contained in:
parent
e7852f8f9c
commit
a11dc8b472
14
net_link.cc
14
net_link.cc
|
|
@ -311,6 +311,20 @@ void Nexus::count_io(unsigned&inp, unsigned&out) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Nexus::has_floating_input() const
|
||||||
|
{
|
||||||
|
bool found_input = false;
|
||||||
|
for (const Link*cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
|
||||||
|
if (cur->get_dir() == Link::OUTPUT)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (cur->get_dir() == Link::INPUT)
|
||||||
|
found_input = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return found_input;
|
||||||
|
}
|
||||||
|
|
||||||
bool Nexus::drivers_present() const
|
bool Nexus::drivers_present() const
|
||||||
{
|
{
|
||||||
for (const Link*cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
|
for (const Link*cur = first_nlink() ; cur ; cur = cur->next_nlink()) {
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,10 @@ class Nexus {
|
||||||
is a variable, but also if this is a net with a force. */
|
is a variable, but also if this is a net with a force. */
|
||||||
bool assign_lval() const;
|
bool assign_lval() const;
|
||||||
|
|
||||||
|
/* This method returns true if there are any inputs
|
||||||
|
attached to this nexus but no drivers. */
|
||||||
|
bool has_floating_input() const;
|
||||||
|
|
||||||
/* This method returns true if there are any drivers
|
/* This method returns true if there are any drivers
|
||||||
(including variables) attached to this nexus. */
|
(including variables) attached to this nexus. */
|
||||||
bool drivers_present() const;
|
bool drivers_present() const;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue