| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-08-30 15:15:02 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-08-30 15:15:02 +0200 |
| commit | 99bbe050e57c50c5c21b849c1721fe9979894d8f (patch) | |
| tree | 09b4a92fedc2b56e5f0ff1f91847a90708603aa0 /instance-calculator/src/VHDLWaveform.java | |
| parent | b715c825c0a36063e7b79248059263b438a0b5a6 (diff) | |
Reduces the scalability issue.
It seems to take very long to find solutions for
simple_flip_flop_instance, but at least it no longer gives up right
away.
Diffstat (limited to 'instance-calculator/src/VHDLWaveform.java')
| -rw-r--r-- | instance-calculator/src/VHDLWaveform.java | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/instance-calculator/src/VHDLWaveform.java b/instance-calculator/src/VHDLWaveform.java index 74edc88..89cf945 100644 --- a/instance-calculator/src/VHDLWaveform.java +++ b/instance-calculator/src/VHDLWaveform.java @@ -74,7 +74,6 @@ public class VHDLWaveform result = new VHDLWaveform.Instance ( - Instances.get_id_for(instances_count), this, visibility ); @@ -104,18 +103,32 @@ public class VHDLWaveform public static class Instance { + private static int instances_count; + + static + { + instances_count = 0; + } + private final String id; private final VHDLWaveform parent; private final VHDLEntity visibility; private Instance ( - final String id, final VHDLWaveform parent, final VHDLEntity visibility ) { - this.id = id; + this.id = + ( + Main.get_parameters().get_id_prefix() + + "wfm_" + + instances_count + ); + + instances_count += 1; + this.parent = parent; this.visibility = visibility; } @@ -134,7 +147,12 @@ public class VHDLWaveform { try { - of.write("(is_waveform_instance "); + of.write("(add_element wfm_instance "); + of.write(id); + of.write(")"); + of.insert_newline(); + + of.write("(is_wfm_instance_of "); of.write(id); of.write(" "); of.write(parent.get_id()); @@ -144,8 +162,6 @@ public class VHDLWaveform of.write("(is_visible_in "); of.write(id); of.write(" "); - of.write(parent.get_id()); - of.write(" "); of.write(visibility.get_id()); of.write(")"); of.insert_newline(); @@ -166,7 +182,7 @@ public class VHDLWaveform @Override public String toString () { - return "<" + parent.get_id() + ", " + id + ">"; + return id; } } } |


