soc.git
4 years agofix test_pipe_ilang.py
Jacob Lifshay [Tue, 28 Jul 2020 23:15:40 +0000 (16:15 -0700)]
fix test_pipe_ilang.py

4 years agosplit out ilang tests
Jacob Lifshay [Tue, 28 Jul 2020 23:02:20 +0000 (16:02 -0700)]
split out ilang tests

4 years agoadd more files to .gitignore
Jacob Lifshay [Tue, 28 Jul 2020 23:01:45 +0000 (16:01 -0700)]
add more files to .gitignore

4 years agoformat code
Jacob Lifshay [Tue, 28 Jul 2020 22:49:06 +0000 (15:49 -0700)]
format code

4 years agoadd preliminary investigative test of XICS ICS
Luke Kenneth Casson Leighton [Tue, 28 Jul 2020 12:28:22 +0000 (13:28 +0100)]
add preliminary investigative test of XICS ICS

4 years agotidyup/comments in trap proof
Luke Kenneth Casson Leighton [Tue, 28 Jul 2020 09:20:20 +0000 (10:20 +0100)]
tidyup/comments in trap proof

4 years agoadd 2nd part of XICS interrupt interface
Luke Kenneth Casson Leighton [Mon, 27 Jul 2020 21:36:55 +0000 (22:36 +0100)]
add 2nd part of XICS interrupt interface

4 years agofix trap proof, and trap main_stage, and pseudocode for rfid
Luke Kenneth Casson Leighton [Mon, 27 Jul 2020 11:44:44 +0000 (12:44 +0100)]
fix trap proof, and trap main_stage, and pseudocode for rfid
all a bit of a mess, really :)

4 years agoshorten expected_ to exp_, gets line-length down
Luke Kenneth Casson Leighton [Mon, 27 Jul 2020 10:48:11 +0000 (11:48 +0100)]
shorten expected_ to exp_, gets line-length down

4 years agoMTMSR(D) properties.
Samuel A. Falvo II [Sun, 26 Jul 2020 20:31:17 +0000 (13:31 -0700)]
MTMSR(D) properties.

As of this commit, the properties for MTMSRD fails because (IBM) bit 30
is not set correctly.  I've double checked my properties against that
specified in the V3.0B specs on page 978.  I've also double-checked the
code in ../main_stage.py.  As of this commit, I *cannot* find the
location of the discrepency.

4 years agostart on conversion of xics.vhdl to nmigen
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 20:27:53 +0000 (21:27 +0100)]
start on conversion of xics.vhdl to nmigen
see https://bugs.libre-soc.org/show_bug.cgi?id=407

4 years agoadd nop test cases
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 13:47:17 +0000 (14:47 +0100)]
add nop test cases

4 years agoadd test_nop general test case
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 13:16:15 +0000 (14:16 +0100)]
add test_nop general test case

4 years agoactivate some of new accumulator-based tests in test_issuer
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 13:13:31 +0000 (14:13 +0100)]
activate some of new accumulator-based tests in test_issuer

4 years agodo not need lod_l.q | lsto_l.q can just use lsd_l.q
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 13:11:01 +0000 (14:11 +0100)]
do not need lod_l.q | lsto_l.q can just use lsd_l.q

4 years agoargh add yet another latch to detect when LD/ST has completed
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 13:04:54 +0000 (14:04 +0100)]
argh add yet another latch to detect when LD/ST has completed

4 years agosigh, issue with detection/waiting for LD/ST CompUnit
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 12:34:49 +0000 (13:34 +0100)]
sigh, issue with detection/waiting for LD/ST CompUnit

4 years agoconvert LDST test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 11:13:36 +0000 (12:13 +0100)]
convert LDST test to accumulator style

4 years agoconvert Branch test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 11:09:13 +0000 (12:09 +0100)]
convert Branch test to accumulator style

4 years agoconvert SPR test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 11:07:28 +0000 (12:07 +0100)]
convert SPR test to accumulator style

4 years agoconvert TRAP test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 11:02:52 +0000 (12:02 +0100)]
convert TRAP test to accumulator style

4 years agoremove FHDLTestCase
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:59:52 +0000 (11:59 +0100)]
remove FHDLTestCase

4 years agoconvert CR test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:58:33 +0000 (11:58 +0100)]
convert CR test to accumulator style

4 years agoconvert mul test to accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:56:17 +0000 (11:56 +0100)]
convert mul test to accumulator style

4 years agoconvert shift_rot test to new base accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:17:38 +0000 (11:17 +0100)]
convert shift_rot test to new base accumulator style

