aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-03-17 18:45:06 +0100
committerTristan Gingold <tgingold@free.fr>2021-03-17 18:45:06 +0100
commit4be07f298050ec2de183be699ad7e9650b5b5b9c (patch)
tree699e323a89e4b51bcd251b68b2284efdd864f2b6 /src/synth/netlists.adb
parent0d8f155d3c9e5413a42984f0f290c71ab89a71ba (diff)
downloadghdl-4be07f298050ec2de183be699ad7e9650b5b5b9c.tar.gz
ghdl-4be07f298050ec2de183be699ad7e9650b5b5b9c.tar.bz2
ghdl-4be07f298050ec2de183be699ad7e9650b5b5b9c.zip
netlists: do not remove net gates that have an attribute
Diffstat (limited to 'src/synth/netlists.adb')
-rw-r--r--src/synth/netlists.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/synth/netlists.adb b/src/synth/netlists.adb
index 18ca51992..24c39df50 100644
--- a/src/synth/netlists.adb
+++ b/src/synth/netlists.adb
@@ -1232,11 +1232,16 @@ package body Netlists is
return Modules_Table.Table (M).Attrs;
end Get_Attributes;
+ function Has_Attribute (Inst : Instance) return Boolean is
+ begin
+ return Instances_Table.Table (Inst).Has_Attr;
+ end Has_Attribute;
+
function Get_First_Attribute (Inst : Instance) return Attribute
is
pragma Assert (Is_Valid (Inst));
begin
- if not Instances_Table.Table (Inst).Has_Attr then
+ if not Has_Attribute (Inst) then
return No_Attribute;
end if;
declare