openpower-isa.git
12 months agosyscall: handle arm and aarch64 architectures
Dmitry Selyutin [Mon, 23 Oct 2023 20:23:08 +0000 (23:23 +0300)]
syscall: handle arm and aarch64 architectures

13 months agotest_syscall: hardcode MSR validation
Dmitry Selyutin [Mon, 23 Oct 2023 06:17:55 +0000 (09:17 +0300)]
test_syscall: hardcode MSR validation

13 months agotest_syscall: check MSR; update expected PC
Dmitry Selyutin [Sun, 22 Oct 2023 13:14:55 +0000 (16:14 +0300)]
test_syscall: check MSR; update expected PC

13 months agoisa/test_runner: support initial_msr parameter
Dmitry Selyutin [Sun, 22 Oct 2023 06:44:37 +0000 (09:44 +0300)]
isa/test_runner: support initial_msr parameter

13 months agoisa/caller: return from interrupt upon syscall emulation
Dmitry Selyutin [Sun, 22 Oct 2023 06:29:50 +0000 (09:29 +0300)]
isa/caller: return from interrupt upon syscall emulation

13 months agotest_syscall: provide code for future SPR checks
Dmitry Selyutin [Fri, 20 Oct 2023 17:16:22 +0000 (20:16 +0300)]
test_syscall: provide code for future SPR checks

13 months agoisa/caller: refactor sc logic
Dmitry Selyutin [Fri, 20 Oct 2023 17:15:12 +0000 (20:15 +0300)]
isa/caller: refactor sc logic

13 months agotest_caller: introduce syscall tests
Dmitry Selyutin [Wed, 18 Oct 2023 17:11:51 +0000 (20:11 +0300)]
test_caller: introduce syscall tests

13 months agoisa/caller: enable host-backed memory for scemu
Dmitry Selyutin [Wed, 18 Oct 2023 15:32:37 +0000 (18:32 +0300)]
isa/caller: enable host-backed memory for scemu

13 months agotest/runner: introduce use_syscall_emu parameter
Dmitry Selyutin [Wed, 18 Oct 2023 15:26:14 +0000 (18:26 +0300)]
test/runner: introduce use_syscall_emu parameter

13 months agoisa/caller: introduce use_syscall_emu parameter
Dmitry Selyutin [Wed, 18 Oct 2023 15:24:31 +0000 (18:24 +0300)]
isa/caller: introduce use_syscall_emu parameter

13 months agoisa/test_runner: support additional parameters
Dmitry Selyutin [Wed, 18 Oct 2023 17:06:17 +0000 (20:06 +0300)]
isa/test_runner: support additional parameters

13 months agoisa/caller: remove redundant check
Dmitry Selyutin [Wed, 18 Oct 2023 15:33:02 +0000 (18:33 +0300)]
isa/caller: remove redundant check

13 months agoisa/caller: provide sc and scv instructions wrapper
Dmitry Selyutin [Fri, 22 Sep 2023 19:08:10 +0000 (22:08 +0300)]
isa/caller: provide sc and scv instructions wrapper

13 months agoadd extra comments to sc-rfid test
Luke Kenneth Casson Leighton [Sat, 21 Oct 2023 18:10:23 +0000 (18:10 +0000)]
add extra comments to sc-rfid test

13 months agoadd a test which does both sc and rfid, and does rudimentary
Luke Kenneth Casson Leighton [Fri, 20 Oct 2023 21:09:22 +0000 (22:09 +0100)]
add a test which does both sc and rfid, and does rudimentary
checking that they are executed in expected order by setting some GPRs.
a whole bunch of NOPs were added to get the assembler to start at 0xc00
with a jump right at the start. terrible hack but does the job.

13 months agoAdded assert to check inner/outer results match
Andrey Miroshnikov [Thu, 19 Oct 2023 10:05:05 +0000 (10:05 +0000)]
Added assert to check inner/outer results match

13 months agoReplace flatten func with builtin reduce()
Andrey Miroshnikov [Thu, 19 Oct 2023 09:25:17 +0000 (09:25 +0000)]
Replace flatten func with builtin reduce()

13 months agoReadded the flatten func (removed accidentally)
Andrey Miroshnikov [Thu, 19 Oct 2023 06:49:14 +0000 (06:49 +0000)]
Readded the flatten func (removed accidentally)

13 months agoadd expected results to "sc" instruction in TrapTestCase.
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 21:05:52 +0000 (22:05 +0100)]
add expected results to "sc" instruction in TrapTestCase.
this demonstrates how "sc" is meant to work in standard (system) mode.
this *may* be exactly what TestIssuer does, it will have to be checked

