diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-23 17:48:54 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-23 17:48:54 +0200 |
commit | ef0164a6e0bb466c29bf6d9abba0d315b0ae9fd3 (patch) | |
tree | 6fee721718021ee0fd46be590b73f85967df71b4 /src/synth/netlists-utils.adb | |
parent | 5ebeb5e2277b550b12614642522fd1c86fd580b0 (diff) | |
download | ghdl-ef0164a6e0bb466c29bf6d9abba0d315b0ae9fd3.tar.gz ghdl-ef0164a6e0bb466c29bf6d9abba0d315b0ae9fd3.tar.bz2 ghdl-ef0164a6e0bb466c29bf6d9abba0d315b0ae9fd3.zip |
netlists: complete support of attributes. For #1318
Diffstat (limited to 'src/synth/netlists-utils.adb')
-rw-r--r-- | src/synth/netlists-utils.adb | 14 |
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))); |