aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-environment.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-01 20:03:47 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-01 20:03:47 +0200
commit6324fe8dc6aba1e0a57575a2986407df150f59f3 (patch)
treeb676b303a19b7588e682feafc6aafb4d3e6344fa /src/synth/synth-environment.adb
parent77a286d0a6c428b41037c3a7a81f7f3b962631f5 (diff)
downloadghdl-6324fe8dc6aba1e0a57575a2986407df150f59f3.tar.gz
ghdl-6324fe8dc6aba1e0a57575a2986407df150f59f3.tar.bz2
ghdl-6324fe8dc6aba1e0a57575a2986407df150f59f3.zip
synth: fix in extract_merge_partial_assigns.
Diffstat (limited to 'src/synth/synth-environment.adb')
-rw-r--r--src/synth/synth-environment.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb
index 8403e1066..2f6043cf9 100644
--- a/src/synth/synth-environment.adb
+++ b/src/synth/synth-environment.adb
@@ -797,8 +797,13 @@ package body Synth.Environment is
begin
if Pa.Offset <= Off then
Off := Uns32'Max (Pa.Offset, Min_Off);
+ -- FIXME: May increase the width.
Wd := Width'Min
(Wd, Get_Width (Pa.Value) - (Off - Pa.Offset));
+ elsif Pa.Offset < Off + Wd then
+ -- Reduce the width when there is an assignment after
+ -- the current offset.
+ Wd := Pa.Offset - Off;
end if;
end;
end if;