4 years agoconvert logical test case to new base class accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:14:18 +0000 (11:14 +0100)]
convert logical test case to new base class accumulator style

4 years agomove run_test_program to base class and rename to "add_case"
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:11:25 +0000 (11:11 +0100)]
move run_test_program to base class and rename to "add_case"

4 years agoconvert ALU to new accumulator style
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:11:05 +0000 (11:11 +0100)]
convert ALU to new accumulator style

4 years agoagain, move large heavily-indented code-block in div test_pipe_caller
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:05:34 +0000 (11:05 +0100)]
again, move large heavily-indented code-block in div test_pipe_caller

4 years agorun subtest, indentation getting too large, move to function
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 10:02:28 +0000 (11:02 +0100)]
run subtest, indentation getting too large, move to function

4 years agoget div compunit test running (use new way to accumulate tests)
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 09:56:08 +0000 (10:56 +0100)]
get div compunit test running (use new way to accumulate tests)

4 years agouse new test accumulator class in div tests
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 09:32:08 +0000 (10:32 +0100)]
use new test accumulator class in div tests

4 years agoadd common test base class for "accumulating" tests to run
Luke Kenneth Casson Leighton [Sun, 26 Jul 2020 09:31:49 +0000 (10:31 +0100)]
add common test base class for "accumulating" tests to run

4 years agoupdate submodule
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 21:26:22 +0000 (22:26 +0100)]
update submodule

4 years agoremove old div overflow test, keep microwatt version
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 20:42:34 +0000 (21:42 +0100)]
remove old div overflow test, keep microwatt version

4 years agohilarious. only just caught a bug where overflow was being taken from Rc
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 20:41:15 +0000 (21:41 +0100)]
hilarious.  only just caught a bug where overflow was being taken from Rc

4 years agocomb += missing
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 15:57:18 +0000 (16:57 +0100)]
comb += missing

4 years agoadd CR0 regression, expected 0b10 actual 0b11
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 15:32:22 +0000 (16:32 +0100)]
add CR0 regression, expected 0b10 actual 0b11

4 years agoadd regression test 8, DivPipeCore producing spurious result
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 15:18:16 +0000 (16:18 +0100)]
add regression test 8, DivPipeCore producing spurious result

4 years agoadd pia back in
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 15:15:44 +0000 (16:15 +0100)]
add pia back in

4 years agore-add pia_result_to_output function (minus "typing" which should go in .pyi)
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 15:04:02 +0000 (16:04 +0100)]
re-add pia_result_to_output function (minus "typing" which should go in .pyi)

4 years agoadd div compunit test
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 14:34:16 +0000 (15:34 +0100)]
add div compunit test

4 years agowait until pipeline indicates that its output is valid in compunit test
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 14:33:38 +0000 (15:33 +0100)]
wait until pipeline indicates that its output is valid in compunit test
DIV and other long pipelines only set wrmask when a result is available
the previous test, "is wrmask zero if so exit" was therefore reading
invalid data.

it was a matter of coincidence that all other compunit tests were only
one stage long that the wrmask *happened* to be valid

4 years agomove reset of rdmaskn to after "busy"
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 14:20:36 +0000 (15:20 +0100)]
move reset of rdmaskn to after "busy"

4 years agocomment LDST FunctionUnit
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 14:10:34 +0000 (15:10 +0100)]
comment LDST FunctionUnit

4 years agogoing on a bit of a "naming" spree, this for Jean-Paul to be able to
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 11:54:49 +0000 (12:54 +0100)]
going on a bit of a "naming" spree, this for Jean-Paul to be able to
identify operand records on pipelines

4 years agoadd spec page numbers to logical ops
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 11:25:41 +0000 (12:25 +0100)]
add spec page numbers to logical ops

4 years agoadd page-number comments to ALU main_stage
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 11:19:31 +0000 (12:19 +0100)]
add page-number comments to ALU main_stage

4 years agoupdate comment-headers (TODO include page numbers to v3.0B spec)
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 11:14:31 +0000 (12:14 +0100)]
update comment-headers (TODO include page numbers to v3.0B spec)

4 years agomake trap proof section more readable
Luke Kenneth Casson Leighton [Sat, 25 Jul 2020 11:09:30 +0000 (12:09 +0100)]
make trap proof section more readable

4 years agoProperties for MFMSR
Samuel A. Falvo II [Fri, 24 Jul 2020 23:31:09 +0000 (16:31 -0700)]
Properties for MFMSR

4 years agoReorganize code layout
Samuel A. Falvo II [Fri, 24 Jul 2020 23:19:17 +0000 (16:19 -0700)]
Reorganize code layout

