aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/std_names.adb1
-rw-r--r--src/std_names.ads3
-rw-r--r--src/synth/ghdlsynth.h7
-rw-r--r--src/synth/netlists.ads2
4 files changed, 12 insertions, 1 deletions
diff --git a/src/std_names.adb b/src/std_names.adb
index 26eb53b84..4def79432 100644
--- a/src/std_names.adb
+++ b/src/std_names.adb
@@ -682,6 +682,7 @@ package body Std_Names is
Def ("allseq", Name_Allseq);
Def ("anyconst", Name_Anyconst);
Def ("anyseq", Name_Anyseq);
+ Def ("gclk", Name_Gclk);
-- Verilog directives
Def ("define", Name_Define);
diff --git a/src/std_names.ads b/src/std_names.ads
index 36fdbf249..2a7fc8dc0 100644
--- a/src/std_names.ads
+++ b/src/std_names.ads
@@ -767,7 +767,8 @@ package Std_Names is
Name_Allseq : constant Name_Id := Name_First_Synthesis + 001;
Name_Anyconst : constant Name_Id := Name_First_Synthesis + 002;
Name_Anyseq : constant Name_Id := Name_First_Synthesis + 003;
- Name_Last_Synthesis : constant Name_Id := Name_Anyseq;
+ Name_Gclk : constant Name_Id := Name_First_Synthesis + 004;
+ Name_Last_Synthesis : constant Name_Id := Name_Gclk;
-- Verilog Directives.
Name_First_Directive : constant Name_Id := Name_Last_Synthesis + 1;
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,