soc.git
3 years agoDemonstrates creating stylish GTKWave "save" files from python
Cesar Strauss [Thu, 13 Aug 2020 22:40:35 +0000 (19:40 -0300)]
Demonstrates creating stylish GTKWave "save" files from python

This is inspired on the use of the vcd.gtkw module in nMigen, used
internally to create "save" files of selected Signals, for
"Simulator.write_vcd".

However, the vcd.gtkw module exposes a great deal of extra possibilities,
like:

1) Individual trace colors.
For instance, use different color styles for input, output, debug and
internal traces.
2) Numeric bases besides the default hex.
3) Collapsible trace groups
Useful to hide and show, at once, groups of debug, internal and
sub-module traces.
Select the opening or closing brace, then use the T key.
4) Comments in the signal names pane
5) Change the displayed name of a trace
6) Sane default for initial zoom level
7) Place markers on interesting places
8) Put the generating file name as a comment in the file

3 years agoremove latchregister, use sync to capture compunit results
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 23:03:49 +0000 (00:03 +0100)]
remove latchregister, use sync to capture compunit results

3 years agoha! "state" (pc, msr) not properly passed to core
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 20:32:09 +0000 (21:32 +0100)]
ha! "state" (pc, msr) not properly passed to core

3 years agodrop in insn_state synchronously in issuer, at same time as insn
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 20:03:40 +0000 (21:03 +0100)]
drop in insn_state synchronously in issuer, at same time as insn

3 years agosubmodule update
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:45:31 +0000 (20:45 +0100)]
submodule update

3 years agohrfid unit test sets up HSRR0 and HSRR1
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:45:22 +0000 (20:45 +0100)]
hrfid unit test sets up HSRR0 and HSRR1

3 years agobad hack to get HSRR0/1 to be "same" as SRR0/1
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:44:59 +0000 (20:44 +0100)]
bad hack to get HSRR0/1 to be "same" as SRR0/1

3 years agobug in isa parser not recognising MSR as declared variable
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:44:35 +0000 (20:44 +0100)]
bug in isa parser not recognising MSR as declared variable

3 years agohack to get hrfid not to alter msr 51
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:43:56 +0000 (20:43 +0100)]
hack to get hrfid not to alter msr 51

3 years agostop trying to read swap files
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:43:08 +0000 (20:43 +0100)]
stop trying to read swap files

3 years agosync on alu results in compalu
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 19:23:34 +0000 (20:23 +0100)]
sync on alu results in compalu

3 years agoupdate submodule, add hrfid
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 17:25:17 +0000 (18:25 +0100)]
update submodule, add hrfid

3 years agoupdate submodule, add hrfid
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 17:23:33 +0000 (18:23 +0100)]
update submodule, add hrfid

3 years agofinally, fix decoder combinatorial loop
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 17:18:48 +0000 (18:18 +0100)]
finally, fix decoder combinatorial loop

3 years agofix test_compunit.py after moving decoder rdflags function
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 17:18:18 +0000 (18:18 +0100)]
fix test_compunit.py after moving decoder rdflags function

3 years agoadd hrfid unit test
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 17:17:48 +0000 (18:17 +0100)]
add hrfid unit test

3 years agosync up the core decode-execute state,
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 14:48:05 +0000 (15:48 +0100)]
sync up the core decode-execute state,
fix bug when pulling reset

3 years agomove instruction decoder out of core
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 14:26:10 +0000 (15:26 +0100)]
move instruction decoder out of core

3 years agomove regspec / rdflag decoding functions out of PowerDecode2
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 14:05:05 +0000 (15:05 +0100)]
move regspec / rdflag decoding functions out of PowerDecode2

3 years agosort out instruction stop/cancel when adding a new issuer FSM state
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 13:57:54 +0000 (14:57 +0100)]
sort out instruction stop/cancel when adding a new issuer FSM state

3 years agoput multi-ports back (for read) on int and fast regfiles
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 11:59:01 +0000 (12:59 +0100)]
put multi-ports back (for read) on int and fast regfiles