Make proof code match corresponding code in main_stage.  I am constantly
getting confused about what to work on next.  Purely a cosmetic change,
but has impact on cognitive load for me.

4 years agoWIP: SC properties more closely match doc'd behavior
Samuel A. Falvo II [Fri, 24 Jul 2020 22:28:04 +0000 (15:28 -0700)]
WIP: SC properties more closely match doc'd behavior

4 years agoUpdate libreriscv/HDL_workflow with instructions how to build and
Cole Poirier [Fri, 24 Jul 2020 20:42:56 +0000 (13:42 -0700)]
Update libreriscv/HDL_workflow with instructions how to build and
install power_instruction_analyzer (pia)

4 years agoWIP: addressing code review, restoring proofs, etc.
Samuel A. Falvo II [Fri, 24 Jul 2020 15:21:29 +0000 (08:21 -0700)]
WIP: addressing code review, restoring proofs, etc.

4 years agogot fed up with bit-slice ordering crap. cut it out
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 15:12:32 +0000 (16:12 +0100)]
got fed up with bit-slice ordering crap.  cut it out

4 years agoadd better comments on field_slice
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 15:10:54 +0000 (16:10 +0100)]
add better comments on field_slice

4 years agoreturned field_slice to original, and added comments
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 15:03:31 +0000 (16:03 +0100)]
returned field_slice to original, and added comments
see https://bugs.libre-soc.org/show_bug.cgi?id=325#c134

4 years agoannoying, yet more typos
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:51:38 +0000 (14:51 +0100)]
annoying, yet more typos

4 years agoannoying, typo
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:50:23 +0000 (14:50 +0100)]
annoying, typo

4 years agobetter debug assert log message
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:43:54 +0000 (14:43 +0100)]
better debug assert log message

4 years agotoo much debug info going past, so add the test registers to the
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:42:04 +0000 (14:42 +0100)]
too much debug info going past, so add the test registers to the
failed log message

4 years agomissed import
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:34:06 +0000 (14:34 +0100)]
missed import

4 years agocalling the test dictionary from the constructor is effectively
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:33:08 +0000 (14:33 +0100)]
calling the test dictionary from the constructor is effectively
what unittest does.  this results in multiple copies of the test
being called (once by the dictionary-loop, once by unittest infrastructure)

getting the name of the actual test is a good thing.  used inspect.stack()
to find the name of the calling test

4 years agowhoops spelling
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:29:13 +0000 (14:29 +0100)]
whoops spelling

4 years agoadd the div pipe kind plus prog.assembly to the assert debug output
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:06:48 +0000 (14:06 +0100)]
add the div pipe kind plus prog.assembly to the assert debug output

4 years agocall test_write_ilang only once - ends up being called 9 times otherwise
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 13:05:53 +0000 (14:05 +0100)]
call test_write_ilang only once - ends up being called 9 times otherwise

4 years agofix how long div tests run, de-comment FSM and DivPipeCore
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 12:59:29 +0000 (13:59 +0100)]
fix how long div tests run, de-comment FSM and DivPipeCore

4 years agoargh! work-in-progress breaking / fixing how to do div unit tests
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 12:56:25 +0000 (13:56 +0100)]
argh!  work-in-progress breaking / fixing how to do div unit tests

4 years agowhoops must add DivTestCasesLong to get it to produce test_data
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 12:23:17 +0000 (13:23 +0100)]
whoops must add DivTestCasesLong to get it to produce test_data

4 years agoremove bad hack calling trunc_divs/trunc_mods
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 12:19:17 +0000 (13:19 +0100)]
remove bad hack calling trunc_divs/trunc_mods
see https://bugs.libre-soc.org/show_bug.cgi?id=436

4 years agore-enable commented-out div unit tests
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 11:52:28 +0000 (12:52 +0100)]
re-enable commented-out div unit tests

4 years agosplit out "all" div into separate unit test (takes a really long time)
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 11:50:07 +0000 (12:50 +0100)]
split out "all" div into separate unit test (takes a really long time)

4 years agoreduce variable size, continuation not needed
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 11:45:27 +0000 (12:45 +0100)]
reduce variable size, continuation not needed

4 years agocomment about timeline does not exist
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 11:43:59 +0000 (12:43 +0100)]
comment about timeline does not exist

4 years agoah ha! not using "with" was not calling the "close" function
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 11:06:08 +0000 (12:06 +0100)]
ah ha!  not using "with" was not calling the "close" function

4 years agoread into a BytesIO to avoid "too many open files"
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:54:24 +0000 (11:54 +0100)]
read into a BytesIO to avoid "too many open files"
 see https://bugs.libre-soc.org/show_bug.cgi?id=438

