openpower-isa.git
12 months agopysvp64dis: switch to common disassembly routine insndb-asm-dis
Dmitry Selyutin [Fri, 12 May 2023 12:23:39 +0000 (12:23 +0000)]
pysvp64dis: switch to common disassembly routine

12 months agopysvp64asm: switch to common assembly routine
Dmitry Selyutin [Fri, 12 May 2023 12:09:46 +0000 (12:09 +0000)]
pysvp64asm: switch to common assembly routine

12 months agopower_insn: decouple disassemble routine
Dmitry Selyutin [Fri, 12 May 2023 11:47:58 +0000 (14:47 +0300)]
power_insn: decouple disassemble routine

12 months agopysvp64dis: migrate to new byteorder class
Dmitry Selyutin [Wed, 10 May 2023 18:01:42 +0000 (18:01 +0000)]
pysvp64dis: migrate to new byteorder class

12 months agopower_insn: migrate to new byteorder class
Dmitry Selyutin [Wed, 10 May 2023 17:52:32 +0000 (17:52 +0000)]
power_insn: migrate to new byteorder class

12 months agopower_insn: introduce byteorder class
Dmitry Selyutin [Wed, 10 May 2023 17:49:34 +0000 (17:49 +0000)]
power_insn: introduce byteorder class

12 months agopower_insn: decouple assemble routine
Dmitry Selyutin [Wed, 10 May 2023 17:47:14 +0000 (17:47 +0000)]
power_insn: decouple assemble routine

12 months agoadd rest of bfp_* helpers needed to run fcvt js test
Jacob Lifshay [Sat, 13 May 2023 01:06:47 +0000 (18:06 -0700)]
add rest of bfp_* helpers needed to run fcvt js test

12 months agofix `even` polarity in bfp_ROUND_TO_INTEGER
Jacob Lifshay [Sat, 13 May 2023 01:05:24 +0000 (18:05 -0700)]
fix `even` polarity in bfp_ROUND_TO_INTEGER

12 months agoignore FPSCR in fcvt js test
Jacob Lifshay [Sat, 13 May 2023 01:04:39 +0000 (18:04 -0700)]
ignore FPSCR in fcvt js test

12 months agoallow ignoring FPSCR in tests
Jacob Lifshay [Sat, 13 May 2023 01:03:58 +0000 (18:03 -0700)]
allow ignoring FPSCR in tests

12 months agopow should not become self.pow
Jacob Lifshay [Sat, 13 May 2023 01:02:56 +0000 (18:02 -0700)]
pow should not become self.pow

12 months agofix bugs in fcvt* pseudocode
Jacob Lifshay [Sat, 13 May 2023 00:59:40 +0000 (17:59 -0700)]
fix bugs in fcvt* pseudocode

12 months agocheck expected CR fields in Data-Dependent Fail-First
Luke Kenneth Casson Leighton [Fri, 12 May 2023 20:01:52 +0000 (21:01 +0100)]
check expected CR fields in Data-Dependent Fail-First

12 months agoadd some bfp_* functions -- this isn't yet enough to run fcvt*
Jacob Lifshay [Fri, 12 May 2023 06:48:06 +0000 (23:48 -0700)]
add some bfp_* functions -- this isn't yet enough to run fcvt*

12 months agomake truediv available to pseudocode
Jacob Lifshay [Fri, 12 May 2023 06:44:51 +0000 (23:44 -0700)]
make truediv available to pseudocode

technically `/` in pseudocode is supposed to be real number division,
with `รท` being division with result truncated to integer, however
luke decided to just use `/` for integer division in pseudocode,
so we need a way to work around that.

12 months agoadd bfp classification predicates
Jacob Lifshay [Fri, 12 May 2023 06:43:41 +0000 (23:43 -0700)]
add bfp classification predicates

