soc.git
4 years agocookie-cut setup from alu proof_main_stage.py
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:59:59 +0000 (20:59 +0100)]
cookie-cut setup from alu proof_main_stage.py

4 years agoreduce code size by using CompOpSubsetBase for ALU and Logical
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:54:21 +0000 (20:54 +0100)]
reduce code size by using CompOpSubsetBase for ALU and Logical

4 years agosplit out CompOpSubsetBase (meaning to do for a while)
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:43:22 +0000 (20:43 +0100)]
split out CompOpSubsetBase (meaning to do for a while)

4 years agoupdate docstrings
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:31:49 +0000 (20:31 +0100)]
update docstrings

4 years agoadding MSR.PR unit test intended to activate privileged trap
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:31:38 +0000 (20:31 +0100)]
adding MSR.PR unit test intended to activate privileged trap

4 years agoattempting to access self.msr directly
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 19:31:05 +0000 (20:31 +0100)]
attempting to access self.msr directly

4 years agoSPR: FV that should fail currently passes
Samuel A. Falvo II [Tue, 14 Jul 2020 19:17:45 +0000 (12:17 -0700)]
SPR: FV that should fail currently passes

WIP.  Cannot figure out why this is not failing.  Code review requested.

4 years agoset up masks for OP_RL* formal proof
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 15:06:29 +0000 (16:06 +0100)]
set up masks for OP_RL* formal proof

4 years agoadd priv instruction checking to ISACaller simulator
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 13:05:38 +0000 (14:05 +0100)]
add priv instruction checking to ISACaller simulator

4 years agoadd in privileged instruction decision-making in PowerDecode2
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 12:00:19 +0000 (13:00 +0100)]
add in privileged instruction decision-making in PowerDecode2

4 years agoadd MSR reading to issue FSM
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 11:43:53 +0000 (12:43 +0100)]
add MSR reading to issue FSM

4 years agocomments on PowerDecode2
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 11:00:54 +0000 (12:00 +0100)]
comments on PowerDecode2

4 years agoadd MSR to PowerDecoder2
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 10:47:05 +0000 (11:47 +0100)]
add MSR to PowerDecoder2

4 years agodisable cxxsim test
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 10:42:29 +0000 (11:42 +0100)]
disable cxxsim test

4 years agoattempting running cxxsim on ALU pipeline test
Luke Kenneth Casson Leighton [Tue, 14 Jul 2020 10:41:41 +0000 (11:41 +0100)]
attempting running cxxsim on ALU pipeline test

4 years agofirst attempt running cxxsim
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 22:59:34 +0000 (23:59 +0100)]
first attempt running cxxsim

4 years agofix path to nmigen-soc.git
Tobias Platen [Tue, 14 Jul 2020 05:32:42 +0000 (07:32 +0200)]
fix path to nmigen-soc.git

4 years agowhitespace
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 19:30:39 +0000 (20:30 +0100)]
whitespace

4 years agoformal proof of OP_EXTSWSLI
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 19:28:11 +0000 (20:28 +0100)]
formal proof of OP_EXTSWSLI

4 years agoquick test showing how left/right mask work
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 19:27:56 +0000 (20:27 +0100)]
quick test showing how left/right mask work

4 years agoadd nmigen-soc to .gitlab-ci.yml
Tobias Platen [Mon, 13 Jul 2020 18:13:03 +0000 (20:13 +0200)]
add nmigen-soc to .gitlab-ci.yml

4 years agoadd mtmsrd instruction and unit test
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 18:07:08 +0000 (19:07 +0100)]
add mtmsrd instruction and unit test

4 years agocomments
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 15:14:24 +0000 (16:14 +0100)]
comments

4 years agoattempting formal proof of OP_EXTSWSLI
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 15:07:09 +0000 (16:07 +0100)]
attempting formal proof of OP_EXTSWSLI

4 years agoreduce rotl module to one line (use bit_select)
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 14:13:21 +0000 (15:13 +0100)]
reduce rotl module to one line (use bit_select)

