forked from Github_Repos/cvw
editorconfig to specify tabs/spaces. Fixed some tabs. Turn off coverage to speed up simulation
This commit is contained in:
parent
4fd461e520
commit
dce6d33531
5
.editorconfig
Normal file
5
.editorconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[src/**.sv]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
@ -32,6 +32,9 @@ if {$2 eq "ahb"} {
|
|||||||
}
|
}
|
||||||
vlib wkdir/work_${1}_${2}
|
vlib wkdir/work_${1}_${2}
|
||||||
}
|
}
|
||||||
|
# Create directory for coverage data
|
||||||
|
mkdir -p cov
|
||||||
|
|
||||||
# compile source files
|
# compile source files
|
||||||
# suppress spurious warnngs about
|
# suppress spurious warnngs about
|
||||||
# "Extra checking for conflicts with always_comb done at vopt time"
|
# "Extra checking for conflicts with always_comb done at vopt time"
|
||||||
@ -80,7 +83,8 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
|||||||
vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583 -suppress 7063,2596,13286
|
vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583 -suppress 7063,2596,13286
|
||||||
# start and run simulation
|
# start and run simulation
|
||||||
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
||||||
vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G TEST=$2 -o testbenchopt
|
vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G TEST=$2 -o testbenchopt +cover=sbectf
|
||||||
|
# vsim -lib wkdir/work_${1}_${2} testbenchopt -fatal 7 -suppress 3829 -coverage
|
||||||
vsim -lib wkdir/work_${1}_${2} testbenchopt -fatal 7 -suppress 3829
|
vsim -lib wkdir/work_${1}_${2} testbenchopt -fatal 7 -suppress 3829
|
||||||
# Adding coverage increases runtime from 2:00 to 4:29. Can't run it all the time
|
# Adding coverage increases runtime from 2:00 to 4:29. Can't run it all the time
|
||||||
#vopt work_$2.testbench -work work_$2 -o workopt_$2 +cover=sbectf
|
#vopt work_$2.testbench -work work_$2 -o workopt_$2 +cover=sbectf
|
||||||
@ -91,6 +95,12 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
|||||||
# power off -r /dut/core/*
|
# power off -r /dut/core/*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
coverage save -instance /testbench/dut cov/${1}_${2}.ucdb
|
||||||
|
#vcover merge -out cov/cov.ucdb cov/rv*.ucdb
|
||||||
|
#vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb -logfile cov/log
|
||||||
|
|
||||||
|
#vcover merge -out cov/cov.ucdb cov
|
||||||
|
#vcover report cov/cov.ucdb > cov/rpt
|
||||||
#coverage report -file wally-coverage.txt
|
#coverage report -file wally-coverage.txt
|
||||||
# These aren't doing anything helpful
|
# These aren't doing anything helpful
|
||||||
#coverage report -memory
|
#coverage report -memory
|
||||||
|
@ -69,6 +69,6 @@ module fdivsqrtexpcalc(
|
|||||||
assign SExp = {SXExp[`NE+1], SXExp[`NE+1:1]} + {2'b0, Bias};
|
assign SExp = {SXExp[`NE+1], SXExp[`NE+1:1]} + {2'b0, Bias};
|
||||||
|
|
||||||
// correct exponent for subnormal input's normalization shifts
|
// correct exponent for subnormal input's normalization shifts
|
||||||
assign DExp = ({2'b0, Xe} - {{(`NE+1-`DIVBLEN){1'b0}}, ell} - {2'b0, Ye} + {{(`NE+1-`DIVBLEN){1'b0}}, m} + {3'b0, Bias}) & {`NE+2{~XZero}};
|
assign DExp = ({2'b0, Xe} - {{(`NE+1-`DIVBLEN){1'b0}}, ell} - {2'b0, Ye} + {{(`NE+1-`DIVBLEN){1'b0}}, m} + {3'b0, Bias}) & {`NE+2{~XZero}}; // *** why Xzero? Is this a hack for postprocessor?
|
||||||
assign Qe = Sqrt ? SExp : DExp;
|
assign Qe = Sqrt ? SExp : DExp;
|
||||||
endmodule
|
endmodule
|
||||||
|
@ -151,7 +151,7 @@ module fdivsqrtpreproc (
|
|||||||
lzc #(`DIVb) lzcY (IFNormLenD, mE);
|
lzc #(`DIVb) lzcY (IFNormLenD, mE);
|
||||||
|
|
||||||
// Normalization shift
|
// Normalization shift
|
||||||
assign XPreproc = IFNormLenX << (ell + {{`DIVBLEN{1'b0}}, 1'b1});
|
assign XPreproc = IFNormLenX << (ell + {{`DIVBLEN{1'b0}}, 1'b1}); // *** try to remove this +1
|
||||||
assign DPreproc = IFNormLenD << (mE + {{`DIVBLEN{1'b0}}, 1'b1});
|
assign DPreproc = IFNormLenD << (mE + {{`DIVBLEN{1'b0}}, 1'b1});
|
||||||
|
|
||||||
// append leading 1 (for normal inputs)
|
// append leading 1 (for normal inputs)
|
||||||
|
@ -32,11 +32,11 @@ module mdu(
|
|||||||
input logic clk, reset,
|
input logic clk, reset,
|
||||||
input logic StallM, StallW,
|
input logic StallM, StallW,
|
||||||
input logic FlushE, FlushM, FlushW,
|
input logic FlushE, FlushM, FlushW,
|
||||||
input logic [`XLEN-1:0] ForwardedSrcAE, ForwardedSrcBE, // inputs A and B from IEU forwarding mux output
|
input logic [`XLEN-1:0] ForwardedSrcAE, ForwardedSrcBE, // inputs A and B from IEU forwarding mux output
|
||||||
input logic [2:0] Funct3E, Funct3M, // type of MDU operation
|
input logic [2:0] Funct3E, Funct3M, // type of MDU operation
|
||||||
input logic IntDivE, W64E, // Integer division/remainder, and W-type instrutions
|
input logic IntDivE, W64E, // Integer division/remainder, and W-type instrutions
|
||||||
output logic [`XLEN-1:0] MDUResultW, // multiply/divide result
|
output logic [`XLEN-1:0] MDUResultW, // multiply/divide result
|
||||||
output logic DivBusyE // busy signal to stall pipeline in Execute stage
|
output logic DivBusyE // busy signal to stall pipeline in Execute stage
|
||||||
);
|
);
|
||||||
|
|
||||||
logic [`XLEN*2-1:0] ProdM; // double-width product from mul
|
logic [`XLEN*2-1:0] ProdM; // double-width product from mul
|
||||||
|
Loading…
Reference in New Issue
Block a user