diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-12 18:41:26 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-12 20:36:01 +0100 |
commit | 6d897ec95e89982f6449c083353b8af73c2c0479 (patch) | |
tree | ca7a123a20fcdfdf413be618846d93c8487fdf18 /src | |
parent | acdafdc2123b8e413d8433fec79aa30f7c5304d6 (diff) | |
download | ghdl-6d897ec95e89982f6449c083353b8af73c2c0479.tar.gz ghdl-6d897ec95e89982f6449c083353b8af73c2c0479.tar.bz2 ghdl-6d897ec95e89982f6449c083353b8af73c2c0479.zip |
netlists-memories: do not crash on anonymous ROM.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-memories.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb index d41468f86..9098cbfb1 100644 --- a/src/synth/netlists-memories.adb +++ b/src/synth/netlists-memories.adb @@ -723,9 +723,12 @@ package body Netlists.Memories is when Id_Const_Bit => Check_Memory_Read_Ports (Inst, Data_W, Size); if Data_W /= 0 then - Info_Msg_Synth - (+Inst, "found ROM %n, width: %v bits, depth: %v", - (1 => +Inst, 2 => +Data_W, 3 => +Size)); + if Get_Location (Inst) /= No_Location then + -- Not all Const_Bit have a location... + Info_Msg_Synth + (+Inst, "found ROM %n, width: %v bits, depth: %v", + (1 => +Inst, 2 => +Data_W, 3 => +Size)); + end if; Replace_ROM_Memory (Ctxt, Inst); end if; when others => |