12 months agoallow assigning BFPState and SelectableMSB0Fraction values in pseudo-code
Jacob Lifshay [Fri, 12 May 2023 06:38:09 +0000 (23:38 -0700)]
allow assigning BFPState and SelectableMSB0Fraction values in pseudo-code

12 months agoadd support for *_flag global variables needed by bfp_* functions
Jacob Lifshay [Fri, 12 May 2023 06:35:41 +0000 (23:35 -0700)]
add support for *_flag global variables needed by bfp_* functions

12 months agomake lexer replace class with class_ since it's a python keyword
Jacob Lifshay [Fri, 12 May 2023 06:32:16 +0000 (23:32 -0700)]
make lexer replace class with class_ since it's a python keyword

12 months agofix SelectableMSB0Fraction's constructor
Jacob Lifshay [Fri, 12 May 2023 06:31:02 +0000 (23:31 -0700)]
fix SelectableMSB0Fraction's constructor

12 months agoundefined is a function that needs to be called
Jacob Lifshay [Fri, 12 May 2023 06:30:12 +0000 (23:30 -0700)]
undefined is a function that needs to be called

12 months agofix broken FPSCR fields
Jacob Lifshay [Fri, 12 May 2023 05:49:34 +0000 (22:49 -0700)]
fix broken FPSCR fields

12 months agoRevert "add stub reset_xflags function"
Jacob Lifshay [Fri, 12 May 2023 01:53:59 +0000 (18:53 -0700)]
Revert "add stub reset_xflags function"

the function actually should be in pseudocode

This reverts commit c44cd164b385a18fb635e7087c2a253c30d9c81c.

12 months agocorrections to dd-ffirst tests when VLi=0, the write to regfile
Luke Kenneth Casson Leighton [Thu, 11 May 2023 20:02:37 +0000 (21:02 +0100)]
corrections to dd-ffirst tests when VLi=0, the write to regfile
is *not* carried out on the failed test. but Rc=1 does (TODO)

12 months agoSelectableMSB0Fraction is now basically complete and correct afaict
Jacob Lifshay [Thu, 11 May 2023 08:05:04 +0000 (01:05 -0700)]
SelectableMSB0Fraction is now basically complete and correct afaict

12 months agoadd very very very basic write-out of instruction log
Luke Kenneth Casson Leighton [Wed, 10 May 2023 22:10:16 +0000 (23:10 +0100)]
add very very very basic write-out of instruction log

12 months agoMerge branch 'support-fields'
Jacob Lifshay [Wed, 10 May 2023 19:54:28 +0000 (12:54 -0700)]
Merge branch 'support-fields'

https://bugs.libre-soc.org/show_bug.cgi?id=1072#c17

12 months agoadd ld/st data-dependent fail-first /vli (inclusive)
Luke Kenneth Casson Leighton [Wed, 10 May 2023 18:30:51 +0000 (19:30 +0100)]
add ld/st data-dependent fail-first /vli (inclusive)

12 months agofix data-dependent fail-first on load
Luke Kenneth Casson Leighton [Wed, 10 May 2023 18:28:27 +0000 (19:28 +0100)]
fix data-dependent fail-first on load

12 months agopower_insn: remove redundant logs
Dmitry Selyutin [Wed, 10 May 2023 17:17:58 +0000 (17:17 +0000)]
power_insn: remove redundant logs

12 months agocyclemodel/inorder: hide set inheritance
Dmitry Selyutin [Wed, 10 May 2023 11:54:23 +0000 (04:54 -0700)]
cyclemodel/inorder: hide set inheritance

12 months agocyclemodel/inorder: fix coding style
Dmitry Selyutin [Wed, 10 May 2023 11:52:49 +0000 (04:52 -0700)]
cyclemodel/inorder: fix coding style

