soc.git
3 years agotracking down what looks like an error in the Simulator Mem ld/st
Luke Kenneth Casson Leighton [Fri, 12 Jun 2020 14:41:16 +0000 (15:41 +0100)]
tracking down what looks like an error in the Simulator Mem ld/st

3 years agodebug printout of sim and hardware memory, shows mismatch of depths
Luke Kenneth Casson Leighton [Fri, 12 Jun 2020 14:03:10 +0000 (15:03 +0100)]
debug printout of sim and hardware memory, shows mismatch of depths

3 years agouse ALUHelpers in LDSTCompUnit test
Luke Kenneth Casson Leighton [Fri, 12 Jun 2020 13:46:25 +0000 (14:46 +0100)]
use ALUHelpers in LDSTCompUnit test

3 years agosome ugly hacks that get LD/ST immediate working
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 19:03:30 +0000 (20:03 +0100)]
some ugly hacks that get LD/ST immediate working

3 years agoeven more complexity in CompALUMulti, to deal with an edge case where
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 14:29:41 +0000 (15:29 +0100)]
even more complexity in CompALUMulti, to deal with an edge case where
go-write is requested immediately (same cycle as go-req).
the set and reset on "req_l" happen to come in on the same cycle.
the result: the latch *remains* set high.
solution: record the go signals for one extra cycle (sync) and push
them into the req-reset and wr_any signals

3 years agomust distinguish between rd/write xer_ca sim helpers
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 10:54:27 +0000 (11:54 +0100)]
must distinguish between rd/write xer_ca sim helpers

3 years agofixing get_rd_sim_xer_ca, has to only read carry if available
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 10:53:21 +0000 (11:53 +0100)]
fixing get_rd_sim_xer_ca, has to only read carry if available

3 years agoyield needed for unit tests to work (has to go)
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 10:53:00 +0000 (11:53 +0100)]
yield needed for unit tests to work (has to go)

3 years agoread and write version of get_sim_xer_ca are different
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 10:31:05 +0000 (11:31 +0100)]
read and write version of get_sim_xer_ca are different

3 years agouse ALUHelpers in shift_rot
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 10:23:10 +0000 (11:23 +0100)]
use ALUHelpers in shift_rot

3 years agoadd fast spr1/2 sim ALUHelpers
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 06:14:49 +0000 (07:14 +0100)]
add fast spr1/2 sim ALUHelpers

3 years agorename get_sim_cr_a to get_wr_sim_cr_a for now
Luke Kenneth Casson Leighton [Thu, 11 Jun 2020 06:10:27 +0000 (07:10 +0100)]
rename get_sim_cr_a to get_wr_sim_cr_a for now
add read-version of get_sim_cr_a

3 years agomove Decode2ToExecute1Type to separate module
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 23:56:58 +0000 (00:56 +0100)]
move Decode2ToExecute1Type to separate module

3 years agowhitespace
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 23:48:01 +0000 (00:48 +0100)]
whitespace

3 years agomodify qemu.py to set qemu's cr to 0
Michael Nolan [Wed, 10 Jun 2020 19:28:30 +0000 (15:28 -0400)]
modify qemu.py to set qemu's cr to 0

3 years agolink ST.go directly to ST.rel
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:41:35 +0000 (17:41 +0100)]
link ST.go directly to ST.rel

3 years agorename unit test function in ld/st compalu_multi
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:38:58 +0000 (17:38 +0100)]
rename unit test function in ld/st compalu_multi

3 years agohmmm very confused about LD/ST CompUnit unit test
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:35:13 +0000 (17:35 +0100)]
hmmm very confused about LD/ST CompUnit unit test

3 years agowrong data structure being imported, duplicate CompLDSTOpSubset
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:26:47 +0000 (17:26 +0100)]
wrong data structure being imported, duplicate CompLDSTOpSubset

3 years agoremove old code
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:23:40 +0000 (17:23 +0100)]
remove old code

