mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
commit
dd5f69cb78
@ -137,6 +137,27 @@ sudo make install
|
||||
# package manager. Sail has so many dependencies that it can be difficult to install.
|
||||
# This script works for Ubuntu.
|
||||
|
||||
# Alex Solomatnikov found these commands worked to build Sail for Centos 8 on 1/12/24
|
||||
#sudo su -
|
||||
#dnf install ocaml.x86_64
|
||||
#pip3 install z3-solver
|
||||
#wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
|
||||
#sh install.sh
|
||||
#opam init
|
||||
#exit
|
||||
#ocaml -version
|
||||
#opam switch create 5.1.0
|
||||
#eval $(opam config env)
|
||||
#git clone --recurse-submodules git@github.com:riscv/sail-riscv.git
|
||||
#cd sail-riscv
|
||||
#make
|
||||
#ARCH=RV32 make
|
||||
#ARCH=RV64 make
|
||||
#git log -1
|
||||
#cp -p c_emulator/riscv_sim_RV* /tools/sail-riscv/d7a3d8012fd579f40e53a29569141d72dd5e0c32/bin/.
|
||||
|
||||
|
||||
# This was an earlier attemp to prepare to install Sail on RedHat 8
|
||||
# Do these commands only for RedHat / Rocky 8 to build from source.
|
||||
#cd $RISCV
|
||||
#git clone https://github.com/Z3Prover/z3.git
|
||||
|
@ -101,11 +101,16 @@ module alu import cvw::*; #(parameter cvw_t P) (
|
||||
|
||||
// Zicond block
|
||||
if (P.ZICOND_SUPPORTED) begin: zicond
|
||||
logic BZero, KillB;
|
||||
logic BZero;
|
||||
|
||||
assign BZero = (B == 0); // check if rs2 = 0
|
||||
// Create a signal that is 0 when czero.* instruction should clear result
|
||||
// If B = 0 for czero.eqz or if B != 0 for czero.nez
|
||||
assign KillB = BZero & CZero[0] | ~BZero & CZero[1];
|
||||
assign ZeroCondMaskInvB = |CZero ? {P.XLEN{~KillB}} : CondMaskInvB; // extend to full width
|
||||
always_comb
|
||||
case (CZero)
|
||||
2'b01: ZeroCondMaskInvB = {P.XLEN{~BZero}}; // czero.eqz: kill if B = 0
|
||||
2'b10: ZeroCondMaskInvB = {P.XLEN{BZero}}; // czero.nez: kill if B != 0
|
||||
default: ZeroCondMaskInvB = CondMaskInvB; // otherwise normal behavior
|
||||
endcase
|
||||
end else assign ZeroCondMaskInvB = CondMaskInvB; // no masking if Zicond is not supported
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user