12 months agoextend previous hard-coded magic constant (256) used to indicate
Luke Kenneth Casson Leighton [Wed, 10 May 2023 11:33:26 +0000 (12:33 +0100)]
extend previous hard-coded magic constant (256) used to indicate
"effectively unlimited" (see check_extsign) out to 1024. it would be
better to set this at the bare-minimum limit (257, 258) as it requests
that python runtime create massive-large ints

12 months agoadd WIP fp_working_format.py
Jacob Lifshay [Wed, 10 May 2023 08:21:00 +0000 (01:21 -0700)]
add WIP fp_working_format.py

12 months agochange FPSCR to a required parameter of ISACallerHelper support-fields
Jacob Lifshay [Wed, 10 May 2023 05:17:49 +0000 (22:17 -0700)]
change FPSCR to a required parameter of ISACallerHelper

12 months agoRevert "remove now-unnecessary SO global, since XER[SO] syntax now translates to...
Jacob Lifshay [Wed, 10 May 2023 04:58:02 +0000 (21:58 -0700)]
Revert "remove now-unnecessary SO global, since XER[SO] syntax now translates to XER.SO"

luke wants the SO global to stay even though it's unnecessary

This reverts commit a50eb1eb70ee305ba3091455cf1473abd4a74fb2.

12 months agoswitch to using self.FPSCR
Jacob Lifshay [Wed, 10 May 2023 02:30:03 +0000 (19:30 -0700)]
switch to using self.FPSCR

12 months agoswitch to using FPSCRState for double2single.mdwn
Jacob Lifshay [Wed, 10 May 2023 02:27:41 +0000 (19:27 -0700)]
switch to using FPSCRState for double2single.mdwn

12 months agoadd self.FPSCR
Jacob Lifshay [Wed, 10 May 2023 02:16:37 +0000 (19:16 -0700)]
add self.FPSCR

12 months agoremove now-unnecessary SO global, since XER[SO] syntax now translates to XER.SO
Jacob Lifshay [Wed, 10 May 2023 02:12:01 +0000 (19:12 -0700)]
remove now-unnecessary SO global, since XER[SO] syntax now translates to XER.SO

12 months agosupport FPSCR[RN] syntax that translates to FPSCR.RN
Jacob Lifshay [Wed, 10 May 2023 01:54:26 +0000 (18:54 -0700)]
support FPSCR[RN] syntax that translates to FPSCR.RN

12 months agoadd support for accessing XER using XER.SO syntax -- intended for new pseudocode
Jacob Lifshay [Wed, 10 May 2023 01:48:47 +0000 (18:48 -0700)]
add support for accessing XER using XER.SO syntax -- intended for new pseudocode

12 months agoseparate ISAPages out from inherited ISA Class
Luke Kenneth Casson Leighton [Tue, 9 May 2023 17:26:49 +0000 (18:26 +0100)]
separate ISAPages out from inherited ISA Class

12 months agoSetFX is not a normal function -- it can assign to its input
Jacob Lifshay [Tue, 9 May 2023 07:27:19 +0000 (00:27 -0700)]
SetFX is not a normal function -- it can assign to its input

12 months agoswitch fpcvt over to using FPSCR attributes
Jacob Lifshay [Tue, 9 May 2023 07:25:23 +0000 (00:25 -0700)]
switch fpcvt over to using FPSCR attributes

12 months agoadd parser support for attributes like FPSCR.RN
Jacob Lifshay [Tue, 9 May 2023 07:22:57 +0000 (00:22 -0700)]
add parser support for attributes like FPSCR.RN

12 months agomove apply_trailer into parser class
Jacob Lifshay [Tue, 9 May 2023 07:13:08 +0000 (00:13 -0700)]
move apply_trailer into parser class

12 months agobypass ply's eating SyntaxErrors
Jacob Lifshay [Tue, 9 May 2023 07:10:27 +0000 (00:10 -0700)]
bypass ply's eating SyntaxErrors

12 months agoFPSCR.FPRF can be assigned strings
Jacob Lifshay [Tue, 9 May 2023 07:06:30 +0000 (00:06 -0700)]
FPSCR.FPRF can be assigned strings

