Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded support for CFUs. #14

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
054cffc
Changes to build VexRiscv versions with Cfu plugin:
tcal-x Oct 5, 2020
7374fad
Set up wrappers to contain the cpu+cfu.
tcal-x Oct 6, 2020
ae3d1d7
Add 'clk' input to CFU modules.
tcal-x Oct 8, 2020
07a72e2
Add perf count CSRs; rebuild CFU VexRiscv Verilogs.
tcal-x Nov 5, 2020
f022529
Increase to 8 perf counter CSRs; rebuild.
tcal-x Jan 7, 2021
59f011d
Bump both I$, D$ from 4k to 8k.
tcal-x Jan 12, 2021
12ecb67
Bump SpinalHdl/VexRiscv submodules; rebuild; widen CFU funcid port.
tcal-x Feb 19, 2021
9f87086
Delete SpinalHDL submodule.
tcal-x Mar 5, 2021
b6724a2
Rebuild: VexRiscv master w/ cfu fix, Spinal 1.4.3, wide func_id.
tcal-x Mar 6, 2021
767476c
Update CFU instr. encoding to match spec (update vex submodule too).
tcal-x Apr 7, 2021
eafff82
Match CFU spec; function_id now 10b {funct7,funct3}.
tcal-x Apr 7, 2021
c888198
Remove I-format CFU instruction; it impacts timing.
tcal-x Apr 8, 2021
b31d499
Add 'SlimCfu' variants; add missing reset/rst connections.
tcal-x Apr 25, 2021
6db4891
Slim: reduce Icache size to 1kB.
tcal-x Apr 29, 2021
528360a
Rebuild SlimCfu CPUs w/ 1kB Icache.
tcal-x Apr 29, 2021
e78ff1c
Remove wrapper mechanism for VexRiscv/CFU.
tcal-x Jun 3, 2021
aa12b0d
Rebuild Verilogs at hash e78ff1c.
tcal-x Jun 3, 2021
848042f
Add VexRiscv for Fomu -- minimal, plus hard muldiv, plus mcycle.
tcal-x Jun 11, 2021
301554e
Trim Fomu variants by removing alignment etc. checks.
tcal-x Jun 11, 2021
9188280
Tweak the Fomu variant to remove division, debug, and writeback/memor…
JosephBushagour Jul 19, 2021
43e1317
Merge pull request #1 from JosephBushagour/jbushagour_fomu_tweaks
tcal-x Jul 20, 2021
d8ec2d8
Require a memory and writeback stage for the CFU plugin.
JosephBushagour Aug 2, 2021
dc1f9dd
Merge pull request #2 from JosephBushagour/fomu-cfu
tcal-x Aug 2, 2021
9face5f
Add icache, single-cycle-shift, and single-cycle multiply to the Fomu…
JosephBushagour Aug 9, 2021
38f50db
Merge pull request #3 from JosephBushagour/fomu-cfu
tcal-x Aug 9, 2021
5bb9114
New "perf" variant has perfCSRs.
tcal-x Aug 31, 2021
cbb04d3
Rebuild affected verilogs with correct hash comment (5bb9114).
tcal-x Aug 31, 2021
7490bb2
Add slimperf+cfu variant.
tcal-x Sep 16, 2021
593e180
Merge branch 'master' into fomu-cfu-mm2
tcal-x Sep 21, 2021
9f85993
Rebuild Verilogs at 593e180.
tcal-x Sep 21, 2021
6f2afa7
Add 'slim' variant for completeness.
tcal-x Sep 29, 2021
6dfdf25
Rebuild VexRiscv_Slim.v so it has correct hash in comment.
tcal-x Sep 30, 2021
7454d1a
Remove performance CSRs from 'FullCfu' variants.
tcal-x Sep 30, 2021
9a22d43
Rebuild VexRiscv_FullCfu*.v at 7454d1ac.
tcal-x Sep 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "litex/data/cpu/vexriscv/verilog/ext/VexRiscv"]
[submodule "pythondata_cpu_vexriscv/verilog/ext/VexRiscv"]
path = pythondata_cpu_vexriscv/verilog/ext/VexRiscv
url = https://github.com/SpinalHDL/VexRiscv.git
branch = master
34 changes: 0 additions & 34 deletions pythondata_cpu_vexriscv/verilog/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions pythondata_cpu_vexriscv/verilog/.gitmodules

This file was deleted.

33 changes: 30 additions & 3 deletions pythondata_cpu_vexriscv/verilog/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SRC := ${shell find . -type f -name \*.scala}

all: VexRiscv.v VexRiscv_Debug.v VexRiscv_Lite.v VexRiscv_LiteDebug.v VexRiscv_IMAC.v VexRiscv_IMACDebug.v VexRiscv_Min.v VexRiscv_MinDebug.v VexRiscv_Full.v VexRiscv_FullDebug.v VexRiscv_FullCfu.v VexRiscv_FullCfuDebug.v VexRiscv_Linux.v VexRiscv_LinuxDebug.v VexRiscv_LinuxNoDspFmax.v VexRiscv_Secure.v VexRiscv_SecureDebug.v
all: VexRiscv.v VexRiscv_Debug.v VexRiscv_Lite.v VexRiscv_LiteDebug.v VexRiscv_IMAC.v VexRiscv_IMACDebug.v VexRiscv_Min.v VexRiscv_MinDebug.v VexRiscv_Full.v VexRiscv_FullDebug.v VexRiscv_FullCfu.v VexRiscv_FullCfuDebug.v VexRiscv_Linux.v VexRiscv_LinuxDebug.v VexRiscv_LinuxNoDspFmax.v VexRiscv_Secure.v VexRiscv_SecureDebug.v VexRiscv_SlimCfu.v VexRiscv_SlimCfuDebug.v VexRiscv_Fomu.v VexRiscv_FomuCfu.v VexRiscv_PerfCfu.v VexRiscv_PerfCfuDebug.v VexRiscv_SlimPerfCfu.v VexRiscv_SlimPerfCfuDebug.v