13 months agoadd SRR0 and SRR1 to list of special_regs in parser
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 21:04:33 +0000 (22:04 +0100)]
add SRR0 and SRR1 to list of special_regs in parser
which are not treated as "create on assign".

13 months agoannoying - call the TRAP() function in system.mdwn "sc" instruction.
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 21:03:38 +0000 (22:03 +0100)]
annoying - call the TRAP() function in system.mdwn "sc" instruction.
setting NIA and MSR is tricky, it involves reading some english text
that is very unclear (Book III section 4.3.1 which then in turn says
"go to section 7.5 page 1076").
given that we are not implementing hypervisor or LEV=1/2/3 it is just
simpler to call TRAP(0xc00)

13 months agofix bug introduced by having to revert unauthorized addition of
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 20:30:43 +0000 (21:30 +0100)]
fix bug introduced by having to revert unauthorized addition of
copy_assign_rhs

13 months agoRevert "fix bug where pseudo-code assignments modify more than just the variable...
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 20:24:04 +0000 (21:24 +0100)]
Revert "fix bug where pseudo-code assignments modify more than just the variable being assigned to"

This reverts commit 4e701a851536bba6648779c183293ba75e7ea7b8.

adding copy_assign_rhs was added without authorization or discussion and
is damaging the simulator

13 months agoadd sc test to TestTrapCases
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 20:21:48 +0000 (21:21 +0100)]
add sc test to TestTrapCases

13 months agoadd test_caller_trap.py which stunningly actually works reasonably well
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 19:56:40 +0000 (20:56 +0100)]
add test_caller_trap.py which stunningly actually works reasonably well
(TrapTestCase has only previously been run on TestIssuer)

13 months agopower_enums: mention sc and scv instructions
Dmitry Selyutin [Fri, 22 Sep 2023 19:07:40 +0000 (22:07 +0300)]
power_enums: mention sc and scv instructions

13 months agoadd "is_idle" capability to inorder.py so that after adding
Luke Kenneth Casson Leighton [Wed, 18 Oct 2023 14:52:30 +0000 (15:52 +0100)]
add "is_idle" capability to inorder.py so that after adding
instructions the pipeline continues to propagate

13 months agosettting pushed_to_decode true
Shriya Sharma [Wed, 18 Oct 2023 14:47:51 +0000 (15:47 +0100)]
settting pushed_to_decode true

13 months agoAdded an extra unit test test_trace1
Shriya Sharma [Wed, 18 Oct 2023 14:32:36 +0000 (15:32 +0100)]
Added an extra unit test test_trace1

13 months agoAdded pure python mat multiply (outer and inner product versions). Made result printi...
Andrey Miroshnikov [Tue, 17 Oct 2023 13:06:31 +0000 (13:06 +0000)]
Added pure python mat multiply (outer and inner product versions). Made result printing parametrisable.

13 months agodoh, use reduce on operator.add already
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:49:11 +0000 (12:49 +0100)]
doh, use reduce on operator.add already

13 months agoprint expected flattened matrix results
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:47:39 +0000 (12:47 +0100)]
print expected flattened matrix results

13 months agoAdd assert
Andrey Miroshnikov [Wed, 11 Oct 2023 11:46:39 +0000 (11:46 +0000)]
Add assert

13 months agoremove cruft, make comments clearer
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:43:48 +0000 (12:43 +0100)]
remove cruft, make comments clearer

13 months agoUse flatten
Andrey Miroshnikov [Wed, 11 Oct 2023 11:43:26 +0000 (11:43 +0000)]
Use flatten

13 months agoAdd flatten function, print expected
Andrey Miroshnikov [Wed, 11 Oct 2023 11:41:16 +0000 (11:41 +0000)]
Add flatten function, print expected

13 months agorename expected to results (actual results)
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:23:02 +0000 (12:23 +0100)]
rename expected to results (actual results)

13 months agostore integer results in expected array
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:20:58 +0000 (12:20 +0100)]
store integer results in expected array

13 months agosimplify matmult test code
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:19:32 +0000 (12:19 +0100)]
simplify matmult test code

13 months agowhitespace
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:18:09 +0000 (12:18 +0100)]
whitespace

13 months agowhitespace
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:17:29 +0000 (12:17 +0100)]
whitespace

13 months agoAdd pure python matrix mul function
Andrey Miroshnikov [Wed, 11 Oct 2023 11:16:34 +0000 (11:16 +0000)]
Add pure python matrix mul function

13 months agoclarify prints and no conversion of integer input in maddld matrix test
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:11:57 +0000 (12:11 +0100)]
clarify prints and no conversion of integer input in maddld matrix test