12 months agoadd XERState since XER has fields too
Jacob Lifshay [Tue, 9 May 2023 07:05:30 +0000 (00:05 -0700)]
add XERState since XER has fields too

12 months agofix some broken FieldSelectableInt handling
Jacob Lifshay [Tue, 9 May 2023 06:10:29 +0000 (23:10 -0700)]
fix some broken FieldSelectableInt handling

12 months agocomment TODO on Load-Fault in strncpy example
Luke Kenneth Casson Leighton [Sun, 7 May 2023 09:44:36 +0000 (10:44 +0100)]
comment TODO on Load-Fault in strncpy example

12 months agoadd stub reset_xflags function
Luke Kenneth Casson Leighton [Sun, 7 May 2023 09:12:41 +0000 (10:12 +0100)]
add stub reset_xflags function

12 months agominor_19.csv: convert RA to RA0 for minmax
Dmitry Selyutin [Sun, 7 May 2023 08:13:46 +0000 (11:13 +0300)]
minor_19.csv: convert RA to RA0 for minmax

12 months agoadd FPSCR to Test API (ExpectedState, SimState). untested
Luke Kenneth Casson Leighton [Sat, 6 May 2023 13:31:13 +0000 (14:31 +0100)]
add FPSCR to Test API (ExpectedState, SimState). untested

12 months agoadd FPSCR to ISACaller
Luke Kenneth Casson Leighton [Sat, 6 May 2023 13:26:39 +0000 (14:26 +0100)]
add FPSCR to ISACaller

12 months agonotes: make FPSCR definition more like MSR (see openpower/consts.py)
Luke Kenneth Casson Leighton [Sat, 6 May 2023 13:22:44 +0000 (14:22 +0100)]
notes: make FPSCR definition more like MSR (see openpower/consts.py)

12 months agodrastically simplify fpscr.py. extreme overcomplexity introducing
Luke Kenneth Casson Leighton [Sat, 6 May 2023 13:21:04 +0000 (14:21 +0100)]
drastically simplify fpscr.py. extreme overcomplexity introducing
an entirely new paradigm - without discussion - creates a maintenance
headache we cannot afford

12 months agoadd comment about why the new check has been added
Luke Kenneth Casson Leighton [Sat, 6 May 2023 09:07:28 +0000 (10:07 +0100)]
add comment about why the new check has been added

12 months agoget table down to under 80 chars per line
Luke Kenneth Casson Leighton [Sat, 6 May 2023 09:02:43 +0000 (10:02 +0100)]
get table down to under 80 chars per line

12 months agofix fpscr table parser error reporting
Jacob Lifshay [Sat, 6 May 2023 03:38:22 +0000 (20:38 -0700)]
fix fpscr table parser error reporting

12 months agoadd FPSCRState and FPSCRRecord and a FPSCR smoke-test
Jacob Lifshay [Sat, 6 May 2023 03:34:18 +0000 (20:34 -0700)]
add FPSCRState and FPSCRRecord and a FPSCR smoke-test

12 months agoadd initial fmv/fcvt tests, though they're broken due to FPSCR being unimplemented
Jacob Lifshay [Fri, 5 May 2023 02:19:29 +0000 (19:19 -0700)]
add initial fmv/fcvt tests, though they're broken due to FPSCR being unimplemented

12 months agoadd check that generated .py files are in .gitignore
Jacob Lifshay [Fri, 5 May 2023 00:55:15 +0000 (17:55 -0700)]
add check that generated .py files are in .gitignore

12 months agoverify fields.txt forms' field separators ('|') line up with headers'
Jacob Lifshay [Fri, 5 May 2023 00:34:27 +0000 (17:34 -0700)]
verify fields.txt forms' field separators ('|') line up with headers'

