From 72989dd9f956de578634355da0b5b6b21696b85e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 20 Jun 2022 13:11:09 +0100 Subject: [PATCH] add set only first demo --- openpower/sv/sof.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 openpower/sv/sof.py diff --git a/openpower/sv/sof.py b/openpower/sv/sof.py new file mode 100644 index 000000000..164c32623 --- /dev/null +++ b/openpower/sv/sof.py @@ -0,0 +1,39 @@ +def sof(RA, mask=None, zero=False): + RT = RA if mask is not None and not zero else 0 + i = 0 + # start setting if no predicate or if 1st predicate bit set + setting_mode = mask is None + found = False + while i < 16: + bit = 1<