3 years agoreduce decoder pathways when exception occurs
Luke Kenneth Casson Leighton [Fri, 14 Aug 2020 11:10:06 +0000 (12:10 +0100)]
reduce decoder pathways when exception occurs

3 years agodivide shiftrot pipeline into 2 (simple last)
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 23:26:00 +0000 (00:26 +0100)]
divide shiftrot pipeline into 2 (simple last)

3 years agodivide alu pipeline into 2 (simple last)
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 23:25:36 +0000 (00:25 +0100)]
divide alu pipeline into 2 (simple last)

3 years agodivide logical pipe into 2 (simple phase last)
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 23:19:34 +0000 (00:19 +0100)]
divide logical pipe into 2 (simple phase last)

3 years agorunning the simulator works!
Jacob Lifshay [Fri, 14 Aug 2020 04:22:01 +0000 (21:22 -0700)]
running the simulator works!

3 years agoadd --cpu=libresoc to Makefile
Jacob Lifshay [Thu, 13 Aug 2020 23:18:03 +0000 (16:18 -0700)]
add --cpu=libresoc to Makefile

3 years agofix dmi reg read
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 21:44:29 +0000 (22:44 +0100)]
fix dmi reg read

3 years agocode-shuffle
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 21:23:18 +0000 (22:23 +0100)]
code-shuffle

3 years agoremove use of latchregigister, replace with sync on rd.go_i
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 21:23:08 +0000 (22:23 +0100)]
remove use of latchregigister, replace with sync on rd.go_i

3 years agosync on pc writing when changed
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 20:33:25 +0000 (21:33 +0100)]
sync on pc writing when changed

3 years agodcache.py add initial imports
Cole Poirier [Thu, 13 Aug 2020 19:05:10 +0000 (12:05 -0700)]
dcache.py add initial imports

3 years agomem_types.py add more types from common.vhdl
Cole Poirier [Thu, 13 Aug 2020 19:01:11 +0000 (12:01 -0700)]
mem_types.py add more types from common.vhdl

3 years agomove memory related types from mmu.py into new file mem_types.py as they
Cole Poirier [Thu, 13 Aug 2020 18:45:25 +0000 (11:45 -0700)]
move memory related types from mmu.py into new file mem_types.py as they
are used by icache and dcache as well

3 years agosync on reset in compalu
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 17:42:12 +0000 (18:42 +0100)]
sync on reset in compalu

3 years agoadd forwarding-bus mode to Regfile Memory (and disable it)
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 16:52:33 +0000 (17:52 +0100)]
add forwarding-bus mode to Regfile Memory (and disable it)

3 years agosync on port interface address in ld/st compunit, and use sync on oper_i
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 15:49:35 +0000 (16:49 +0100)]
sync on port interface address in ld/st compunit, and use sync on oper_i

3 years agoanother sync to cut latency
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 15:49:07 +0000 (16:49 +0100)]
another sync to cut latency

3 years agoInitial commit of translation of microwatt dcache.vhdl into nmigen
Cole Poirier [Thu, 13 Aug 2020 15:30:27 +0000 (08:30 -0700)]
Initial commit of translation of microwatt dcache.vhdl into nmigen

3 years agoremove latchregister, sync src oper_i into MultiCompUnit
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 14:46:58 +0000 (15:46 +0100)]
remove latchregister, sync src oper_i into MultiCompUnit

3 years agominor tidyup on alu compunit:
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 14:23:34 +0000 (15:23 +0100)]
minor tidyup on alu compunit:
* sync on oper_r because there is time to wait for src reads
* get immediates from op not oper_r
* use rising_edge rather than manual pulse creation

3 years agoplenty of time to wait for operand, so use "sync" in MultiCompUnit
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 12:59:48 +0000 (13:59 +0100)]
plenty of time to wait for operand, so use "sync" in MultiCompUnit

3 years agosigh. convert Fast regfile to binary
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 12:34:36 +0000 (13:34 +0100)]
sigh.  convert Fast regfile to binary

3 years agosync on read of regfile ports
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 11:45:52 +0000 (12:45 +0100)]
sync on read of regfile ports

