aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-01-25 18:18:30 +0100
committerTristan Gingold <tgingold@free.fr>2021-01-25 18:19:10 +0100
commit6b81ec185f16791362ca770f391578c2a8b828f0 (patch)
tree18aa0ed76886f1efc84fbb2d97358f29d4787617 /src/synth
parentccc1c045a19345bc970a7ababb8ee0a260bd6194 (diff)
downloadghdl-6b81ec185f16791362ca770f391578c2a8b828f0.tar.gz
ghdl-6b81ec185f16791362ca770f391578c2a8b828f0.tar.bz2
ghdl-6b81ec185f16791362ca770f391578c2a8b828f0.zip
std_names: add gclk. For #1610
Regenerate python files.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/ghdlsynth.h7
-rw-r--r--src/synth/netlists.ads2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/synth/ghdlsynth.h b/src/synth/ghdlsynth.h
index 90c4f15f0..abbb68f77 100644
--- a/src/synth/ghdlsynth.h
+++ b/src/synth/ghdlsynth.h
@@ -72,6 +72,13 @@ namespace GhdlSynth {
return name_table__get_address (n.id);
}
+ extern "C" unsigned name_table__get_identifier_with_len(const char *s, unsigned l);
+ inline Name_Id get_identifier(const char *s) {
+ Name_Id n;
+ n.id = name_table__get_identifier_with_len(s, strlen(s));
+ return n;
+ }
+
struct Sname { unsigned int id; };
const Sname No_Sname = {0 };
diff --git a/src/synth/netlists.ads b/src/synth/netlists.ads
index 5ef74a77d..93bf8b1d3 100644
--- a/src/synth/netlists.ads
+++ b/src/synth/netlists.ads
@@ -397,6 +397,8 @@ private
function Attribute_Build (Params : Instance) return Instance;
function Attribute_Build_Value (Obj : Instance) return Attribute;
+ -- Per instance map of attribute.
+ -- The index is the sub-instance, the value is the attribute chain.
package Attribute_Maps is new Dyn_Maps
(Params_Type => Instance,
Object_Type => Instance,