VexRiscv.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault"
Expand All @@ -26,17 +26,44 @@ VexRiscv_Min.v: $(SRC)
VexRiscv_MinDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault -d --iCacheSize 0 --dCacheSize 0 --mulDiv false --singleCycleShift false --singleCycleMulDiv false --bypass false --prediction none --outputFile VexRiscv_MinDebug"

VexRiscv_Fomu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --safe false --iCacheSize 2048 --dCacheSize 0 --csrPluginConfig mcycle --mulDiv true --singleCycleShift true --singleCycleMulDiv true --bypass false --prediction none --hardwareDiv false --outputFile VexRiscv_Fomu"

VexRiscv_FomuCfu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --safe false --cfu true --iCacheSize 2048 --dCacheSize 0 --csrPluginConfig mcycle --mulDiv true --singleCycleShift true --singleCycleMulDiv true --bypass false --prediction none --hardwareDiv false --outputFile VexRiscv_FomuCfu"

VexRiscv_Full.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --csrPluginConfig all --outputFile VexRiscv_Full"

VexRiscv_FullDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --csrPluginConfig all -d --outputFile VexRiscv_FullDebug"

VexRiscv_FullCfu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --csrPluginConfig all --cfu true --outputFile VexRiscv_FullCfu"
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 8192 --iCacheSize 8192 --csrPluginConfig all --cfu true --outputFile VexRiscv_FullCfu"

VexRiscv_FullCfuDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --csrPluginConfig all --cfu true -d --outputFile VexRiscv_FullCfuDebug"
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 8192 --iCacheSize 8192 --csrPluginConfig all -d --cfu true --outputFile VexRiscv_FullCfuDebug"

VexRiscv_PerfCfu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 8192 --iCacheSize 8192 --csrPluginConfig all --cfu true --perfCSRs 8 --outputFile VexRiscv_PerfCfu"

VexRiscv_PerfCfuDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 8192 --iCacheSize 8192 --csrPluginConfig all -d --cfu true --perfCSRs 8 --outputFile VexRiscv_PerfCfuDebug"

VexRiscv_Slim.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 4096 --iCacheSize 2048 --csrPluginConfig all --outputFile VexRiscv_Slim"

VexRiscv_SlimCfu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 4096 --iCacheSize 2048 --csrPluginConfig all --cfu true --outputFile VexRiscv_SlimCfu"

VexRiscv_SlimCfuDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 4096 --iCacheSize 2048 --csrPluginConfig all -d --cfu true --outputFile VexRiscv_SlimCfuDebug"

VexRiscv_SlimPerfCfu.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 4096 --iCacheSize 2048 --csrPluginConfig all --cfu true --perfCSRs 8 --outputFile VexRiscv_SlimPerfCfu"

VexRiscv_SlimPerfCfuDebug.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --dCacheSize 4096 --iCacheSize 2048 --csrPluginConfig all -d --cfu true --perfCSRs 8 --outputFile VexRiscv_SlimPerfCfuDebug"

VexRiscv_Linux.v: $(SRC)
sbt compile "runMain vexriscv.GenCoreDefault --csrPluginConfig linux-minimal --outputFile VexRiscv_Linux"
Expand Down
10 changes: 10 additions & 0 deletions pythondata_cpu_vexriscv/verilog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ src/main/scala/vexriscv GenCoreDefault.scala
- Available in normal an -Debug, with the Debug bus exposed


## Changes in `tcal-x`'s fork
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs fixing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely.


- Now submodule ext/VexRiscv uses tip of `dev` branch
- Added ext/SpinalHDL submodule, also `dev` branch
- Modified `build.sbt` to bring up to date with current `dev` VexRiscv
- Modified `src/main/scala/vexriscv/GenCoreDefault.scala` to add a `--cfu` option, to add the CFU interface
- Added `VexRiscv_FullCfu.v` and `VexRiscv_FullCfuDebug.v` (and yamls), and updated `Makefile` to build them
- I did **not** rebuild the other .v/.yaml files


## Requirements

- Java 8
Expand Down
2 changes: 1 addition & 1 deletion pythondata_cpu_vexriscv/verilog/VexRiscv.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generator : SpinalHDL v1.6.0 git head : 73c8d8e2b86b45646e9d0b2e729291f2b65e6be3
// Component : VexRiscv
// Git hash : 6276bf628be9d0a58c0284dca83137b71ef29098
// Git hash : 593e180abf5ba39e7fa33d4f371646453f84496a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't change anything in this file, but hash. This looks weird



`define EnvCtrlEnum_binary_sequential_type [1:0]
Expand Down
2 changes: 1 addition & 1 deletion pythondata_cpu_vexriscv/verilog/VexRiscv_Debug.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generator : SpinalHDL v1.6.0 git head : 73c8d8e2b86b45646e9d0b2e729291f2b65e6be3
// Component : VexRiscv
// Git hash : 6276bf628be9d0a58c0284dca83137b71ef29098
// Git hash : 593e180abf5ba39e7fa33d4f371646453f84496a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't change anything in this file, but hash. This looks weird



`define EnvCtrlEnum_binary_sequential_type [1:0]
Expand Down
Loading