mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Merge branch 'main' of github.com:openhwgroup/cvw
This commit is contained in:
commit
9d89c6dae8
2
src/cache/cachefsm.sv
vendored
2
src/cache/cachefsm.sv
vendored
@ -156,7 +156,7 @@ module cachefsm import cvw::*; #(parameter cvw_t P,
|
|||||||
// write enables internal to cache
|
// write enables internal to cache
|
||||||
assign SetValid = CurrState == STATE_WRITE_LINE |
|
assign SetValid = CurrState == STATE_WRITE_LINE |
|
||||||
(CurrState == STATE_READY & CMOp[3]); // *** RT: NOT completely right has to be a hit
|
(CurrState == STATE_READY & CMOp[3]); // *** RT: NOT completely right has to be a hit
|
||||||
assign ClearValid = P.ZICBOM_SUPPORTED & ((CurrState == STATE_READY & CMOp[0]) |
|
assign ClearValid = P.ZICBOM_SUPPORTED & ((CurrState == STATE_READY & CMOp[0] & CacheHit) |
|
||||||
(CurrState == STATE_CMO_WRITEBACK & CMOp[2] & CacheBusAck));
|
(CurrState == STATE_CMO_WRITEBACK & CMOp[2] & CacheBusAck));
|
||||||
// coverage off -item e 1 -fecexprrow 8
|
// coverage off -item e 1 -fecexprrow 8
|
||||||
assign LRUWriteEn = (CurrState == STATE_READY & AnyHit) |
|
assign LRUWriteEn = (CurrState == STATE_READY & AnyHit) |
|
||||||
|
@ -88,8 +88,12 @@ module csrs import cvw::*; #(parameter cvw_t P) (
|
|||||||
assign WriteSEPCM = STrapM | (CSRSWriteM & (CSRAdrM == SEPC));
|
assign WriteSEPCM = STrapM | (CSRSWriteM & (CSRAdrM == SEPC));
|
||||||
assign WriteSCAUSEM = STrapM | (CSRSWriteM & (CSRAdrM == SCAUSE));
|
assign WriteSCAUSEM = STrapM | (CSRSWriteM & (CSRAdrM == SCAUSE));
|
||||||
assign WriteSTVALM = STrapM | (CSRSWriteM & (CSRAdrM == STVAL));
|
assign WriteSTVALM = STrapM | (CSRSWriteM & (CSRAdrM == STVAL));
|
||||||
// assign WriteSATPM = CSRSWriteM & (CSRAdrM == SATP) & (PrivilegeModeW == P.M_MODE | ~STATUS_TVM);
|
if(P.XLEN == 64) begin
|
||||||
assign WriteSATPM = CSRSWriteM & (CSRAdrM == SATP) & (PrivilegeModeW == P.M_MODE | ~STATUS_TVM) & (CSRWriteValM[63:60] != 4'hA);
|
logic LegalSatpModeM;
|
||||||
|
assign LegalSatpModeM = P.VIRTMEM_SUPPORTED & (CSRWriteValM[63:60] == 0 | CSRWriteValM[63:60] == 8 | CSRWriteValM[63:60] == 9); // supports SV39 and 48
|
||||||
|
assign WriteSATPM = CSRSWriteM & (CSRAdrM == SATP) & (PrivilegeModeW == P.M_MODE | ~STATUS_TVM) & LegalSatpModeM;
|
||||||
|
end else // RV32
|
||||||
|
assign WriteSATPM = CSRSWriteM & (CSRAdrM == SATP) & (PrivilegeModeW == P.M_MODE | ~STATUS_TVM) & P.VIRTMEM_SUPPORTED;
|
||||||
assign WriteSCOUNTERENM = CSRSWriteM & (CSRAdrM == SCOUNTEREN);
|
assign WriteSCOUNTERENM = CSRSWriteM & (CSRAdrM == SCOUNTEREN);
|
||||||
assign WriteSENVCFGM = CSRSWriteM & (CSRAdrM == SENVCFG);
|
assign WriteSENVCFGM = CSRSWriteM & (CSRAdrM == SENVCFG);
|
||||||
assign WriteSTIMECMPM = CSRSWriteM & (CSRAdrM == STIMECMP) & STCE;
|
assign WriteSTIMECMPM = CSRSWriteM & (CSRAdrM == STIMECMP) & STCE;
|
||||||
|
@ -94,10 +94,10 @@ endif
|
|||||||
|
|
||||||
ifneq ($(MOD), orig)
|
ifneq ($(MOD), orig)
|
||||||
# PMP 0
|
# PMP 0
|
||||||
sed -i 's/PMP_ENTRIES \(64\|16\|0\)/PMP_ENTRIES 0/' $(CONFIGDIR)/config.vh
|
sed -i 's/PMP_ENTRIES \(64\|16\|0\)/PMP_ENTRIES = 0;/' $(CONFIGDIR)/config.vh
|
||||||
ifneq ($(MOD), PMP0)
|
ifneq ($(MOD), PMP0)
|
||||||
# no priv
|
# no priv
|
||||||
sed -i 's/ZICSR_SUPPORTED *1/ZICSR_SUPPORTED 0/' $(CONFIGDIR)/config.vh
|
sed -i 's/ZICSR_SUPPORTED *1/ZICSR_SUPPORTED = 0;/' $(CONFIGDIR)/config.vh
|
||||||
ifneq ($(MOD), noPriv)
|
ifneq ($(MOD), noPriv)
|
||||||
# turn off FPU
|
# turn off FPU
|
||||||
sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/config.vh
|
sed -i 's/1 *<< *3/0 << 3/' $(CONFIGDIR)/config.vh
|
||||||
@ -128,7 +128,7 @@ mkdirecs:
|
|||||||
@mkdir -p $(OUTPUTDIR)/mapped
|
@mkdir -p $(OUTPUTDIR)/mapped
|
||||||
@mkdir -p $(OUTPUTDIR)/unmapped
|
@mkdir -p $(OUTPUTDIR)/unmapped
|
||||||
|
|
||||||
synth: mkdirecs configs rundc clean
|
synth: mkdirecs configs rundc # clean
|
||||||
|
|
||||||
rundc:
|
rundc:
|
||||||
ifeq ($(TECH), tsmc28psyn)
|
ifeq ($(TECH), tsmc28psyn)
|
||||||
|
@ -25,7 +25,9 @@ set maxopt $::env(MAXOPT)
|
|||||||
set drive $::env(DRIVE)
|
set drive $::env(DRIVE)
|
||||||
|
|
||||||
eval file copy -force [glob ${cfg}/*.vh] {$outputDir/hdl/}
|
eval file copy -force [glob ${cfg}/*.vh] {$outputDir/hdl/}
|
||||||
eval file copy -force [glob ${hdl_src}/*.sv] {$outputDir/hdl/}
|
eval file copy -force [glob ${cfg}/*.vh] {$outputDir/hdl/}
|
||||||
|
eval file copy -force [glob ${hdl_src}/cvw.sv] {$outputDir/hdl/}
|
||||||
|
eval file copy -force [glob ${hdl_src}/../fpga/src/wallypipelinedsocwrapper.sv] {$outputDir/hdl/}
|
||||||
eval file copy -force [glob ${hdl_src}/*/*.sv] {$outputDir/hdl/}
|
eval file copy -force [glob ${hdl_src}/*/*.sv] {$outputDir/hdl/}
|
||||||
eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
|
eval file copy -force [glob ${hdl_src}/*/*/*.sv] {$outputDir/hdl/}
|
||||||
|
|
||||||
@ -74,7 +76,7 @@ if { [shell_is_in_topographical_mode] } {
|
|||||||
#set alib_library_analysis_path ./$outputDir
|
#set alib_library_analysis_path ./$outputDir
|
||||||
define_design_lib WORK -path ./$outputDir/WORK
|
define_design_lib WORK -path ./$outputDir/WORK
|
||||||
analyze -f sverilog -lib WORK $my_verilog_files
|
analyze -f sverilog -lib WORK $my_verilog_files
|
||||||
elaborate $my_toplevel -lib WORK
|
elaborate $my_toplevel -parameter P -lib WORK
|
||||||
|
|
||||||
# Set the current_design
|
# Set the current_design
|
||||||
current_design $my_toplevel
|
current_design $my_toplevel
|
||||||
|
@ -153,7 +153,7 @@ module testbench;
|
|||||||
`define SSCRATCH `CSR_BASE.csrs.csrs.SSCRATCHreg.q
|
`define SSCRATCH `CSR_BASE.csrs.csrs.SSCRATCHreg.q
|
||||||
`define MTVEC `CSR_BASE.csrm.MTVECreg.q
|
`define MTVEC `CSR_BASE.csrm.MTVECreg.q
|
||||||
`define STVEC `CSR_BASE.csrs.csrs.STVECreg.q
|
`define STVEC `CSR_BASE.csrs.csrs.STVECreg.q
|
||||||
`define SATP `CSR_BASE.csrs.csrs.genblk1.SATPreg.q
|
`define SATP `CSR_BASE.csrs.csrs.genblk2.SATPreg.q
|
||||||
`define INSTRET `CSR_BASE.counters.counters.HPMCOUNTER_REGW[2]
|
`define INSTRET `CSR_BASE.counters.counters.HPMCOUNTER_REGW[2]
|
||||||
`define MSTATUS `CSR_BASE.csrsr.MSTATUS_REGW
|
`define MSTATUS `CSR_BASE.csrsr.MSTATUS_REGW
|
||||||
`define SSTATUS `CSR_BASE.csrsr.SSTATUS_REGW
|
`define SSTATUS `CSR_BASE.csrsr.SSTATUS_REGW
|
||||||
|
Loading…
Reference in New Issue
Block a user