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

VCS #677

Closed
wants to merge 149 commits into from
Closed

VCS #677

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
3168859
updated install tool chain file to use verilator v5.016
Thomas-J-Kidd Jan 5, 2024
981c3cc
updated gitignore file
Thomas-J-Kidd Jan 5, 2024
ea8f424
merged script install file
Thomas-J-Kidd Jan 5, 2024
d09e0b1
Updating from main cvw repository
Thomas-J-Kidd Jan 10, 2024
1839580
Merging and hopefully tests can be made without errorsMerge branch 'm…
Thomas-J-Kidd Jan 11, 2024
14a0004
mergingMerge branch 'main' of github.com:Thomas-J-Kidd/cvw
Thomas-J-Kidd Jan 16, 2024
7871b1a
mergingMerge branch 'main' of github.com:Thomas-J-Kidd/cvw
Thomas-J-Kidd Jan 22, 2024
9165541
merging
Thomas-J-Kidd Jan 25, 2024
8d9f520
adding nightly tests
Thomas-J-Kidd Jan 31, 2024
7c3ea51
Merge branch 'main' of github.com:Thomas-J-Kidd/cvw
Thomas-J-Kidd Jan 31, 2024
942a280
reverted the verilator checkout to checkout master
Thomas-J-Kidd Jan 31, 2024
85f214a
Revert "reverted the verilator checkout to checkout master"
Thomas-J-Kidd Feb 1, 2024
590f53f
Revert "updated gitignore file"
Thomas-J-Kidd Feb 1, 2024
735785d
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Feb 1, 2024
d2e606b
Revert "updated install tool chain file to use verilator v5.016"
Thomas-J-Kidd Feb 1, 2024
78db8c5
Revert "updated gitignore file"
Thomas-J-Kidd Feb 1, 2024
6398705
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Feb 12, 2024
190ef91
Replacing nightly_build folder with nightly_build.py and bash wrapper…
Thomas-J-Kidd Feb 13, 2024
484613f
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Feb 13, 2024
0cc0cde
initial seed of AES engine
stineje Feb 21, 2024
488583a
minor tweak
stineje Feb 21, 2024
93d9bb4
minor changes + date change on copyright
stineje Feb 21, 2024
2cf1d43
add aes instructions
stineje Feb 21, 2024
38348f9
Add SHA instructions
stineje Feb 21, 2024
32be225
add kmu instruction
stineje Feb 21, 2024
f700b7d
separate galois function SV per the style file
stineje Feb 21, 2024
3d65ea7
separate aes_shiftword per style file
stineje Feb 21, 2024
ac9068d
update aes_common with style on separate sv
stineje Feb 21, 2024
7097b17
update aes_instructions
stineje Feb 21, 2024
7cb170c
update on aes_instructions
stineje Feb 21, 2024
550f50d
Modify ALU to handle Zkne/K extension
stineje Feb 22, 2024
171da97
add config for K extensions (7 so far)
stineje Feb 22, 2024
c8468e9
slight tweak of names
stineje Feb 22, 2024
cdd2aa6
tweak of names
stineje Feb 22, 2024
4c84b9d
updated nightly build, but ran into buildroot errors
Thomas-J-Kidd Feb 23, 2024
e06bafe
Add alu + controller
stineje Feb 25, 2024
50cbe54
Add datapath.sv
stineje Feb 25, 2024
cd2a9b8
Add mux7 for K ext
stineje Feb 25, 2024
71cefdb
main cvw module
stineje Feb 25, 2024
ce975a6
Add ieu main module for k extension
stineje Feb 25, 2024
eb1780a
control for bitmanip
stineje Feb 25, 2024
0d4d996
add spike riscof items for K extension test
stineje Feb 25, 2024
01c45ab
Fixed K extension changes
KelvinTr Feb 28, 2024
88d93b3
Combined byteop and revop logic
KelvinTr Feb 29, 2024
e40ae12
Combined ZBC and ZBKC into one unit
KelvinTr Feb 29, 2024
9f53c54
Optimized Zbkx
KelvinTr Feb 29, 2024
c110d0b
Optimized Zbkx
KelvinTr Feb 29, 2024
c163069
Optimized mixcolumn
KelvinTr Mar 4, 2024
9ccc93f
over rides TIMEOUT on -nightly tag for regression since buildroot is …
Thomas-J-Kidd Mar 5, 2024
b2d0f71
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Mar 5, 2024
e6ffde6
fix module name to lc
stineje Mar 5, 2024
0d7ea36
fix module name to lc in aes_instructions
stineje Mar 5, 2024
7bbc641
fix spacing in sha_instructions for style
stineje Mar 5, 2024
5e247b9
fix some spacing in aes_common
stineje Mar 5, 2024
5aab40a
Missed some style module declarations
stineje Mar 5, 2024
6894ee4
Separate gm2.sv to be separate module
stineje Mar 5, 2024
5b44594
style file slight mods for sha_instructions
stineje Mar 5, 2024
22947e5
udpated readme by adding how to add crontab section
Thomas-J-Kidd Mar 5, 2024
baa29ea
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Mar 5, 2024
00b6139
Optimized Inverse Mixcolumn
KelvinTr Mar 5, 2024
b1830b1
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Mar 6, 2024
2c6588d
Timinig optimization for radix 4 division, added missing derived config
davidharrishmc Mar 6, 2024
eb87a4a
UM comments in fdivsqrtotfc
davidharrishmc Mar 6, 2024
24dffa3
Yay. David and I got our first Quad load/store instructions working!
rosethompson Mar 7, 2024
1872966
Progress.
rosethompson Mar 7, 2024
a85ace8
Sold progress towards a decent q test.
rosethompson Mar 7, 2024
402d71e
Added basic Quad testing.
rosethompson Mar 7, 2024
7f28c9d
Merge pull request #656 from ross144/main
davidharrishmc Mar 7, 2024
e870e81
Finished Wally rvvi tracer.
rosethompson Mar 8, 2024
f815d56
Fix typo in Makefile.
Mar 8, 2024
c71cafb
Add linux/buildroot to .gitignore to ignore the intermediate built fo…
Mar 8, 2024
6bf2f16
Merge pull request #660 from Karl-Han/update_gitignore
rosethompson Mar 9, 2024
f7fa1cd
Merge pull request #657 from ross144/main
davidharrishmc Mar 9, 2024
8821386
update removal of underscores from aes_common
stineje Mar 9, 2024
08c7ddd
update removal of underscores from aes_instructions
stineje Mar 9, 2024
4addee0
updated nightly runs with try statement in email sending
Thomas-J-Kidd Mar 9, 2024
26f75b6
Merge branch 'main' of github.com:Thomas-J-Kidd/cvw
Thomas-J-Kidd Mar 9, 2024
0e3341c
added argstrings to make it a better CLI tool
Thomas-J-Kidd Mar 9, 2024
3b16238
update removal of underscores from sha_instructions
stineje Mar 10, 2024
55e019c
update removal of underscores from kmu
stineje Mar 10, 2024
bd5741b
fix space at beginning of file in bmu
stineje Mar 10, 2024
d3b1ce4
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Mar 10, 2024
0caed8f
undo changing TIMEOUT duration for regression-wally
Thomas-J-Kidd Mar 10, 2024
c8df291
updated nightly runs with try statement in email sending
Thomas-J-Kidd Mar 9, 2024
ad12def
fix underscore in instantiation
stineje Mar 10, 2024
1aa1608
fix space in kmu
stineje Mar 10, 2024
7f65718
fixed documentation typo
Thomas-J-Kidd Mar 10, 2024
ac3aa82
fix underscore in bmu directory
stineje Mar 10, 2024
1573c89
Update bitmanipalu.sv for K extension
stineje Mar 10, 2024
54fec7c
fix bitmanipalu.sv typo on missing semicolon
stineje Mar 10, 2024
047291e
add header for bmuctrl.sv
stineje Mar 10, 2024
3cf6a19
Merge branch 'main' into main
rosethompson Mar 10, 2024
93d9af6
Merge pull request #640 from stineje/main
rosethompson Mar 10, 2024
93455e8
Added arch64i tests for fp configs
davidharrishmc Mar 11, 2024
39ca709
Merged AES changes
davidharrishmc Mar 11, 2024
34058dd
Crypto formatting cleanup
davidharrishmc Mar 11, 2024
e4724b8
Crypto formatting cleanup
davidharrishmc Mar 11, 2024
ea6846f
Crypto commenting cleanup
davidharrishmc Mar 11, 2024
955c131
Crypto rename inputs and outputs to a and y
davidharrishmc Mar 11, 2024
d0dd308
ZK simplification
davidharrishmc Mar 11, 2024
837abf1
ZK simplifcations
davidharrishmc Mar 11, 2024
2580d37
ZK cleanup, check no LLEN > XLEN without D$, add half and quad float …
davidharrishmc Mar 11, 2024
9a1fdba
Added more Zbkb tests shared with Zbb
davidharrishmc Mar 11, 2024
3d72cca
AES simplification
davidharrishmc Mar 11, 2024
f72e504
Defined rotate module and formatted AES modules more densely
davidharrishmc Mar 11, 2024
f950067
Shared middle and final round aes32 to cut size 50%
davidharrishmc Mar 11, 2024
b53e873
shared hardware for AES 64 decode
davidharrishmc Mar 11, 2024
d22306a
Shared haredware for aes64e
davidharrishmc Mar 11, 2024
7ee3145
Simplified muxing for AES64
davidharrishmc Mar 11, 2024
5257d3d
AES64 cleanup
davidharrishmc Mar 11, 2024
ef89679
Optimized out aes64im hardware; sharing with aes64d
davidharrishmc Mar 11, 2024
87ed778
Starting to merge decrypt and encrypt for AES64
davidharrishmc Mar 11, 2024
7d87c4f
AES64 simplification
davidharrishmc Mar 11, 2024
64d7f77
AES64 simplification
davidharrishmc Mar 11, 2024
b7f5ce6
AES64 simplification
davidharrishmc Mar 11, 2024
39c0d0c
AES64 simplification
davidharrishmc Mar 11, 2024
10d1ff6
Merged ZKNDEResult into a single BMU result mux input
davidharrishmc Mar 11, 2024
a714904
Simplifying AES32 logic
davidharrishmc Mar 11, 2024
8af25a4
AES32 sharing logic
davidharrishmc Mar 11, 2024
096f409
Final cleanup tonight
davidharrishmc Mar 11, 2024
019458a
Shared sbox between aes64ks1i and aes64e
davidharrishmc Mar 11, 2024
dbfe44a
Renamed aes and sha directories
davidharrishmc Mar 11, 2024
7132d30
Simplified ZKNH64
davidharrishmc Mar 11, 2024
ef2c003
Merge pull request #663 from davidharrishmc/dev
rosethompson Mar 11, 2024
55863bd
Update K extension in SHA to remove redundant logic and optimize hier…
stineje Mar 12, 2024
d11afcf
Merge pull request #666 from stineje/main
davidharrishmc Mar 12, 2024
41ab94c
fix elements forgot to delete from zknh32.sv
stineje Mar 12, 2024
4695418
Merge pull request #667 from stineje/main
davidharrishmc Mar 12, 2024
640dae6
System independent setup.sh file
rosethompson Mar 12, 2024
c027fd3
Added site-setup.csh for cshell systems.
rosethompson Mar 12, 2024
f642043
Fixed typos in site-setup.csh.
rosethompson Mar 12, 2024
700dfcc
Merge pull request #668 from ross144/site-setup
davidharrishmc Mar 12, 2024
a459f70
Merge pull request #669 from Karl-Han/fix_makefile_typo
rosethompson Mar 13, 2024
32763ab
Merge branch 'openhwgroup:main' into main
Thomas-J-Kidd Mar 13, 2024
e568f93
typo fixes
Thomas-J-Kidd Mar 13, 2024
b5419cc
Increase number of jobs in riscof to speedup building.
Mar 13, 2024
5e3ff3e
Merge pull request #671 from Karl-Han/increase_riscof_jobs
davidharrishmc Mar 13, 2024
90026a5
showing commands used for executing each specific test
Thomas-J-Kidd Mar 14, 2024
7ed2d0c
typo fix for displaying commands in email
Thomas-J-Kidd Mar 14, 2024
efc1d66
Merge pull request #673 from Thomas-J-Kidd/main
davidharrishmc Mar 14, 2024
cbd61d0
fix size of CVTLEN to support fcvtmod.w.d; add max macro to config-sh…
jordancarlin Mar 14, 2024
c3a0310
Merge pull request #674 from jordancarlin/main
davidharrishmc Mar 14, 2024
b476707
add derived configs directory to wally.do
jordancarlin Mar 14, 2024
36e45a0
Merge pull request #675 from jordancarlin/main
davidharrishmc Mar 14, 2024
4c30865
Update VCS Testbench run setup in Makefile
Divya2030 Mar 16, 2024
914a523
Merge remote-tracking branch 'origin/vcs' into vcs
Divya2030 Mar 16, 2024
5993de7
removing empty.sv file
Divya2030 Mar 23, 2024
f2cd1bf
run_vcs.sh script
Divya2030 Mar 23, 2024
c8a5c50
add run_xcellium
Divya2030 Mar 23, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ tests/linux-testgen/buildroot-image-output
tests/linux-testgen/buildroot-config-src/main.config.old
tests/linux-testgen/buildroot-config-src/linux.config.old
tests/linux-testgen/buildroot-config-src/busybox.config.old
linux/buildroot
linux/testvector-generation/boottrace.S
linux/testvector-generation/boottrace_disasm.log
sim/slack-notifier/slack-webhook-url.txt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ imperasdv:
iter-elf.bash --search ${WALLY}/tests/riscof/work/riscv-arch-test/rv64i_m

