forked from Github_Repos/cvw
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
8a4637bd31
42
README.md
42
README.md
@ -7,39 +7,55 @@ Wally is a 5-stage pipelined processor configurable to support all the standard
|
||||
|
||||
Wally is described in a textbook, RISC-V System-on-Chip Design, by Harris, Stine, Thompson, and Harris. Users should follow the setup instructions below. A system administrator must install CAD tools using the directions further down.
|
||||
|
||||
# New User Setup
|
||||
|
||||
New users may wish to do the following setup to access the server via a GUI and use a text editor.
|
||||
|
||||
Download and install x2go - A.1.1
|
||||
Download and install VSCode - A.4.2
|
||||
Make sure you can log into Tera acceptly via x2go and via a terminal
|
||||
Optional: Download and install x2go - A.1.1
|
||||
Optional: Download and install VSCode - A.4.2
|
||||
Optional: Make sure you can log into your server via x2go and via a terminal
|
||||
Terminal on Mac, cmd on Windows, xterm on Linux
|
||||
See A.1 about ssh -Y login from a terminal
|
||||
Git started with Git configuration and authentication: B.1
|
||||
$ git config --global user.name ″Ben Bitdiddle″
|
||||
$ git config --global user.email ″ben_bitdiddle@wally.edu″
|
||||
$ git config --global pull.rebase false
|
||||
|
||||
Then follow Section 2.2 to clone the repo, source setup, make the tests and run regression
|
||||
Then clone the repo, source setup, make the tests and run regression
|
||||
|
||||
If you don't already have a Github account, create one
|
||||
In a web browser, visit https://github.com/openhwgroup/cvw
|
||||
In the upper right part of the screen, click on Fork
|
||||
Create a fork, choosing the owner as your github account and the repository as cvw.
|
||||
|
||||
On the Linux computer where you will be working, log in, clone your fork of the repo,
|
||||
run the setup script, and build the tests:
|
||||
On the Linux computer where you will be working, log in
|
||||
|
||||
Add the following lines to your .bashrc or .bash_profile to run the setup script each time you log in.
|
||||
|
||||
if [ -f ~/cvw/setup.sh ]; then
|
||||
source ~/cvw/setup.sh
|
||||
fi
|
||||
|
||||
Clone your fork of the repo, run the setup script, and build the tests:
|
||||
|
||||
$ cd
|
||||
$ git clone --recurse-submodules https://github.com/<yourgithubid>/cvw
|
||||
$ cd cvw
|
||||
$ source ./setup.sh
|
||||
$ make
|
||||
|
||||
Edit setup.sh and change the following lines to point to the path and license server for your Siemens Questa and Synopsys Design Compiler installation and license server. If you only have Questa, you can still simulate but cannot run logic synthesis.
|
||||
|
||||
export MGLS_LICENSE_FILE=1717@solidworks.eng.hmc.edu # Change this to your Siemens license server
|
||||
export SNPSLMD_LICENSE_FILE=27020@zircon.eng.hmc.edu # Change this to your Synopsys license server
|
||||
export QUESTAPATH=/cad/mentor/questa_sim-2021.2_1/questasim/bin # Change this for your path to Questa
|
||||
export SNPSPATH=/cad/synopsys/SYN/bin # Change this for your path to Design Compiler
|
||||
|
||||
Run a regression simulation with Questa to prove everything is installed.
|
||||
|
||||
$ cd pipelined/regression
|
||||
$ ./regression-wally (depends on having Questa installed)
|
||||
|
||||
Add the following lines to your .bashrc or .bash_profile
|
||||
|
||||
if [ -f ~/cvw/setup.sh ]; then
|
||||
source ~/cvw/setup.sh
|
||||
fi
|
||||
|
||||
# Tool-chain Installation (Sys Admin)
|
||||
|
||||
This section describes the open source toolchain installation. These steps should only be done once by the system admin.
|
||||
@ -49,7 +65,7 @@ This section describes the open source toolchain installation. These steps shou
|
||||
The full instalation details are involved can be be skipped using the following script, wally-tool-chain-install.sh.
|
||||
The script installs the open source tools to /opt/riscv by default. This can be changed by supply the path as the first argument. This script does not install buildroot (see the Detailed Tool-chain Install Guide in the following section) and does not install commercial EDA tools; Siemens Questa, Synopsys Design Compiler, or Cadence Innovus (see section Installing IDA Tools). It must be run as root or with sudo. This script is tested for Ubuntu, 20.04 and 22.04. Fedora and Red Hat can be installed in the Detailed Tool-chain Install Guide.
|
||||
|
||||
$ wally-tool-chain-install.sh <optional, install directory, defaults to /opt/riscv>
|
||||
$ sudo wally-tool-chain-install.sh <optional, install directory, defaults to /opt/riscv>
|
||||
|
||||
## Detailed Tool-chain Install Guide
|
||||
|
||||
|
@ -1,136 +0,0 @@
|
||||
// V. G. Oklobdzija, "Algorithmic design of a hierarchical and modular
|
||||
// leading zero detector circuit," in Electronics Letters, vol. 29,
|
||||
// no. 3, pp. 283-284, 4 Feb. 1993, doi: 10.1049/el:19930193.
|
||||
|
||||
module lz2 (P, V, B0, B1);
|
||||
|
||||
input logic B0;
|
||||
input logic B1;
|
||||
|
||||
output logic P;
|
||||
output logic V;
|
||||
|
||||
assign V = B0 | B1;
|
||||
assign P = B0 & ~B1;
|
||||
|
||||
endmodule // lz2
|
||||
|
||||
// Note: This module is not made out of two lz2's - why not? (MJS)
|
||||
|
||||
module lz4 (ZP, ZV, B0, B1, V0, V1);
|
||||
|
||||
output logic [1:0] ZP;
|
||||
output logic ZV;
|
||||
|
||||
input logic B0;
|
||||
input logic B1;
|
||||
input logic V0;
|
||||
input logic V1;
|
||||
|
||||
assign ZP[0] = V0 ? B0 : B1;
|
||||
assign ZP[1] = ~V0;
|
||||
assign ZV = V0 | V1;
|
||||
|
||||
endmodule // lz4
|
||||
|
||||
// Note: This module is not made out of two lz4's - why not? (MJS)
|
||||
|
||||
module lz8 (ZP, ZV, B);
|
||||
|
||||
input logic [7:0] B;
|
||||
|
||||
output logic [2:0] ZP;
|
||||
output logic ZV;
|
||||
|
||||
logic s1p0;
|
||||
logic s1v0;
|
||||
logic s1p1;
|
||||
logic s1v1;
|
||||
logic s2p0;
|
||||
logic s2v0;
|
||||
logic s2p1;
|
||||
logic s2v1;
|
||||
logic [1:0] ZPa;
|
||||
logic [1:0] ZPb;
|
||||
logic ZVa;
|
||||
logic ZVb;
|
||||
|
||||
lz2 l1(s1p0, s1v0, B[2], B[3]);
|
||||
lz2 l2(s1p1, s1v1, B[0], B[1]);
|
||||
lz4 l3(ZPa, ZVa, s1p0, s1p1, s1v0, s1v1);
|
||||
|
||||
lz2 l4(s2p0, s2v0, B[6], B[7]);
|
||||
lz2 l5(s2p1, s2v1, B[4], B[5]);
|
||||
lz4 l6(ZPb, ZVb, s2p0, s2p1, s2v0, s2v1);
|
||||
|
||||
assign ZP[1:0] = ZVb ? ZPb : ZPa;
|
||||
assign ZP[2] = ~ZVb;
|
||||
assign ZV = ZVa | ZVb;
|
||||
|
||||
endmodule // lz8
|
||||
|
||||
module lz16 (ZP, ZV, B);
|
||||
|
||||
input logic [15:0] B;
|
||||
|
||||
output logic [3:0] ZP;
|
||||
output logic ZV;
|
||||
|
||||
logic [2:0] ZPa;
|
||||
logic [2:0] ZPb;
|
||||
logic ZVa;
|
||||
logic ZVb;
|
||||
|
||||
lz8 l1(ZPa, ZVa, B[7:0]);
|
||||
lz8 l2(ZPb, ZVb, B[15:8]);
|
||||
|
||||
assign ZP[2:0] = ZVb ? ZPb : ZPa;
|
||||
assign ZP[3] = ~ZVb;
|
||||
assign ZV = ZVa | ZVb;
|
||||
|
||||
endmodule // lz16
|
||||
|
||||
module lz32 (ZP, ZV, B);
|
||||
|
||||
input logic [31:0] B;
|
||||
|
||||
output logic [4:0] ZP;
|
||||
output logic ZV;
|
||||
|
||||
logic [3:0] ZPa;
|
||||
logic [3:0] ZPb;
|
||||
logic ZVa;
|
||||
logic ZVb;
|
||||
|
||||
lz16 l1(ZPa, ZVa, B[15:0]);
|
||||
lz16 l2(ZPb, ZVb, B[31:16]);
|
||||
|
||||
assign ZP[3:0] = ZVb ? ZPb : ZPa;
|
||||
assign ZP[4] = ~ZVb;
|
||||
assign ZV = ZVa | ZVb;
|
||||
|
||||
endmodule // lz32
|
||||
|
||||
// This module returns the number of leading zeros ZP in the 64-bit
|
||||
// number B. If there are no ones in B, then ZP and ZV are both 0.
|
||||
|
||||
module lz64 (ZP, ZV, B);
|
||||
|
||||
input logic [63:0] B;
|
||||
|
||||
output logic [5:0] ZP;
|
||||
output logic ZV;
|
||||
|
||||
logic [4:0] ZPa;
|
||||
logic [4:0] ZPb;
|
||||
logic ZVa;
|
||||
logic ZVb;
|
||||
|
||||
lz32 l1(ZPa, ZVa, B[31:0]);
|
||||
lz32 l2(ZPb, ZVb, B[63:32]);
|
||||
|
||||
assign ZV = ZVa | ZVb;
|
||||
assign ZP[4:0] = (ZVb ? ZPb : ZPa) & {5{ZV}};
|
||||
assign ZP[5] = ~ZVb & ZV;
|
||||
|
||||
endmodule // lz64
|
@ -47,7 +47,7 @@ module wallypipelinedcore (
|
||||
output logic [3:0] HPROT,
|
||||
output logic [1:0] HTRANS,
|
||||
output logic HMASTLOCK
|
||||
);
|
||||
);
|
||||
|
||||
logic StallF, StallD, StallE, StallM, StallW;
|
||||
logic FlushD, FlushE, FlushM, FlushW;
|
||||
|
Loading…
Reference in New Issue
Block a user