4 years agodocument rb as sh
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 13:55:04 +0000 (14:55 +0100)]
document rb as sh

4 years agoincrease range of test values for extswsli
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 13:45:09 +0000 (14:45 +0100)]
increase range of test values for extswsli

4 years agoadd EXTSWSLI "pass" to formal shift_rot proof
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 13:21:44 +0000 (14:21 +0100)]
add EXTSWSLI "pass" to formal shift_rot proof

4 years agoremove unneeded spec patching
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 13:18:14 +0000 (14:18 +0100)]
remove unneeded spec patching

4 years agoenable extswsli tests, fix spec-patching
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 13:17:34 +0000 (14:17 +0100)]
enable extswsli tests, fix spec-patching

4 years agoadd regression test, simulator is wrong
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 12:03:28 +0000 (13:03 +0100)]
add regression test, simulator is wrong

4 years agoadd simulator test against qemu for extswsli
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 12:02:22 +0000 (13:02 +0100)]
add simulator test against qemu for extswsli

4 years agofix read of sliced register
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 11:55:48 +0000 (12:55 +0100)]
fix read of sliced register

4 years agonot perfect but close enough: add read registers RA/S/B/C in parser
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 10:30:30 +0000 (11:30 +0100)]
not perfect but close enough: add read registers RA/S/B/C in parser

4 years agoadd extswsli unit test
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 10:27:08 +0000 (11:27 +0100)]
add extswsli unit test

4 years agoadd link to rotator, sign-extend mode OP_EXTSWSLI
Luke Kenneth Casson Leighton [Mon, 13 Jul 2020 10:02:15 +0000 (11:02 +0100)]
add link to rotator, sign-extend mode OP_EXTSWSLI

4 years agorename InternalOp to MicrOp
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 22:01:50 +0000 (23:01 +0100)]
rename InternalOp to MicrOp

4 years agoattempting to get test_trap_sim working, seems to switch mode
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 21:08:45 +0000 (22:08 +0100)]
attempting to get test_trap_sim working, seems to switch mode

4 years agosubmodule update
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 20:55:54 +0000 (21:55 +0100)]
submodule update

4 years agoadd OP_ATTN test back in
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 20:55:48 +0000 (21:55 +0100)]
add OP_ATTN test back in

4 years agoexit FSM when termination detected
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 20:48:36 +0000 (21:48 +0100)]
exit FSM when termination detected

4 years agocode-morph on core connect_instruction
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 20:32:44 +0000 (21:32 +0100)]
code-morph on core connect_instruction

4 years agomodify PowerDecoder to read LDSTMode correctly
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 20:04:24 +0000 (21:04 +0100)]
modify PowerDecoder to read LDSTMode correctly

4 years agochange CSV LD/ST update field to LDSTMode (support cix)
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 19:46:47 +0000 (20:46 +0100)]
change CSV LD/ST update field to LDSTMode (support cix)

4 years agoreturn unsigned int from binary reading
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 12:33:19 +0000 (13:33 +0100)]
return unsigned int from binary reading

4 years agoupdate submodule
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 12:13:09 +0000 (13:13 +0100)]
update submodule

4 years agomissed setting of link register on OP_BC in PowerDecoder2
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 10:46:22 +0000 (11:46 +0100)]
missed setting of link register on OP_BC in PowerDecoder2

4 years agomsb of instruction causing sign-overflow
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 04:10:10 +0000 (05:10 +0100)]
msb of instruction causing sign-overflow

4 years agoadd std and stdu ldst unit tests
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 03:46:31 +0000 (04:46 +0100)]
add std and stdu ldst unit tests

4 years agoupdate-mode request write signalled too early
Luke Kenneth Casson Leighton [Sun, 12 Jul 2020 03:46:04 +0000 (04:46 +0100)]
update-mode request write signalled too early

4 years agosort out core write latching: gate by busy, and use CompUnit dest output
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 22:48:46 +0000 (23:48 +0100)]
sort out core write latching: gate by busy, and use CompUnit dest output