coverage:
cd ${WALLY}/sim; ./regresssion-wally -coverage -fp
cd ${WALLY}/sim; ./regression-wally -coverage -fp

benchmarks:
make coremark
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,12 @@ If you want to implement your own version of the chip, your tool and license com
Startups can expect to spend more than $1 million on CAD tools to get a chip to market. Commercial CAD tools are not realistically available to individuals without a university or company connection.


## Adding Cron Job for nightly builds

If you want to add a cronjob you can do the following:
1) `crontab -e`
2) add this code:
```
0 3 * * * BASH_ENV=~/.bashrc bash -l -c "PATH_TO_CVW/cvw/bin/wrapper_nightly_runs.sh > PATH_TO_LOG_FOLDER/cron.log"
```

387 changes: 246 additions & 141 deletions bin/nightly_build.py

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions bin/wrapper_nightly_runs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ date


# Variables
LOG=$HOME/nightly_runs/logs/from_wrapper.log # you can store your log file where you would like
PYTHON_SCRIPT=$HOME/nightly_runs/cvw/bin/ # cvw can be anywhere you would like it. Make sure to point your variable there
SETUP_SCRIPT=$HOME/nightly_runs/cvw/ # cvw can be anywhere you would like it. Make sure to point your variable there
LOG=$HOME/nightly-runs/logs/from_wrapper.log # you can store your log file where you would like
PYTHON_SCRIPT=$HOME/nightly-runs/cvw/bin/ # cvw can be anywhere you would like it. Make sure to point your variable there
SETUP_SCRIPT=$HOME/nightly-runs/cvw/ # cvw can be anywhere you would like it. Make sure to point your variable there