4 years agowhitespace / comments
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:46:19 +0000 (11:46 +0100)]
whitespace / comments

4 years agorestore modification to caller.py from reversion of div (use of pia
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:35:00 +0000 (11:35 +0100)]
restore modification to caller.py from reversion of div (use of pia
not properly documented)

4 years agoRevert "working on div's test_pipe_caller"
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:30:32 +0000 (11:30 +0100)]
Revert "working on div's test_pipe_caller"

This reverts commit 8bf37997d31250126a664aeb3bd67ac0cd72a70c.

the build / install dependencies have not been properly documented,
making it impossible for anyone to install this at the moment.

that in turn makes it impossible for anyone to run:

* the div test_pipe_caller unit test
* the test_issuer.py test
* the test_core.py test
* the compunit test_div_compunit.py test

the modifications to caller.py whilst correct are reverted as a
side-effect due to violation of the development guidelines on
"single purpose commit"

4 years agobug found in pseudocode reader when assembly code has zero args
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:14:16 +0000 (11:14 +0100)]
bug found in pseudocode reader when assembly code has zero args

4 years agosubmodule update
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 10:09:14 +0000 (11:09 +0100)]
submodule update
see https://bugs.libre-soc.org/show_bug.cgi?id=439

4 years agocode review comments for trap and proof
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 09:40:32 +0000 (10:40 +0100)]
code review comments for trap and proof

4 years agomade it clear what is meant by the slice numbering being inverted
Luke Kenneth Casson Leighton [Fri, 24 Jul 2020 09:25:59 +0000 (10:25 +0100)]
made it clear what is meant by the slice numbering being inverted
see https://bugs.libre-soc.org/show_bug.cgi?id=325#c126

4 years agoRefactorin of common code
Samuel A. Falvo II [Fri, 24 Jul 2020 05:37:28 +0000 (22:37 -0700)]
Refactorin of common code

4 years agoAddress code review comments
Samuel A. Falvo II [Fri, 24 Jul 2020 05:29:55 +0000 (22:29 -0700)]
Address code review comments

- Remove hypervisor-related checks and main logic.
- Use field() to work with subfields of arbitrary signals.
- Use FormXXX classes to access opcode subfields.

4 years agoworking on div's test_pipe_caller
Jacob Lifshay [Fri, 24 Jul 2020 04:59:09 +0000 (21:59 -0700)]
working on div's test_pipe_caller

4 years agoadd power-instruction-analyzer as a dependency
Jacob Lifshay [Fri, 24 Jul 2020 02:36:02 +0000 (19:36 -0700)]
add power-instruction-analyzer as a dependency

4 years agoformat
Jacob Lifshay [Fri, 24 Jul 2020 02:35:49 +0000 (19:35 -0700)]
format

4 years agosyntax error
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 21:49:32 +0000 (22:49 +0100)]
syntax error

4 years agosupport 32-bit mem width setting
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 21:42:59 +0000 (22:42 +0100)]
support 32-bit mem width setting

4 years agotry SDRAM SDR
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 21:42:29 +0000 (22:42 +0100)]
try SDRAM SDR

4 years agoallow imem to be 64/32 bit wide
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 21:41:19 +0000 (22:41 +0100)]
allow imem to be 64/32 bit wide

4 years agobegin core in running state
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 19:28:51 +0000 (20:28 +0100)]
begin core in running state

4 years agotry different MEMTEST_xxx sizes with 64 bit bus width
Luke Kenneth Casson Leighton [Thu, 23 Jul 2020 19:28:37 +0000 (20:28 +0100)]
try different MEMTEST_xxx sizes with 64 bit bus width

4 years agoUpdate libreriscv HDL_workflow/coriolis2
Cole Poirier [Thu, 23 Jul 2020 19:43:24 +0000 (12:43 -0700)]
Update libreriscv HDL_workflow/coriolis2

4 years agoadd all div* and mod* instructions to test_pipe_caller
Jacob Lifshay [Thu, 23 Jul 2020 00:42:37 +0000 (17:42 -0700)]
add all div* and mod* instructions to test_pipe_caller

4 years agoworking on fsm
Jacob Lifshay [Wed, 22 Jul 2020 23:55:51 +0000 (16:55 -0700)]
working on fsm

4 years agoMerge remote-tracking branch 'origin/master'
Jacob Lifshay [Wed, 22 Jul 2020 22:19:40 +0000 (15:19 -0700)]
Merge remote-tracking branch 'origin/master'

4 years agoformat code
Jacob Lifshay [Wed, 22 Jul 2020 22:18:03 +0000 (15:18 -0700)]
format code