4 years ago* clarifying core function unit enable
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 22:24:20 +0000 (23:24 +0100)]
* clarifying core function unit enable
* disabling wrflag based on fu busy
* NOP enabled when not stopped
g

4 years agoadd bigendian flag
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 22:13:44 +0000 (23:13 +0100)]
add bigendian flag

4 years agoadd endian
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 21:53:19 +0000 (22:53 +0100)]
add endian

4 years agofix spr setting, set endianness
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 21:50:37 +0000 (22:50 +0100)]
fix spr setting, set endianness

4 years agosigh spelling
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 21:48:58 +0000 (22:48 +0100)]
sigh spelling

4 years agoadd bigendian
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 21:46:10 +0000 (22:46 +0100)]
add bigendian

4 years agomore setting bigendian
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 20:06:51 +0000 (21:06 +0100)]
more setting bigendian

4 years agoadd bigendian mode to helloworld test
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 20:01:47 +0000 (21:01 +0100)]
add bigendian mode to helloworld test

4 years agosort out big/little endian startup on qemu
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 16:38:14 +0000 (17:38 +0100)]
sort out big/little endian startup on qemu

4 years agosorting out bigendian/littleendian including in qemu
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 16:34:07 +0000 (17:34 +0100)]
sorting out bigendian/littleendian including in qemu
qemu is a pain!

4 years agowhoops output trunc_divs not trunc_div
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 11:35:23 +0000 (12:35 +0100)]
whoops output trunc_divs not trunc_div

4 years agoadd random mulhd and mulld tests
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 11:02:29 +0000 (12:02 +0100)]
add random mulhd and mulld tests

4 years agoenable mul tests after sorting pseudo-code mul overflow
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 10:26:20 +0000 (11:26 +0100)]
enable mul tests after sorting pseudo-code mul overflow

4 years agospecial test for mul hw to cope with ignoring OE flag
Luke Kenneth Casson Leighton [Sat, 11 Jul 2020 10:08:48 +0000 (11:08 +0100)]
special test for mul hw to cope with ignoring OE flag

4 years agoadd a DIVS function as separate and discrete from floor_div
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 20:09:30 +0000 (21:09 +0100)]
add a DIVS function as separate and discrete from floor_div
likewise for MODS and MULS

4 years agoadd random unsigned div tests
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:29:07 +0000 (16:29 +0100)]
add random unsigned div tests

4 years agoadd overflow div tests
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:28:24 +0000 (16:28 +0100)]
add overflow div tests

4 years agopropagate missing parameters from div
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:28:12 +0000 (16:28 +0100)]
propagate missing parameters from div

4 years agocode comments
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:27:01 +0000 (16:27 +0100)]
code comments

4 years agodo not set div result if overflow occurs
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:16:12 +0000 (16:16 +0100)]
do not set div result if overflow occurs

4 years agore-enable div random tests and other regressions
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:05:23 +0000 (16:05 +0100)]
re-enable div random tests and other regressions

4 years agocheck for div_overflow equal to None rather than == 1
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 15:04:08 +0000 (16:04 +0100)]
check for div_overflow equal to None rather than == 1

4 years agore-add rc/oe back into LDST input record
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 13:30:28 +0000 (14:30 +0100)]
re-add rc/oe back into LDST input record
this for later use with st*cx because it writes CR and OV (and SO)

4 years agowhew panic over, missed a bigendian argument in test_compunit.py
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 13:21:48 +0000 (14:21 +0100)]
whew panic over, missed a bigendian argument in test_compunit.py

4 years agoadd test7 div regression
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 13:12:50 +0000 (14:12 +0100)]
add test7 div regression

4 years agoadd more debug output for #425
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 09:40:15 +0000 (10:40 +0100)]
add more debug output for #425

4 years agoadd debugging chain for #425
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 09:16:28 +0000 (10:16 +0100)]
add debugging chain for #425

