diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:27:18 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:27:18 +0100 |
commit | 9f9f0594c08c3555040fff73a16d3b837420d3c3 (patch) | |
tree | 9b817cbb4d3387714da2366b02b00742c29b3f94 /src/synth/synth-source.adb | |
parent | 2d4085f81f449fbb5ae5819750549b9dbe3d8fd1 (diff) | |
download | ghdl-9f9f0594c08c3555040fff73a16d3b837420d3c3.tar.gz ghdl-9f9f0594c08c3555040fff73a16d3b837420d3c3.tar.bz2 ghdl-9f9f0594c08c3555040fff73a16d3b837420d3c3.zip |
synth: add set_location_maybe (for roms).
Diffstat (limited to 'src/synth/synth-source.adb')
-rw-r--r-- | src/synth/synth-source.adb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/synth/synth-source.adb b/src/synth/synth-source.adb index 4f6230723..e5d38e85c 100644 --- a/src/synth/synth-source.adb +++ b/src/synth/synth-source.adb @@ -47,4 +47,31 @@ package body Synth.Source is Set_Location2 (Inst, Src); end if; end Set_Location; + + procedure Set_Location_Maybe2 (Inst : Netlists.Instance; Src : Syn_Src) is + begin + if Get_Location (Inst) /= No_Location then + return; + end if; + Set_Location2 (Inst, Src); + end Set_Location_Maybe2; + + procedure Set_Location_Maybe (Inst : Netlists.Instance; Src : Syn_Src) is + begin + if Flag_Locations then + Set_Location_Maybe2 (Inst, Src); + end if; + end Set_Location_Maybe; + + procedure Set_Location_Maybe2 (N : Netlists.Net; Src : Syn_Src) is + begin + Set_Location_Maybe2 (Get_Net_Parent (N), Src); + end Set_Location_Maybe2; + + procedure Set_Location_Maybe (N : Netlists.Net; Src : Syn_Src) is + begin + if Flag_Locations then + Set_Location_Maybe2 (N, Src); + end if; + end Set_Location_Maybe; end Synth.Source; |