3 years agosigh. convert INT regfile to binary addressing
Luke Kenneth Casson Leighton [Thu, 13 Aug 2020 11:25:32 +0000 (12:25 +0100)]
sigh.  convert INT regfile to binary addressing

3 years agocreate a RegFileMem class that uses Memory
Luke Kenneth Casson Leighton [Wed, 12 Aug 2020 15:50:03 +0000 (16:50 +0100)]
create a RegFileMem class that uses Memory

3 years agoadd run_sim to Makefile
Jacob Lifshay [Wed, 12 Aug 2020 21:23:58 +0000 (14:23 -0700)]
add run_sim to Makefile

3 years agommu.py add skeleton sim and test functions from regfile/regfile.py
Cole Poirier [Wed, 12 Aug 2020 18:55:20 +0000 (11:55 -0700)]
mmu.py add skeleton sim and test functions from regfile/regfile.py

3 years agoDelete unnecessary mmu dir, move mmu.py out of mmu dir back to
Cole Poirier [Wed, 12 Aug 2020 18:53:51 +0000 (11:53 -0700)]
Delete unnecessary mmu dir, move mmu.py out of mmu dir back to
experiment dir

3 years agoRevert "Remove mmu dir and associated mmu/test/ dir" because I forgot to
Cole Poirier [Wed, 12 Aug 2020 18:52:05 +0000 (11:52 -0700)]
Revert "Remove mmu dir and associated mmu/test/ dir" because I forgot to
add mmu.py to the commit, so it shows deleted instead of renamed/moved

This reverts commit e97b5223a871498a9dd434103b2ecd4a13c06440.

3 years agoRemove mmu dir and associated mmu/test/ dir
Cole Poirier [Wed, 12 Aug 2020 18:45:20 +0000 (11:45 -0700)]
Remove mmu dir and associated mmu/test/ dir

3 years agoRemove rst signals, fix len of hex Consts, fix variable assignment values that didn...
Cole Poirier [Wed, 12 Aug 2020 18:37:13 +0000 (11:37 -0700)]
Remove rst signals, fix len of hex Consts, fix variable assignment values that didn't match mmu.vhdl, fix all vhdl '&' to Cat()'s', fix formatting

3 years agoCreate dir experiment/mmu then mmu/test with skeleton test
Cole Poirier [Wed, 12 Aug 2020 18:34:42 +0000 (11:34 -0700)]
Create dir experiment/mmu then mmu/test with skeleton test
infrastructure copied from fu/mul/test

3 years agommu.py add RecordObject classes from common.vhdl input types https://bugs.libre-soc...
Cole Poirier [Wed, 12 Aug 2020 17:55:14 +0000 (10:55 -0700)]
mmu.py add RecordObject classes from common.vhdl input types https://bugs.libre-soc.org/show_bug.cgi?id=450#c31

3 years agommu.py remove TODOs for vhdl (others => '0') as they are irrelevant in
Cole Poirier [Wed, 12 Aug 2020 17:02:42 +0000 (10:02 -0700)]
mmu.py remove TODOs for vhdl (others => '0') as they are irrelevant in
nmigen

3 years agommu.py fix or(block of logic) to be (block of logic).bool() https://bugs.libre-soc...
Cole Poirier [Wed, 12 Aug 2020 16:51:16 +0000 (09:51 -0700)]
mmu.py fix or(block of logic) to be (block of logic).bool() https://bugs.libre-soc.org/show_bug.cgi?id=450#c31

3 years agommu.py fix length of hex const https://bugs.libre-soc.org/show_bug.cgi?id=450#c31
Cole Poirier [Wed, 12 Aug 2020 16:47:09 +0000 (09:47 -0700)]
mmu.py fix length of hex const https://bugs.libre-soc.org/show_bug.cgi?id=450#c31

3 years agommu.py remove class AddrShifter
Cole Poirier [Wed, 12 Aug 2020 16:45:15 +0000 (09:45 -0700)]
mmu.py remove class AddrShifter

