aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-utils.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r--src/synth/netlists-utils.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/synth/netlists-utils.adb b/src/synth/netlists-utils.adb
index 145692ef4..74df5908c 100644
--- a/src/synth/netlists-utils.adb
+++ b/src/synth/netlists-utils.adb
@@ -289,6 +289,20 @@ package body Netlists.Utils is
end;
end Same_Net;
+ procedure Copy_Attributes (Dest : Instance; Src : Instance)
+ is
+ Attr : Attribute;
+ begin
+ Attr := Get_First_Attribute (Src);
+ while Attr /= No_Attribute loop
+ Set_Attribute (Dest,
+ Get_Attribute_Name (Attr),
+ Get_Attribute_Type (Attr),
+ Get_Attribute_Pval (Attr));
+ Attr := Get_Attribute_Next (Attr);
+ end loop;
+ end Copy_Attributes;
+
function Clog2 (W : Width) return Width is
begin
return Uns32 (Mutils.Clog2 (Uns64 (W)));