3 years agoset data_len in compldst_multi unit test
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:11:25 +0000 (17:11 +0100)]
set data_len in compldst_multi unit test

3 years agoyield ports from data_o and addr_o
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:09:46 +0000 (17:09 +0100)]
yield ports from data_o and addr_o

3 years agoexpand LenExpand to 4 bits in order to cover 1/2/4/8 (0b1000)
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 16:04:33 +0000 (17:04 +0100)]
expand LenExpand to 4 bits in order to cover 1/2/4/8 (0b1000)

3 years agogot L0CacheBuffer shift/mask working on a preliminary level
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 15:43:29 +0000 (16:43 +0100)]
got L0CacheBuffer shift/mask working on a preliminary level

3 years agowhitespace
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 14:51:48 +0000 (15:51 +0100)]
whitespace

3 years agoadd use of classes in L0Cache unit tests
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 14:50:26 +0000 (15:50 +0100)]
add use of classes in L0Cache unit tests

3 years agostart using unittest suite in l0_cache.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 14:44:03 +0000 (15:44 +0100)]
start using unittest suite in l0_cache.py

3 years agocreates an import error and stops unit tests from running
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 14:39:13 +0000 (15:39 +0100)]
creates an import error and stops unit tests from running

Revert "PortInterface refactoring"

This reverts commit 8e58e66142991e308985a463cfff396a36e3f816.

3 years agoadd in LenExpander to L0CacheBuffer, not used yet
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 14:36:56 +0000 (15:36 +0100)]
add in LenExpander to L0CacheBuffer, not used yet

3 years agomake resetless for all signals in DataMergerRecord
Tobias Platen [Wed, 10 Jun 2020 14:38:24 +0000 (16:38 +0200)]
make resetless for all signals in DataMergerRecord

3 years agoPortInterface refactoring
Tobias Platen [Wed, 10 Jun 2020 14:28:04 +0000 (16:28 +0200)]
PortInterface refactoring

3 years agoexception if rolls in addr_split.py
Tobias Platen [Wed, 10 Jun 2020 13:57:02 +0000 (15:57 +0200)]
exception if rolls in addr_split.py

3 years agoadd link to bug 361 in FU test
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 13:27:05 +0000 (14:27 +0100)]
add link to bug 361 in FU test

3 years agoTODO on RA immediate-zero mode
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 13:25:27 +0000 (14:25 +0100)]
TODO on RA immediate-zero mode

3 years agore-do cookie-cut of alu test_pipe_caller.py over to div. again
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 13:20:27 +0000 (14:20 +0100)]
re-do cookie-cut of alu test_pipe_caller.py over to div. again

3 years agouse ALUHelpers in output stage of test_pipe_caller
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 13:08:16 +0000 (14:08 +0100)]
use ALUHelpers in output stage of test_pipe_caller

3 years agouse sim-get helpers in ALU input fetch
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 13:03:39 +0000 (14:03 +0100)]
use sim-get helpers in ALU input fetch

3 years agouse ALUHelpers in output phase of test_alu_compunit.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 12:55:40 +0000 (13:55 +0100)]
use ALUHelpers in output phase of test_alu_compunit.py

3 years agocontinue ALUHelpers check alu outputs code-morph
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 12:54:24 +0000 (13:54 +0100)]
continue ALUHelpers check alu outputs code-morph

3 years agocode-morph ALU output test check phase
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 12:33:19 +0000 (13:33 +0100)]
code-morph ALU output test check phase

3 years agocode-morph regspecmap functions, split into separate read/write
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 12:18:08 +0000 (13:18 +0100)]
code-morph regspecmap functions, split into separate read/write

3 years agostarting on alu output check
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 12:09:45 +0000 (13:09 +0100)]
starting on alu output check

3 years agoilang file output change from alu_pipeline.il to div_pipeline.il
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:33:38 +0000 (12:33 +0100)]
ilang file output change from alu_pipeline.il to div_pipeline.il