4 years agoupdate submodule
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 09:15:52 +0000 (10:15 +0100)]
update submodule

4 years agocut/paste error writing to wrong vcd file
Luke Kenneth Casson Leighton [Fri, 10 Jul 2020 08:44:27 +0000 (09:44 +0100)]
cut/paste error writing to wrong vcd file

4 years agoswitch to using Signal.width instead of Signal.shape()[0] since Shape isn't a tuple...
Jacob Lifshay [Fri, 10 Jul 2020 00:21:37 +0000 (17:21 -0700)]
switch to using Signal.width instead of Signal.shape()[0] since Shape isn't a tuple anymore

see https://github.com/nmigen/nmigen/pull/422

4 years agoformat file
Jacob Lifshay [Fri, 10 Jul 2020 00:21:19 +0000 (17:21 -0700)]
format file

4 years agoupdate libreriscv submodule
Jacob Lifshay [Fri, 10 Jul 2020 00:19:29 +0000 (17:19 -0700)]
update libreriscv submodule

4 years agoadd regression test for div overflow case
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 23:18:53 +0000 (00:18 +0100)]
add regression test for div overflow case
see https://bugs.libre-soc.org/show_bug.cgi?id=425

4 years agoslightly different so handling in common output stage
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 21:20:41 +0000 (22:20 +0100)]
slightly different so handling in common output stage

4 years agoalso set so only if OE requires it
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 21:08:55 +0000 (22:08 +0100)]
also set so only if OE requires it

4 years agodebug information related to 32/64 bit mode
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 21:08:15 +0000 (22:08 +0100)]
debug information related to 32/64 bit mode

4 years agobug #424 - 32/64 bit is a *global* flag not a per-op one
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 21:07:06 +0000 (22:07 +0100)]
bug #424 - 32/64 bit is a *global* flag not a per-op one
when it comes to setting CR0

4 years agotest top bit 31 in 32-bit mode for CR0 creation
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 20:10:37 +0000 (21:10 +0100)]
test top bit 31 in 32-bit mode for CR0 creation

4 years agoha ha very funny. pipelines being pipelines, you have to wait for them
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:54:09 +0000 (20:54 +0100)]
ha ha very funny.  pipelines being pipelines, you have to wait for them
just as with MUL, it was necessary to set the "valid" signal for
only one cycle otherwise spurious output is created

4 years agowhoops test gets copied 4 times on the If.
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:44:34 +0000 (20:44 +0100)]
whoops test gets copied 4 times on the If.
create intermediate signal

4 years agoALU output stage, change logic slightly
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:37:14 +0000 (20:37 +0100)]
ALU output stage, change logic slightly
test for oe/ok then set xer/ov data/ok if true

4 years agoset xer_ov.ok = 1
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:28:54 +0000 (20:28 +0100)]
set xer_ov.ok = 1

4 years agoremove unneeded xer.ca in MulOutputData
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:18:04 +0000 (20:18 +0100)]
remove unneeded xer.ca in MulOutputData

4 years agosomething weird going on with div. interaction between tests
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:14:29 +0000 (20:14 +0100)]
something weird going on with div.  interaction between tests

4 years agosimplify setting of mul overflow into xer_ov
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:00:29 +0000 (20:00 +0100)]
simplify setting of mul overflow into xer_ov

4 years agoclarifying comments on setting xer_ov/so
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 19:00:07 +0000 (20:00 +0100)]
clarifying comments on setting xer_ov/so

4 years agoDIV overflow needs to be copied into both bits of XER.ov
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 18:59:45 +0000 (19:59 +0100)]
DIV overflow needs to be copied into both bits of XER.ov
(OV, OV32)

4 years agoadd debug output of DIV results
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 18:58:13 +0000 (19:58 +0100)]
add debug output of DIV results

4 years agocheck result first then CR second
Luke Kenneth Casson Leighton [Thu, 9 Jul 2020 18:57:34 +0000 (19:57 +0100)]
check result first then CR second