3 years agoFix typo in mmu.py
Cole Poirier [Wed, 12 Aug 2020 00:10:56 +0000 (17:10 -0700)]
Fix typo in mmu.py

3 years agommu.py fix formatting, use Cat() where '&' in mmu.vhdl
Cole Poirier [Tue, 11 Aug 2020 21:48:53 +0000 (14:48 -0700)]
mmu.py fix formatting, use Cat() where '&' in mmu.vhdl

3 years agoinitial version of L0CacheBuffer2
Tobias Platen [Tue, 11 Aug 2020 17:16:47 +0000 (19:16 +0200)]
initial version of L0CacheBuffer2

3 years agosigh, remove yet another int regfile read port
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 14:22:08 +0000 (15:22 +0100)]
sigh, remove yet another int regfile read port

3 years agomassive reduction in gate count by using alternative read/write port mux
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 14:05:27 +0000 (15:05 +0100)]
massive reduction in gate count by using alternative read/write port mux
using Mux followed by or tree-reduce, the large number of read/write
port selection(s) creates a more efficient bus

3 years agoreduce regfile port usage for INT and FAST
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 13:37:51 +0000 (14:37 +0100)]
reduce regfile port usage for INT and FAST

3 years agoprepare write ports to be shared
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 13:32:25 +0000 (14:32 +0100)]
prepare write ports to be shared

3 years agomove write regfile picker creation to new function
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 13:24:50 +0000 (14:24 +0100)]
move write regfile picker creation to new function

3 years agoreduce regfile ports by creating separate STATE regfile
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 13:13:13 +0000 (14:13 +0100)]
reduce regfile ports by creating separate STATE regfile

3 years agowhoops fix change of variable (state) msr/pc
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 12:17:18 +0000 (13:17 +0100)]
whoops fix change of variable (state) msr/pc

3 years agoreducing regfile port usage by sharing read ports
Luke Kenneth Casson Leighton [Tue, 11 Aug 2020 12:07:22 +0000 (13:07 +0100)]
reducing regfile port usage by sharing read ports
gets gate count down considerably

3 years agoWIP!! Make MUL pipeline proof run again.
Samuel A. Falvo II [Mon, 10 Aug 2020 21:17:08 +0000 (14:17 -0700)]
WIP!!  Make MUL pipeline proof run again.

Removed existing set of tests, as they didn't seem to be relevant
(appeared to be copy-and-paste template code).  Next steps is to go
through main_stage.py and implement corresponding proofs.

3 years agoFix typo in mmu.py
Cole Poirier [Mon, 10 Aug 2020 17:45:49 +0000 (10:45 -0700)]
Fix typo in mmu.py

3 years agoFix typo mmu.py
Cole Poirier [Mon, 10 Aug 2020 17:42:21 +0000 (10:42 -0700)]
Fix typo mmu.py

3 years agoGlobal search and replace (^, |), fixes bug 450 comment 11, fix
Cole Poirier [Mon, 10 Aug 2020 16:26:46 +0000 (09:26 -0700)]
Global search and replace (^, |), fixes bug 450 comment 11, fix
formatting

3 years agofix bug 450 comments 8,9,10
Cole Poirier [Mon, 10 Aug 2020 16:17:36 +0000 (09:17 -0700)]
fix bug 450 comments 8,9,10

3 years agoFix bug 450 comment 7
Cole Poirier [Mon, 10 Aug 2020 16:10:51 +0000 (09:10 -0700)]
Fix bug 450 comment 7

3 years agommu.py add line I forgot to translate from mmu.vhdl
Cole Poirier [Mon, 10 Aug 2020 16:05:53 +0000 (09:05 -0700)]
mmu.py add line I forgot to translate from mmu.vhdl

3 years agoMerge branch 'master' of git.libre-soc.org:soc
Cole Poirier [Mon, 10 Aug 2020 01:50:40 +0000 (18:50 -0700)]
Merge branch 'master' of git.libre-soc.org:soc

3 years agommu.vhdl translation to mmu.py 95 percent complete
Cole Poirier [Mon, 10 Aug 2020 01:50:08 +0000 (18:50 -0700)]
mmu.vhdl translation to mmu.py 95 percent complete

