aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-12 05:12:37 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-12 05:15:16 +0200
commitb1c8c9a1e6a32ed390a2e73c928ca15762ec20b2 (patch)
treedf8b1054ef0b69fd114a97526ff1ee6f491731d6 /src/synth
parent904abc55c0821f85151a8328904f5621e60c8f02 (diff)
downloadghdl-b1c8c9a1e6a32ed390a2e73c928ca15762ec20b2.tar.gz
ghdl-b1c8c9a1e6a32ed390a2e73c928ca15762ec20b2.tar.bz2
ghdl-b1c8c9a1e6a32ed390a2e73c928ca15762ec20b2.zip
simul: do not consider signal parameters as dynamic values
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-flags.ads5
-rw-r--r--src/synth/synth-vhdl_stmts.adb4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/synth/synth-flags.ads b/src/synth/synth-flags.ads
index 211c01c1d..aa3a0b8aa 100644
--- a/src/synth/synth-flags.ads
+++ b/src/synth/synth-flags.ads
@@ -84,5 +84,10 @@ package Synth.Flags is
-- If true, treat all PSL assume directives like assert directives
Flag_Assume_As_Assert : Boolean := False;
+ -- If true, simulation is run instead of synthesis. Consequences:
+ -- * signals value are known and can be read (through hooks).
+ -- * signals attributes are supported.
+ Flag_Simulation : Boolean := False;
+
Flag_Verbose : Boolean := False;
end Synth.Flags;
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
index 04555a776..f2abd6df7 100644
--- a/src/synth/synth-vhdl_stmts.adb
+++ b/src/synth/synth-vhdl_stmts.adb
@@ -2067,7 +2067,9 @@ package body Synth.Vhdl_Stmts is
return;
end if;
- if Get_Instance_Const (Subprg_Inst) and then not Is_Static (Val.Val)
+ if Get_Instance_Const (Subprg_Inst)
+ and then not Flags.Flag_Simulation
+ and then not Is_Static (Val.Val)
then
Set_Instance_Const (Subprg_Inst, False);
end if;