aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-02-18 19:38:43 +0100
committerTristan Gingold <tgingold@free.fr>2020-02-18 19:38:43 +0100
commitb99ed926f9015d28e672b614c39279061e602eba (patch)
tree483f2c34aa3240c935ed6c05862859101c241440
parent922c301a8d6ecfd02950db5cde9f1dde4218455e (diff)
downloadghdl-b99ed926f9015d28e672b614c39279061e602eba.tar.gz
ghdl-b99ed926f9015d28e672b614c39279061e602eba.tar.bz2
ghdl-b99ed926f9015d28e672b614c39279061e602eba.zip
synth-environment: handle unassigned outputs.
-rw-r--r--src/synth/synth-environment.adb14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb
index 7c3218105..e24239dcd 100644
--- a/src/synth/synth-environment.adb
+++ b/src/synth/synth-environment.adb
@@ -507,12 +507,12 @@ package body Synth.Environment is
-- There is an hole.
if Next_Off = Expected_Off + 1 then
Warning_Msg_Synth
- (+Wire_Rec.Decl, "no assignment for offset %v",
- (1 => +Expected_Off));
+ (+Wire_Rec.Decl, "no assignment for offset %v of %n",
+ (1 => +Expected_Off, 2 => +Wire_Rec.Decl));
else
Warning_Msg_Synth
- (+Wire_Rec.Decl, "no assignment for offsets %v:%v",
- (+Expected_Off, +(Next_Off - 1)));
+ (+Wire_Rec.Decl, "no assignment for offsets %v:%v of %n",
+ (+Expected_Off, +(Next_Off - 1), +Wire_Rec.Decl));
end if;
-- Insert conc_assign with initial value.
@@ -582,10 +582,12 @@ package body Synth.Environment is
if Wire_Rec.Decl /= Null_Node
and then Wire_Rec.Kind = Wire_Output
then
- Error_Msg_Synth
+ Warning_Msg_Synth
(+Wire_Rec.Decl, "no assignment for %n", +Wire_Rec.Decl);
+ Value := Build_Const_Z (Ctxt, Get_Width (Wire_Rec.Gate));
+ else
+ return;
end if;
- return;
when 1 =>
declare
Conc_Asgn : Conc_Assign_Record renames