12 months agomerge maddrs/msubrs, unit tests changed accordingly
Konstantinos Margaritis [Thu, 4 May 2023 15:38:33 +0000 (15:38 +0000)]
merge maddrs/msubrs, unit tests changed accordingly

12 months agoAdd 2 more instructions to help with 2-coeff butterfly
Konstantinos Margaritis [Thu, 4 May 2023 14:11:31 +0000 (14:11 +0000)]
Add 2 more instructions to help with 2-coeff butterfly
fdct_round_shift(a*c1 +/- b*c2)
They are to be used complementary to maddsubrs, so one can now
do this calculation in 3 instructions.
Added some unit tests to demonstrate the operation.

12 months agouse a simpler way to do the same thing
Konstantinos Margaritis [Mon, 1 May 2023 18:05:10 +0000 (18:05 +0000)]
use a simpler way to do the same thing

12 months agoHandle large 64-bit values, but only the low 64-bit half of the multiplication, add...
Konstantinos Margaritis [Sun, 30 Apr 2023 21:29:47 +0000 (21:29 +0000)]
Handle large 64-bit values, but only the low 64-bit half of the multiplication, add more tests

12 months agodo proper rounding, no rounding for SH=0 (for now), add tests
Konstantinos Margaritis [Sun, 30 Apr 2023 18:10:35 +0000 (18:10 +0000)]
do proper rounding, no rounding for SH=0 (for now), add tests

12 months agoResult needs rounding so add +1 to prod*
Konstantinos Margaritis [Sat, 29 Apr 2023 15:29:32 +0000 (15:29 +0000)]
Result needs rounding so add +1 to prod*

12 months agohandle negatives correctly by adding sign bit to final result
Konstantinos Margaritis [Fri, 28 Apr 2023 16:41:22 +0000 (16:41 +0000)]
handle negatives correctly by adding sign bit to final result

12 months agoalmost there, positive values work, negative values differ by 1
Konstantinos Margaritis [Fri, 28 Apr 2023 16:02:26 +0000 (16:02 +0000)]
almost there, positive values work, negative values differ by 1

12 months agouse proper register sizes
Konstantinos Margaritis [Fri, 28 Apr 2023 11:48:48 +0000 (11:48 +0000)]
use proper register sizes

12 months agoMULS instead of MUL, RA instead of RT in in1
Konstantinos Margaritis [Fri, 28 Apr 2023 11:41:02 +0000 (11:41 +0000)]
MULS instead of MUL, RA instead of RT in in1

12 months agoTurns out DCTI-Form is another variant of A-Form
Konstantinos Margaritis [Fri, 28 Apr 2023 11:26:11 +0000 (11:26 +0000)]
Turns out DCTI-Form is another variant of A-Form

12 months agominor fixes in pseudocode, CONST_UI->CONST_SH in minor_22.csv
Konstantinos Margaritis [Fri, 28 Apr 2023 11:10:24 +0000 (11:10 +0000)]
minor fixes in pseudocode, CONST_UI->CONST_SH in minor_22.csv

12 months agoWIP: maddsubrs initial approach
Konstantinos Margaritis [Fri, 28 Apr 2023 09:46:45 +0000 (09:46 +0000)]
WIP: maddsubrs initial approach

12 months agomaddsubrs no longer has CR0
Luke Kenneth Casson Leighton [Thu, 4 May 2023 14:16:06 +0000 (15:16 +0100)]
maddsubrs no longer has CR0

12 months agofix forgotten stuff from last commit
Jacob Lifshay [Thu, 4 May 2023 04:41:31 +0000 (21:41 -0700)]
fix forgotten stuff from last commit

12 months agoadd fcvt/fmv -- no tests yet
Jacob Lifshay [Thu, 4 May 2023 04:27:06 +0000 (21:27 -0700)]
add fcvt/fmv -- no tests yet