3 years agocookie-cut alu test_pipe_caller.py over
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:31:54 +0000 (12:31 +0100)]
cookie-cut alu test_pipe_caller.py over

3 years agomove to common ALUHelpers for ShiftRot test_pipe_caller.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:25:48 +0000 (12:25 +0100)]
move to common ALUHelpers for ShiftRot test_pipe_caller.py

3 years agomove to common ALUHelpers for Logical test_pipe_caller.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:21:43 +0000 (12:21 +0100)]
move to common ALUHelpers for Logical test_pipe_caller.py

3 years agomove to common ALUHelpers for CR test_pipe_caller.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:20:17 +0000 (12:20 +0100)]
move to common ALUHelpers for CR test_pipe_caller.py

3 years agomove to common ALUHelpers for branch test_pipe_caller.py
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:13:27 +0000 (12:13 +0100)]
move to common ALUHelpers for branch test_pipe_caller.py

3 years agocode-munge test_pipe_caller for ALU,
Luke Kenneth Casson Leighton [Wed, 10 Jun 2020 11:09:20 +0000 (12:09 +0100)]
code-munge test_pipe_caller for ALU,
plan to remove duplicated code

3 years agocreate div pipe setup stage
Jacob Lifshay [Wed, 10 Jun 2020 06:53:06 +0000 (23:53 -0700)]
create div pipe setup stage

3 years agoKeep the sequencer in the "done" state until ready_i is asserted
Cesar Strauss [Tue, 9 Jun 2020 22:45:05 +0000 (19:45 -0300)]
Keep the sequencer in the "done" state until ready_i is asserted

Generate valid_o from the "done" state.

3 years agoexperimenting with CR/LR/XER etc in qemu
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 22:38:39 +0000 (23:38 +0100)]
experimenting with CR/LR/XER etc in qemu

3 years agoadd means to get pc and other qemu registers
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 22:12:58 +0000 (23:12 +0100)]
add means to get pc and other qemu registers

3 years agorename truncaddr to splitaddr, return LSBs and MSBs
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 17:53:35 +0000 (18:53 +0100)]
rename truncaddr to splitaddr, return LSBs and MSBs

3 years agoadd len-expander to L0CacheBuffer, so as to be able to mask the LD/ST data
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 17:53:09 +0000 (18:53 +0100)]
add len-expander to L0CacheBuffer, so as to be able to mask the LD/ST data

3 years agoallow LenExpand to output both byte- and bit- mask expansion
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 17:33:22 +0000 (18:33 +0100)]
allow LenExpand to output both byte- and bit- mask expansion

3 years agoundo code removed by commit 12297566322355ce5fed2e2a5460bea54f69e79e
Tobias Platen [Tue, 9 Jun 2020 13:05:10 +0000 (15:05 +0200)]
undo code removed by commit 12297566322355ce5fed2e2a5460bea54f69e79e

3 years agoexpand LenExpand (haha) to cover bytes, with an argument "cover"
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 13:01:06 +0000 (14:01 +0100)]
expand LenExpand (haha) to cover bytes, with an argument "cover"
all puns intentional

3 years agoelaborate function for DualPortSplitter
Tobias Platen [Tue, 9 Jun 2020 12:34:34 +0000 (14:34 +0200)]
elaborate function for DualPortSplitter

3 years agoAvoid a combinatorial loop on valid_o
Cesar Strauss [Tue, 9 Jun 2020 11:57:31 +0000 (08:57 -0300)]
Avoid a combinatorial loop on valid_o

The path was:

all_rd (1) -> all_rd_pulse (1) -> alui_l.s (1) ->
-> alu.p.valid_i (1) -> ALU (zero-delay) -> alu.n.valid_o (1) ->
-> rok_l.r (1) -> all_rd (0)

Decided to break the loop on the reset of the read-done, write proceed
latch (rok_l.r), with no ill effects on performance.

Added a test case for this, using the zero-delay ALU (OP_NOP).