3 years agostop combinatorial loop in pi2ls
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 21:33:50 +0000 (22:33 +0100)]
stop combinatorial loop in pi2ls

3 years agowrite pulse in issuer
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 21:25:32 +0000 (22:25 +0100)]
write pulse in issuer

3 years agofix combinatorial loop in ldst compunit
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 21:18:16 +0000 (22:18 +0100)]
fix combinatorial loop in ldst compunit

3 years agouse rising edge detection on st go_i/rel_o
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 18:47:27 +0000 (19:47 +0100)]
use rising edge detection on st go_i/rel_o

3 years agoadd logical test issuer case
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 15:43:48 +0000 (16:43 +0100)]
add logical test issuer case

3 years agoget rid of MSR read combinatorial loop
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 15:25:24 +0000 (16:25 +0100)]
get rid of MSR read combinatorial loop

3 years agodelay go_st by one cycle, break combinatorial loop
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 15:08:58 +0000 (16:08 +0100)]
delay go_st by one cycle, break combinatorial loop

3 years agodivwo case makes test_issuer stay busy!
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 14:20:11 +0000 (15:20 +0100)]
divwo case makes test_issuer stay busy!

3 years agoadd extra divwo regression test
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 14:01:23 +0000 (15:01 +0100)]
add extra divwo regression test

3 years agocompalu combinatorial loop detected
Luke Kenneth Casson Leighton [Sun, 9 Aug 2020 09:57:58 +0000 (10:57 +0100)]
compalu combinatorial loop detected

3 years agoMerge branch 'master' of git.libre-soc.org:soc
Cole Poirier [Sat, 8 Aug 2020 17:58:00 +0000 (10:58 -0700)]
Merge branch 'master' of git.libre-soc.org:soc

3 years agoUpdate test case_mulli
Cole Poirier [Sat, 8 Aug 2020 17:57:37 +0000 (10:57 -0700)]
Update test case_mulli

3 years agoaddr_split.py: shift bytes not bits
Tobias Platen [Sat, 8 Aug 2020 11:54:42 +0000 (13:54 +0200)]
addr_split.py: shift bytes not bits

3 years agoUpdate test case_mulli
Cole Poirier [Fri, 7 Aug 2020 23:50:24 +0000 (16:50 -0700)]
Update test case_mulli

3 years agoUpdate test case_mulli, I think it now works correctly
Cole Poirier [Fri, 7 Aug 2020 01:05:10 +0000 (18:05 -0700)]
Update test case_mulli, I think it now works correctly

3 years agoUpdate mulli to try to use immediates not registers
Cole Poirier [Fri, 7 Aug 2020 00:19:49 +0000 (17:19 -0700)]
Update mulli to try to use immediates not registers

3 years agoFix mmu.py formatting
Cole Poirier [Thu, 6 Aug 2020 19:21:09 +0000 (12:21 -0700)]
Fix mmu.py formatting

3 years agoFix formatting
Cole Poirier [Thu, 6 Aug 2020 18:18:20 +0000 (11:18 -0700)]
Fix formatting

3 years agoInitial commit of translation of microwatt mmu.vhdl into nmigen
Cole Poirier [Thu, 6 Aug 2020 17:53:26 +0000 (10:53 -0700)]
Initial commit of translation of microwatt mmu.vhdl into nmigen

3 years agoMerge branch 'master' of git.libre-soc.org:soc
Cole Poirier [Thu, 6 Aug 2020 17:49:56 +0000 (10:49 -0700)]
Merge branch 'master' of git.libre-soc.org:soc

3 years agoUpdate test case_all_rb_close_to_ov
Cole Poirier [Thu, 6 Aug 2020 17:49:30 +0000 (10:49 -0700)]
Update test case_all_rb_close_to_ov

3 years agoUpdate test case_all_rb_close_to_ov
Cole Poirier [Thu, 6 Aug 2020 17:28:48 +0000 (10:28 -0700)]
Update test case_all_rb_close_to_ov