12 months agosupport calling functions with no args in pseudocode
Jacob Lifshay [Thu, 4 May 2023 04:25:42 +0000 (21:25 -0700)]
support calling functions with no args in pseudocode

12 months agoshow actual mdwn source location in backtrace when parser raises SyntaxError
Jacob Lifshay [Thu, 4 May 2023 04:15:45 +0000 (21:15 -0700)]
show actual mdwn source location in backtrace when parser raises SyntaxError

12 months agomove Assign to parser class in prep for improving syntax error reporting
Jacob Lifshay [Thu, 4 May 2023 04:08:49 +0000 (21:08 -0700)]
move Assign to parser class in prep for improving syntax error reporting

12 months agoadd all fmv*/fcvt* fields
Jacob Lifshay [Thu, 4 May 2023 01:55:29 +0000 (18:55 -0700)]
add all fmv*/fcvt* fields

12 months agosplit XO-Form's RA field in prep for adding fcvttg[o][s]
Jacob Lifshay [Thu, 4 May 2023 01:48:46 +0000 (18:48 -0700)]
split XO-Form's RA field in prep for adding fcvttg[o][s]

also reformat cuz we can

12 months agoremove testing with INSNDB=true since that now does nothing different
Jacob Lifshay [Thu, 4 May 2023 01:13:13 +0000 (18:13 -0700)]
remove testing with INSNDB=true since that now does nothing different

12 months agocomment fmin*/fmax* since they're being replaced with fminmax and to make space for...
Jacob Lifshay [Thu, 4 May 2023 01:08:46 +0000 (18:08 -0700)]
comment fmin*/fmax* since they're being replaced with fminmax and to make space for fmv/fcvt

12 months agofix non-zero assembly operands being zero
Jacob Lifshay [Thu, 4 May 2023 01:04:36 +0000 (18:04 -0700)]
fix non-zero assembly operands being zero

12 months agoupdate SV csvs
Jacob Lifshay [Thu, 4 May 2023 00:13:24 +0000 (17:13 -0700)]
update SV csvs

13 months agoadd links between decode and issue
Luke Kenneth Casson Leighton [Tue, 2 May 2023 18:53:45 +0000 (19:53 +0100)]
add links between decode and issue

13 months agoreserve writes in Issue Phase, add comment
Luke Kenneth Casson Leighton [Tue, 2 May 2023 18:49:50 +0000 (19:49 +0100)]
reserve writes in Issue Phase, add comment

13 months agoadd Issue phase and writes/reads possible in CPU
Luke Kenneth Casson Leighton [Tue, 2 May 2023 18:20:42 +0000 (19:20 +0100)]
add Issue phase and writes/reads possible in CPU

13 months agoadd Decode and CPU classes
Luke Kenneth Casson Leighton [Tue, 2 May 2023 18:02:03 +0000 (19:02 +0100)]
add Decode and CPU classes

13 months agoadd quick preamble header
Luke Kenneth Casson Leighton [Tue, 2 May 2023 17:53:15 +0000 (18:53 +0100)]
add quick preamble header

13 months agoupdate comments and correct retiring, remove registers that have been written
Luke Kenneth Casson Leighton [Tue, 2 May 2023 17:52:14 +0000 (18:52 +0100)]
update comments and correct retiring, remove registers that have been written

13 months agostart on cycle-accurate model of inorder core
Luke Kenneth Casson Leighton [Tue, 2 May 2023 17:44:12 +0000 (18:44 +0100)]
start on cycle-accurate model of inorder core

13 months agoffnmadds converted to 3-operand
Luke Kenneth Casson Leighton [Sun, 30 Apr 2023 19:08:19 +0000 (20:08 +0100)]
ffnmadds converted to 3-operand

13 months agoconverted ffnmadds to 3-operand
Luke Kenneth Casson Leighton [Sun, 30 Apr 2023 19:07:04 +0000 (20:07 +0100)]
converted ffnmadds to 3-operand