Expand All @@ -20,9 +20,9 @@ pwd

echo "Sourcing setup_host"
source ./setup_host.sh >> $LOG 2>&1
echo "Sourcing setup_tools"

cd $PYTHON_SCRIPT
pwd
echo "Running python file"
python nightly_build.py >> $LOG 2>&1
python nightly_build.py --path "nightly-runs" --repository "https://github.com/openhwgroup/cvw" --target "all" --send_email "yes" >> $LOG 2>&1
echo "Finished"
4 changes: 4 additions & 0 deletions config/derivlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ deriv fd_rv64gc rv64gc
MISA (32'h00000104 | 1 << 5 | 1 << 3 | 1 << 18 | 1 << 20 | 1 << 12 | 1 << 0)
ZFH_SUPPORTED 0

deriv fdh_rv64gc rv64gc
MISA (32'h00000104 | 1 << 5 | 1 << 3 | 1 << 18 | 1 << 20 | 1 << 12 | 1 << 0)
ZFH_SUPPORTED 1

deriv fdq_rv64gc rv64gc
MISA (32'h00000104 | 1 << 5 | 1 << 3 | 1 << 16 | 1 << 18 | 1 << 20 | 1 << 12 | 1 << 0)
ZFH_SUPPORTED 0
Expand Down
9 changes: 9 additions & 0 deletions config/rv32e/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 0;
localparam ZBKC_SUPPORTED = 0;
localparam ZBKX_SUPPORTED = 0;
localparam ZKNE_SUPPORTED = 0;
localparam ZKND_SUPPORTED = 0;
localparam ZK_SUPPORTED = 0;
localparam ZKNH_SUPPORTED = 0;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
9 changes: 9 additions & 0 deletions config/rv32gc/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 1;
localparam ZBKC_SUPPORTED = 1;
localparam ZBKX_SUPPORTED = 1;
localparam ZKND_SUPPORTED = 1;
localparam ZKNE_SUPPORTED = 1;
localparam ZKNH_SUPPORTED = 1;
localparam ZK_SUPPORTED = 1;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
9 changes: 9 additions & 0 deletions config/rv32i/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 0;
localparam ZBKC_SUPPORTED = 0;
localparam ZBKX_SUPPORTED = 0;
localparam ZKNE_SUPPORTED = 0;
localparam ZKND_SUPPORTED = 0;
localparam ZK_SUPPORTED = 0;
localparam ZKNH_SUPPORTED = 0;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
9 changes: 9 additions & 0 deletions config/rv32imc/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 0;
localparam ZBKC_SUPPORTED = 0;
localparam ZBKX_SUPPORTED = 0;
localparam ZKNE_SUPPORTED = 0;
localparam ZKND_SUPPORTED = 0;
localparam ZK_SUPPORTED = 0;
localparam ZKNH_SUPPORTED = 0;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
9 changes: 9 additions & 0 deletions config/rv64gc/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 1;
localparam ZBKC_SUPPORTED = 1;
localparam ZBKX_SUPPORTED = 1;
localparam ZKND_SUPPORTED = 1;
localparam ZKNE_SUPPORTED = 1;
localparam ZKNH_SUPPORTED = 1;
localparam ZK_SUPPORTED = 1;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
9 changes: 9 additions & 0 deletions config/rv64i/config.vh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ localparam ZCA_SUPPORTED = 0;
localparam ZCF_SUPPORTED = 0;
localparam ZCD_SUPPORTED = 0;

// K extension instructions
localparam ZBKB_SUPPORTED = 0;
localparam ZBKC_SUPPORTED = 0;
localparam ZBKX_SUPPORTED = 0;
localparam ZKNE_SUPPORTED = 0;
localparam ZKND_SUPPORTED = 0;
localparam ZK_SUPPORTED = 0;
localparam ZKNH_SUPPORTED = 0;

// Memory synthesis configuration
localparam USE_SRAM = 0;

Expand Down
13 changes: 9 additions & 4 deletions config/shared/config-shared.vh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//max function
`define max(a,b) (((a) > (b)) ? (a) : (b))

// constants defining different privilege modes
// defined in Table 1.1 of the privileged spec
localparam M_MODE = (2'b11);
Expand Down Expand Up @@ -29,6 +32,7 @@ localparam D_SUPPORTED = ((MISA >> 3) % 2 == 1);
localparam E_SUPPORTED = ((MISA >> 4) % 2 == 1);
localparam F_SUPPORTED = ((MISA >> 5) % 2 == 1);
localparam I_SUPPORTED = ((MISA >> 8) % 2 == 1);
localparam K_SUPPORTED = ((ZBKB_SUPPORTED | ZBKC_SUPPORTED | ZBKX_SUPPORTED | ZKND_SUPPORTED | ZKNE_SUPPORTED | ZKNH_SUPPORTED));
localparam M_SUPPORTED = ((MISA >> 12) % 2 == 1);
localparam Q_SUPPORTED = ((MISA >> 16) % 2 == 1);
localparam S_SUPPORTED = ((MISA >> 18) % 2 == 1);
Expand Down Expand Up @@ -106,12 +110,13 @@ localparam DURLEN = $clog2(FPDUR); // enough bi
localparam DIVBLEN = $clog2(DIVb+1); // enough bits to count number of fractional bits + 1 integer bit

// largest length in IEU/FPU
localparam CVTLEN = ((NF<XLEN) ? (XLEN) : (NF)); // max(XLEN, NF)
localparam LLEN = (($unsigned(FLEN)<$unsigned(XLEN)) ? ($unsigned(XLEN)) : ($unsigned(FLEN)));
localparam BASECVTLEN = `max(XLEN, NF); // convert length excluding Zfa fcvtmod.w.d
localparam CVTLEN = ZFA_SUPPORTED ? `max(BASECVTLEN, 32'd84) : BASECVTLEN; // fcvtmod.w.d needs at least 32+52 because a double with 52 fractional bits might be into upper bits of 32 bit word
localparam LLEN = `max($unsigned(FLEN), $unsigned(XLEN));
localparam LOGCVTLEN = $unsigned($clog2(CVTLEN+1));
localparam NORMSHIFTSZ = (((CVTLEN+NF+1)>(DIVb + 1 +NF+1) & (CVTLEN+NF+1)>(3*NF+6)) ? (CVTLEN+NF+1) : ((DIVb + 1 +NF+1) > (3*NF+6) ? (DIVb + 1 +NF+1) : (3*NF+6))); // max(CVTLEN+NF+1, DIVb + 1 + NF + 1, 3*NF+6)
localparam NORMSHIFTSZ = `max(`max((CVTLEN+NF+1), (DIVb + 1 + NF + 1)), (3*NF+6));
localparam LOGNORMSHIFTSZ = ($clog2(NORMSHIFTSZ));
localparam CORRSHIFTSZ = (NORMSHIFTSZ-2 > (DIVMINb + 1 + NF)) ? NORMSHIFTSZ-2 : (DIVMINb+1+NF); // max(NORMSHIFTSZ-2, DIVMINb + 1 + NF)
localparam CORRSHIFTSZ = `max((NORMSHIFTSZ-2), (DIVMINb + 1 + NF));


// Disable spurious Verilator warnings
Expand Down
8 changes: 8 additions & 0 deletions config/shared/parameter-defs.vh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ localparam cvw_t P = '{
ZCB_SUPPORTED : ZCB_SUPPORTED,
ZCD_SUPPORTED : ZCD_SUPPORTED,
ZCF_SUPPORTED : ZCF_SUPPORTED,
ZBKB_SUPPORTED: ZBKB_SUPPORTED,
ZBKC_SUPPORTED: ZBKC_SUPPORTED,
ZBKX_SUPPORTED: ZBKX_SUPPORTED,
ZKND_SUPPORTED: ZKND_SUPPORTED,
ZKNE_SUPPORTED: ZKNE_SUPPORTED,
ZKNH_SUPPORTED: ZKNH_SUPPORTED,
ZK_SUPPORTED : ZK_SUPPORTED,
USE_SRAM : USE_SRAM,
M_MODE : M_MODE,
S_MODE : S_MODE,
Expand All @@ -136,6 +143,7 @@ localparam cvw_t P = '{
E_SUPPORTED : E_SUPPORTED,
F_SUPPORTED : F_SUPPORTED,
I_SUPPORTED : I_SUPPORTED,
K_SUPPORTED : K_SUPPORTED,
M_SUPPORTED : M_SUPPORTED,
Q_SUPPORTED : Q_SUPPORTED,
S_SUPPORTED : S_SUPPORTED,
Expand Down
36 changes: 4 additions & 32 deletions setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,20 @@

echo "Executing Wally setup.csh"

# Path to Wally repository
setenv WALLY $PWD
echo '$WALLY set to ' ${WALLY}

# Extend alias which makes extending PATH much easier.
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2;echo Added \!:2 to \!:1'
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1};echo Added \!:2 to \!:1'

# License servers and commercial CAD tool paths
# Must edit these based on your local environment. Ask your sysadmin.
setenv MGLS_LICENSE_FILE [email protected] # Change this to your Siemens license server
setenv SNPSLMD_LICENSE_FILE [email protected] # Change this to your Synopsys license server
setenv QUESTAPATH /cad/mentor/questa_sim-2022.4_2/questasim/bin # Change this for your path to Questa
setenv SNPSPATH /cad/synopsys/SYN/bin # Change this for your path to Design Compiler

# Path to RISC-V Tools
setenv RISCV /opt/riscv # change this if you installed the tools in a different location

# Tools
# Questa and Synopsys
extend PATH $QUESTAPATH
extend PATH $SNPSPATH
# GCC
prepend LD_LIBRARY_PATH $RISCV/riscv-gnu-toolchain/lib
prepend LD_LIBRARY_PATH $RISCV/riscv-gnu-toolchain/riscv64-unknown-elf/lib
extend PATH $RISCV/riscv-gnu-toolchain/bin # GCC tools
extend PATH $RISCV/riscv-gnu-toolchain/riscv64-unknown-elf/bin # GCC tools
# Spike
extend LD_LIBRARY_PATH $RISCV/lib
extend PATH $RISCV/bin
# Path to Wally repository
setenv WALLY $PWD
echo '$WALLY set to ' ${WALLY}
# utility functions in Wally repository
extend PATH $WALLY/bin
# Verilator
extend PATH /usr/local/bin/verilator # Change this for your path to Verilator
# ModelSim/Questa (vsim)
# Note: 2022.1 complains on cache/sram1p1r1w about StoredData cannot be driven by multiple always_ff blocks. Ues 2021.2 for now

# Imperas; put this in if you are using it
#set path = ($RISCV/imperas-riscv-tests/riscv-ovpsim-plus/bin/Linux64 $path)
#setenv LD_LIBRARY_PATH $RISCV/imperas_riscv_tests/riscv-ovpsim-plus/bin/Linux64:$LD_LIBRARY_PATH # remove if no imperas

# Verilator needs a larger stack to simulate CORE-V Wally
limit stacksize unlimited
source $RISCV/site-setup.csh

echo "setup done"
55 changes: 14 additions & 41 deletions setup.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,31 @@

# setup.sh
# [email protected] and [email protected] 1 December 2021
# Set up tools for rvw
# Set up tools for cvw

# optionally have .bashrc or .bash_profile source this file with
#if [ -f ~/cvw/setup.sh ]; then
# source ~/cvw/setup.sh
#fi

# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1

echo "Executing Wally setup.sh"

# Path to RISC-V Tools
export RISCV=/opt/riscv # change this if you installed the tools in a different location

# Path to Wally repository
WALLY=$(dirname ${BASH_SOURCE[0]:-$0})
export WALLY=$(cd "$WALLY" && pwd)
echo \$WALLY set to ${WALLY}

# License servers and commercial CAD tool paths
# Must edit these based on your local environment. Ask your sysadmin.
export [email protected] # Change this to your Siemens license server
export [email protected] # Change this to your Synopsys license server
export QUESTA_HOME=/cad/mentor/questa_sim-2023.4/questasim # Change this for your path to Questa, excluding bin
export SNPS_HOME=/cad/synopsys/SYN # Change this for your path to Design Compiler, excluding bin

# Path to RISC-V Tools
export RISCV=/opt/riscv # change this if you installed the tools in a different location

# Tools
# Questa and Synopsys
export PATH=$QUESTA_HOME/bin:$SNPS_HOME/bin:$PATH
# GCC
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RISCV/riscv-gnu-toolchain/lib:$RISCV/riscv-gnu-toolchain/riscv64-unknown-elf/lib
export PATH=$PATH:$RISCV/riscv-gnu-toolchain/bin:$RISCV/riscv-gnu-toolchain/riscv64-unknown-elf/bin # GCC tools
# Spike
export LD_LIBRARY_PATH=$RISCV/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$RISCV/bin
# utility functions in Wally repository
export PATH=$WALLY/bin:$PATH
# Verilator
export PATH=/usr/local/bin/verilator:$PATH # Change this for your path to Verilator
# ModelSim/Questa (vsim)
# Note: 2022.1 complains on cache/sram1p1r1w about StoredData cannot be driven by multiple always_ff blocks. Ues 2021.2 for now

# Imperas; put this in if you are using it
#export PATH=$RISCV/imperas-riscv-tests/riscv-ovpsim-plus/bin/Linux64:$PATH
#export LD_LIBRARY_PATH=$RISCV/imperas_riscv_tests/riscv-ovpsim-plus/bin/Linux64:$LD_LIBRARY_PATH # remove if no imperas

export IDV=$RISCV/ImperasDV-OpenHW
if [ -e "$IDV" ]; then
# echo "Imperas exists"
export IMPERAS_HOME=$IDV/Imperas
export IMPERAS_PERSONALITY=CPUMAN_DV_ASYNC
export ROOTDIR=~/
source ${IMPERAS_HOME}/bin/setup.sh
setupImperas ${IMPERAS_HOME}
export PATH=$IDV/scripts/cvw:$PATH
fi

# Verilator needs a larger stack to simulate CORE-V Wally
ulimit -s 100000

echo "setup done"
# load site licenses and tool locations
source $RISCV/site-setup.sh

echo "setup done"
Loading