13 months agoadd stub (non-working) matrix multiply using maddld
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 11:05:59 +0000 (12:05 +0100)]
add stub (non-working) matrix multiply using maddld

13 months agoadd basic isacaller inlining to poly1305-donna.py
Sadoon Albader [Wed, 11 Oct 2023 19:49:50 +0000 (22:49 +0300)]
add basic isacaller inlining to poly1305-donna.py

13 months agoaccidentally commented-out matrix tests
Luke Kenneth Casson Leighton [Wed, 11 Oct 2023 10:57:58 +0000 (11:57 +0100)]
accidentally commented-out matrix tests

13 months agowhitespace
Luke Kenneth Casson Leighton [Sun, 8 Oct 2023 13:57:48 +0000 (14:57 +0100)]
whitespace

13 months agoadd error message showing which instructions have been barfed
Luke Kenneth Casson Leighton [Tue, 3 Oct 2023 14:37:37 +0000 (15:37 +0100)]
add error message showing which instructions have been barfed

13 months agofixed another serious bug, C should output to CSV
Sadoon Albader [Tue, 3 Oct 2023 18:29:38 +0000 (21:29 +0300)]
fixed another serious bug, C should output to CSV

13 months agoadd rudementary test script
Sadoon Albader [Tue, 3 Oct 2023 18:22:49 +0000 (21:22 +0300)]
add rudementary test script

13 months agoadd python poly1305 test that uses random data input
Sadoon Albader [Tue, 3 Oct 2023 18:19:52 +0000 (21:19 +0300)]
add python poly1305 test that uses random data input

13 months agofix huge bug with C poly1305 function call
Sadoon Albader [Tue, 3 Oct 2023 18:18:42 +0000 (21:18 +0300)]
fix huge bug with C poly1305 function call

13 months agoadded poly1305 random message tester
Sadoon Albader [Tue, 3 Oct 2023 16:33:17 +0000 (19:33 +0300)]
added poly1305 random message tester

13 months agooptional read of "Description" in pagereader.py
Luke Kenneth Casson Leighton [Tue, 3 Oct 2023 14:34:35 +0000 (15:34 +0100)]
optional read of "Description" in pagereader.py

13 months agomove repeated code block to mini function for reading indented lines
Luke Kenneth Casson Leighton [Tue, 3 Oct 2023 14:29:55 +0000 (15:29 +0100)]
move repeated code block to mini function for reading indented lines

13 months agowhoops should be 5x3 comment not 5x3
Luke Kenneth Casson Leighton [Sun, 1 Oct 2023 15:05:30 +0000 (16:05 +0100)]
whoops should be 5x3 comment not 5x3

13 months agomanually revert damaged caused by jacob to pseudocode parser
Luke Kenneth Casson Leighton [Sun, 1 Oct 2023 10:12:55 +0000 (11:12 +0100)]
manually revert damaged caused by jacob to pseudocode parser
the purpose of the parser database is to preserve precisely and exactly
the data that is read in, such that it is possible to re-write it
precisely and exactly

jacob had destroyed that extremely important requirement by making
unauthorized modifications to this fundamental low-level code.

jacobs task is now to review the reversions and re-implement the
otherwise extremely valuable enhancements, but this time in a
way that listens to the project leader and administrators

13 months agoRevert "demo moving pseudocode to separate file"
Luke Kenneth Casson Leighton [Sun, 1 Oct 2023 09:45:43 +0000 (10:45 +0100)]
Revert "demo moving pseudocode to separate file"

This reverts commit b5d9084971dd761683a3a164af24c673a608aa23.

13 months agoRevert "add support for pseudocode being a [[!inline]] directive"
Luke Kenneth Casson Leighton [Sun, 1 Oct 2023 09:40:43 +0000 (10:40 +0100)]
Revert "add support for pseudocode being a [[!inline]] directive"

This reverts commit 43152e91f4530ddaef5cef2614b41e022c57fced.

13 months agoRevert "ignore indented comments too"
Luke Kenneth Casson Leighton [Sun, 1 Oct 2023 09:40:34 +0000 (10:40 +0100)]
Revert "ignore indented comments too"

This reverts commit 60f9f523f78cae9e357b61e6bc55ca1b323dfa14.

13 months agoskip blank lines in pagereader.py pprint_ops()
Luke Kenneth Casson Leighton [Sat, 30 Sep 2023 13:30:02 +0000 (14:30 +0100)]
skip blank lines in pagereader.py pprint_ops()

