aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-13 08:26:01 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-13 08:26:01 +0200
commit53914c09e1f532e0c6fa509634303b3a017dbb97 (patch)
treef63356d55b0d1d5f9e485f5e8425090e4f3a23c7 /src/vhdl
parent9e7c56c666a48f6db66e936bb547c70d22d18c0a (diff)
downloadghdl-53914c09e1f532e0c6fa509634303b3a017dbb97.tar.gz
ghdl-53914c09e1f532e0c6fa509634303b3a017dbb97.tar.bz2
ghdl-53914c09e1f532e0c6fa509634303b3a017dbb97.zip
vhdl-configuration: handle overrides of slv. Fix #1298
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-configuration.adb16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-configuration.adb b/src/vhdl/vhdl-configuration.adb
index 5f50a16aa..ad3fdc6a1 100644
--- a/src/vhdl/vhdl-configuration.adb
+++ b/src/vhdl/vhdl-configuration.adb
@@ -1158,7 +1158,20 @@ package body Vhdl.Configuration is
end loop;
end;
else
- Append_String8_String (Value.all);
+ declare
+ Eid : Name_Id;
+ Elit : Iir;
+ begin
+ for I in Value'Range loop
+ Eid := Get_Identifier (Value (I));
+ Elit := Find_Name_In_Flist (Elist, Eid);
+ if Elit = Null_Iir then
+ Error_Msg_Elab ("incorrect character %i in string", +Eid);
+ Elit := Get_Nth_Element (Elist, 0);
+ end if;
+ Append_String8 (Nat8 (Get_Enum_Pos (Elit)));
+ end loop;
+ end;
Len := Value'Length;
end if;
Res := Create_Iir (Iir_Kind_String_Literal8);
@@ -1201,6 +1214,7 @@ package body Vhdl.Configuration is
end case;
if Res = Null_Iir then
Error_Msg_Elab ("unhandled override for %n", +Gen);
+ return;
end if;
if Get_Is_Ref (Gen) then