3 years agofixes for DualPortSplitter
Tobias Platen [Tue, 9 Jun 2020 12:00:50 +0000 (14:00 +0200)]
fixes for DualPortSplitter

3 years agomake DataMerger record reset_less
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 11:09:11 +0000 (12:09 +0100)]
make DataMerger record reset_less

3 years agoadd truncaddr function to L0CacheBuffer test class
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 11:08:32 +0000 (12:08 +0100)]
add truncaddr function to L0CacheBuffer test class

3 years agoadd convenience variables in TestMemory
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 11:08:12 +0000 (12:08 +0100)]
add convenience variables in TestMemory

3 years agomap LDST len directly, rather than go through a switch statement
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 10:50:51 +0000 (11:50 +0100)]
map LDST len directly, rather than go through a switch statement

3 years agocorrect local variable references
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 10:49:07 +0000 (11:49 +0100)]
correct local variable references

3 years agobit more on TRAP handling (preparing priv instruction)
Luke Kenneth Casson Leighton [Tue, 9 Jun 2020 10:48:23 +0000 (11:48 +0100)]
bit more on TRAP handling (preparing priv instruction)

3 years agoadd traptype and trapaddr to PowerDecoder2. idea is to actually *change*
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 22:52:54 +0000 (23:52 +0100)]
add traptype and trapaddr to PowerDecoder2.  idea is to actually *change*
the instruction depending on conditions detected by the decoder

3 years agoadd traptype and trapaddr to trap_input_data.py
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 22:51:44 +0000 (23:51 +0100)]
add traptype and trapaddr to trap_input_data.py

3 years agoadd "instr_is_privileged" to power_decoder2 (untested)
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 22:30:57 +0000 (23:30 +0100)]
add "instr_is_privileged" to power_decoder2 (untested)

3 years agouse 2nd shortened convenience variable in PowerDecoder2
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 22:20:22 +0000 (23:20 +0100)]
use 2nd shortened convenience variable in PowerDecoder2

3 years agouse shortened convenience variable in PowerDecoder2
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 22:18:48 +0000 (23:18 +0100)]
use shortened convenience variable in PowerDecoder2

3 years agore-add unit tests back in
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 19:04:45 +0000 (20:04 +0100)]
re-add unit tests back in

3 years agoadd comment docstring about POWER9 simulator
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 18:26:51 +0000 (19:26 +0100)]
add comment docstring about POWER9 simulator

3 years agomore verbose debug information tracking down SO/OV/OV32
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 17:52:42 +0000 (18:52 +0100)]
more verbose debug information tracking down SO/OV/OV32

3 years agowhoops, overflow-decode (handle_overflow) needed to check e.oe.ok
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 17:51:23 +0000 (18:51 +0100)]
whoops, overflow-decode (handle_overflow) needed to check e.oe.ok
*and* e.oe.oe to decide whether to set SO/OV/OV32

3 years agoAdd register assertions, fix broken tests
Michael Nolan [Mon, 8 Jun 2020 17:45:59 +0000 (13:45 -0400)]
Add register assertions, fix broken tests

3 years agoUpdate to latest wiki version
Michael Nolan [Mon, 8 Jun 2020 17:45:50 +0000 (13:45 -0400)]
Update to latest wiki version

3 years agoRestore test_sim.py, begin modifying it for testing against qemu
Michael Nolan [Mon, 8 Jun 2020 17:36:57 +0000 (13:36 -0400)]
Restore test_sim.py, begin modifying it for testing against qemu

3 years agoadd CA/CA32 to write regs fields in parser
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:59:31 +0000 (15:59 +0100)]
add CA/CA32 to write regs fields in parser

3 years agocheck that carry has already been done or not by the actual instruction
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:58:53 +0000 (15:58 +0100)]
check that carry has already been done or not by the actual instruction

3 years agocode-morph test_core for XER bit clarity
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:44:58 +0000 (15:44 +0100)]
code-morph test_core for XER bit clarity