13 months agocode-comments
Luke Kenneth Casson Leighton [Fri, 29 Sep 2023 18:31:38 +0000 (19:31 +0100)]
code-comments

13 months agomoving the temp array (t) along, so that adding to y is the same size
Luke Kenneth Casson Leighton [Fri, 29 Sep 2023 18:23:59 +0000 (19:23 +0100)]
moving the temp array (t) along, so that adding to y is the same size
in bigmul python-based code. idea is to make everything line up
and be as uniform as possible, reduce number of instructions to bare min.
,

13 months agofirst attempt to create an Indexed Schedule, for bigmul powmod,
Luke Kenneth Casson Leighton [Fri, 29 Sep 2023 17:46:51 +0000 (18:46 +0100)]
first attempt to create an Indexed Schedule, for bigmul powmod,
but it is not perfect. needs thought

13 months agofix divmod
Jacob Lifshay [Thu, 28 Sep 2023 02:51:35 +0000 (19:51 -0700)]
fix divmod

13 months agoin divmod algorithm log regexes that match against expected register values
Jacob Lifshay [Thu, 28 Sep 2023 02:50:47 +0000 (19:50 -0700)]
in divmod algorithm log regexes that match against expected register values

13 months agotest python_divmod_algorithm
Jacob Lifshay [Thu, 28 Sep 2023 02:48:50 +0000 (19:48 -0700)]
test python_divmod_algorithm

13 months agoformat code
Jacob Lifshay [Thu, 28 Sep 2023 02:45:34 +0000 (19:45 -0700)]
format code

13 months agolog asmop to LogKind.InstrInOuts too since only printing `.long 0xFOOBAR` isn't very...
Jacob Lifshay [Thu, 28 Sep 2023 02:25:57 +0000 (19:25 -0700)]
log asmop to LogKind.InstrInOuts too since only printing `.long 0xFOOBAR` isn't very useful

13 months agoremove use of addc, use adde instead setting ca to zero.
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 19:13:16 +0000 (20:13 +0100)]
remove use of addc, use adde instead setting ca to zero.
eliminates one more unnecessary instruction.

13 months agoreduce 4-repeats of identical code down to 1 copy with indices in powmod.py
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 18:44:43 +0000 (19:44 +0100)]
reduce 4-repeats of identical code down to 1 copy with indices in powmod.py

13 months agoadd seeming-redundant addc/adde (actually part of big-mul-*add*)
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 18:13:47 +0000 (19:13 +0100)]
add seeming-redundant addc/adde (actually part of big-mul-*add*)
which completes the pattern for REMAP transformation

13 months agoconvert basic_pypowersim to hex rather than broken octal (?)
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 15:19:32 +0000 (16:19 +0100)]
convert basic_pypowersim to hex rather than broken octal (?)

13 months agocode-cleanup, bit of comments, copyright, blah blah, link to bugreport
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 10:25:43 +0000 (11:25 +0100)]
code-cleanup, bit of comments, copyright, blah blah, link to bugreport
all preparation before doing code-morph on simple-demo to work out how
to demonstrate REMAP Indexed (then BigMul) viability

13 months agoadd what is currently a duplicate of python_mul_algorithm, plan is to
Luke Kenneth Casson Leighton [Wed, 27 Sep 2023 10:18:53 +0000 (11:18 +0100)]
add what is currently a duplicate of python_mul_algorithm, plan is to
morph python_mul_algorithm2 to be "REMAP"-friendly

13 months agoworking on adding divmod 512x256 to 256x256
Jacob Lifshay [Wed, 27 Sep 2023 04:41:58 +0000 (21:41 -0700)]
working on adding divmod 512x256 to 256x256

13 months agolog writing CA[32]/OV[32] for OP_ADD
Jacob Lifshay [Wed, 27 Sep 2023 04:39:31 +0000 (21:39 -0700)]
log writing CA[32]/OV[32] for OP_ADD

13 months agoadd unit test for mcrxrx
Jacob Lifshay [Wed, 27 Sep 2023 03:34:39 +0000 (20:34 -0700)]
add unit test for mcrxrx

13 months agofix mcrxrx
Jacob Lifshay [Wed, 27 Sep 2023 03:34:25 +0000 (20:34 -0700)]
fix mcrxrx

13 months agofix concat when the first argument is a FieldSelectableInt
Jacob Lifshay [Wed, 27 Sep 2023 03:28:16 +0000 (20:28 -0700)]
fix concat when the first argument is a FieldSelectableInt

13 months agofix wrong register in docs
Jacob Lifshay [Wed, 27 Sep 2023 01:56:03 +0000 (18:56 -0700)]
fix wrong register in docs

