aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-parse.adb
diff options
context:
space:
mode:
authorT. Meissner <programming@goodcleanfun.de>2021-02-09 07:31:00 +0100
committerGitHub <noreply@github.com>2021-02-09 07:31:00 +0100
commit7d5bfac5526528e32f5f44b9bea0bbdfee21a589 (patch)
treea3d749912cca5d83f8cb1da304b90a62713d2d59 /src/vhdl/vhdl-parse.adb
parenta75c135b5bb3c817ff0d9605c5cfabbfa721c13b (diff)
downloadghdl-7d5bfac5526528e32f5f44b9bea0bbdfee21a589.tar.gz
ghdl-7d5bfac5526528e32f5f44b9bea0bbdfee21a589.tar.bz2
ghdl-7d5bfac5526528e32f5f44b9bea0bbdfee21a589.zip
Add support for PSL onehot/onehot0 functions (#1633)
* vhdl: parse PSL onehot/onehot0 builtin calls. For #662 * update pyGHDL bindings * Synthesis of PSL built-in onehot/onehot0 function. * testsuite/synth: add tests of PSL built-in functions onehot()/onehot0() for #662 * doc: add info about PSL built-in functions onehot()/onehot0() for #662 * synth: refactor synthesis of onehot/onehot0 functions Co-authored-by: eine <eine@users.noreply.github.com>
Diffstat (limited to 'src/vhdl/vhdl-parse.adb')
-rw-r--r--src/vhdl/vhdl-parse.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index 03d73883e..21ffab509 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -6060,6 +6060,8 @@ package body Vhdl.Parse is
Set_Clock_Expression (Res, Expr);
when Iir_Kind_Psl_Prev =>
Set_Count_Expression (Res, Expr);
+ when others =>
+ Error_Msg_Parse ("too many parameter for PSL builtin");
end case;
end if;
@@ -6243,6 +6245,10 @@ package body Vhdl.Parse is
return Parse_PSL_Builtin_Call (Iir_Kind_Psl_Rose);
when Tok_Fell =>
return Parse_PSL_Builtin_Call (Iir_Kind_Psl_Fell);
+ when Tok_Onehot =>
+ return Parse_PSL_Builtin_Call (Iir_Kind_Psl_Onehot);
+ when Tok_Onehot0 =>
+ return Parse_PSL_Builtin_Call (Iir_Kind_Psl_Onehot0);
when Tok_Minus
| Tok_Plus =>