3 years agoset only the SO bit as sticky, not the OV flags as sticky
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:44:33 +0000 (15:44 +0100)]
set only the SO bit as sticky, not the OV flags as sticky

3 years agocopy 64-bit OV, try creating 32-bit OV32 in
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:28:02 +0000 (15:28 +0100)]
copy 64-bit OV, try creating 32-bit OV32 in
simulator caller.py

3 years agoclarify using microwatt calc_ov function.
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 14:08:58 +0000 (15:08 +0100)]
clarify using microwatt calc_ov function.
found bug where part of the comparison was not using carry

3 years agoadded check which shows that OV32 in "adde." is not correct
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 13:50:35 +0000 (14:50 +0100)]
added check which shows that OV32 in "adde." is not correct

3 years agofound section in 3.0B PDF that refers to "Program Interrupts"
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 12:55:34 +0000 (13:55 +0100)]
found section in 3.0B PDF that refers to "Program Interrupts"

3 years agomove datamerger proof into standard directory location (formal/),
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 12:33:31 +0000 (13:33 +0100)]
move datamerger proof into standard directory location (formal/),
update comments

3 years agocopy MSR into SRR1 in trap function
Luke Kenneth Casson Leighton [Mon, 8 Jun 2020 02:08:03 +0000 (03:08 +0100)]
copy MSR into SRR1 in trap function

3 years agoFix spelling
colepoirier [Mon, 8 Jun 2020 01:17:43 +0000 (18:17 -0700)]
Fix spelling

3 years agoupdate trap with comments
Luke Kenneth Casson Leighton [Sun, 7 Jun 2020 21:18:16 +0000 (22:18 +0100)]
update trap with comments

3 years agoupdate comments
Luke Kenneth Casson Leighton [Sun, 7 Jun 2020 21:11:48 +0000 (22:11 +0100)]
update comments

3 years agoAdd TrapMainStage.trap() convenience function to set trap address and PC
colepoirier [Sun, 7 Jun 2020 21:09:17 +0000 (14:09 -0700)]
Add TrapMainStage.trap() convenience function to set trap address and PC
to begin from on return

3 years agoAssign the one-clock delay operation from ADD to SHR
Cesar Strauss [Sun, 7 Jun 2020 20:47:10 +0000 (17:47 -0300)]
Assign the one-clock delay operation from ADD to SHR

This keeps the ADD delay as it was, originally.

3 years agoassert XER SO/OV/CA registers, check these are ok (fail at the moment)
Luke Kenneth Casson Leighton [Sun, 7 Jun 2020 20:48:20 +0000 (21:48 +0100)]
assert XER SO/OV/CA registers, check these are ok (fail at the moment)

3 years agoadd debug print statements, re-enable all tests in simple core
Luke Kenneth Casson Leighton [Sun, 7 Jun 2020 20:20:37 +0000 (21:20 +0100)]
add debug print statements, re-enable all tests in simple core

3 years agoresolved CR mfcr lookup bug (was in power_decoder. ??)
Luke Kenneth Casson Leighton [Sun, 7 Jun 2020 20:15:58 +0000 (21:15 +0100)]
resolved CR mfcr lookup bug (was in power_decoder. ??)
https://bugs.libre-soc.org/show_bug.cgi?id=363

3 years agoTry responding with ready_i on the same cycle as valid_o
Cesar Strauss [Sun, 7 Jun 2020 19:40:44 +0000 (16:40 -0300)]
Try responding with ready_i on the same cycle as valid_o

3 years agoAssert valid_o one clock early, as alu_done is asserted
Cesar Strauss [Sun, 7 Jun 2020 19:37:32 +0000 (16:37 -0300)]
Assert valid_o one clock early, as alu_done is asserted

3 years agoMake the test ALU conform to the valid/ready protocol
Cesar Strauss [Sun, 7 Jun 2020 19:32:11 +0000 (16:32 -0300)]
Make the test ALU conform to the valid/ready protocol

Adjust the test case accordingly.