13 months ago256x256-bit mul no longer broken since bug #1161 was fixed
Jacob Lifshay [Wed, 27 Sep 2023 00:23:59 +0000 (17:23 -0700)]
256x256-bit mul no longer broken since bug #1161 was fixed

13 months agoadd MemMMap tests
Jacob Lifshay [Mon, 25 Sep 2023 22:57:23 +0000 (15:57 -0700)]
add MemMMap tests

13 months agoskip zero words when iterating words in MemMMap
Jacob Lifshay [Mon, 25 Sep 2023 22:29:25 +0000 (15:29 -0700)]
skip zero words when iterating words in MemMMap

13 months agoformat src/openpower/decoder/isa/test_mem.py
Jacob Lifshay [Mon, 25 Sep 2023 21:41:49 +0000 (14:41 -0700)]
format src/openpower/decoder/isa/test_mem.py

13 months agoadd basis of Context Manager for capturing which inputs and outputsa
Luke Kenneth Casson Leighton [Mon, 25 Sep 2023 13:59:33 +0000 (14:59 +0100)]
add basis of Context Manager for capturing which inputs and outputsa
are involved in a carry-roll-over math primitive.
also very useful to generate (automated) unit tests

13 months agominor alteration of reporting hash in mini-test of poly1305-donna.py
Luke Kenneth Casson Leighton [Sun, 24 Sep 2023 18:07:15 +0000 (19:07 +0100)]
minor alteration of reporting hash in mini-test of poly1305-donna.py

13 months agodetect if add arg2 is greater than 7 and ignore it for poly1305 tracking.
Luke Kenneth Casson Leighton [Sun, 24 Sep 2023 18:06:28 +0000 (19:06 +0100)]
detect if add arg2 is greater than 7 and ignore it for poly1305 tracking.
this allows narrowing down of some data for test purposes

13 months agoadd an intercept (on all poly1305-donna.py math primitives)
Luke Kenneth Casson Leighton [Sun, 24 Sep 2023 10:53:26 +0000 (11:53 +0100)]
add an intercept (on all poly1305-donna.py math primitives)
but only do a report on ADD and ADDLO, for now

13 months agoadd link to poly1305-design (really good)
Luke Kenneth Casson Leighton [Sun, 24 Sep 2023 10:04:42 +0000 (11:04 +0100)]
add link to poly1305-design (really good)

13 months agoallow intercept on dsrd (rename DSRD) in poly13005-donna.py
Luke Kenneth Casson Leighton [Sun, 24 Sep 2023 10:00:11 +0000 (11:00 +0100)]
allow intercept on dsrd (rename DSRD) in poly13005-donna.py

13 months agoprovide intercepts of 64/128-bit math primitives that still look
Luke Kenneth Casson Leighton [Sat, 23 Sep 2023 15:00:05 +0000 (16:00 +0100)]
provide intercepts of 64/128-bit math primitives that still look
like poly1305-donna-64bit.h

13 months agoconvert all use of "+" to ADD(a,b) in order to prepare to intercept
Luke Kenneth Casson Leighton [Sat, 23 Sep 2023 13:41:02 +0000 (14:41 +0100)]
convert all use of "+" to ADD(a,b) in order to prepare to intercept
it and make a note of any "carry-roll-over" in poly1305-donna.py

14 months agoswitch UTF-8 validation tests to use MemMMap so it gets some testing
Jacob Lifshay [Sat, 23 Sep 2023 01:25:21 +0000 (18:25 -0700)]
switch UTF-8 validation tests to use MemMMap so it gets some testing

14 months agoadd MemMMap class
Jacob Lifshay [Sat, 23 Sep 2023 01:23:22 +0000 (18:23 -0700)]
add MemMMap class

https://bugs.libre-soc.org/show_bug.cgi?id=1173

14 months agosplit out most Mem methods into MemCommon base class
Jacob Lifshay [Fri, 22 Sep 2023 22:40:30 +0000 (15:40 -0700)]
split out most Mem methods into MemCommon base class

14 months agoformat mem.py
Jacob Lifshay [Fri, 22 Sep 2023 22:10:14 +0000 (15:10 -0700)]
format mem.py

14 months agosyscalls: fix syscall arguments
Dmitry Selyutin [Fri, 22 Sep 2023 18:31:16 +0000 (21:31 +0300)]
syscalls: fix syscall arguments

14 months agosyscalls: introduce syscall arguments length
Dmitry Selyutin [Fri, 22 Sep 2023 18:30:22 +0000 (21:30 +0300)]
syscalls: introduce syscall arguments length