lsu update
This commit is contained in:
parent
9f7ddbee4c
commit
1c0d6d492c
|
@ -15371,9 +15371,9 @@ circuit el2_lsu :
|
|||
io.lsu_fir_addr <= lsu_lsc_ctl.io.lsu_fir_addr @[el2_lsu.scala 236:49]
|
||||
io.lsu_fir_error <= lsu_lsc_ctl.io.lsu_fir_error @[el2_lsu.scala 237:49]
|
||||
dccm_ctl.io.lsu_c2_m_clk <= clkdomain.io.lsu_c2_m_clk @[el2_lsu.scala 240:46]
|
||||
dccm_ctl.io.lsu_c2_r_clk <= clkdomain.io.lsu_c2_m_clk @[el2_lsu.scala 241:46]
|
||||
dccm_ctl.io.lsu_free_c2_clk <= clkdomain.io.lsu_c2_r_clk @[el2_lsu.scala 242:46]
|
||||
dccm_ctl.io.lsu_c1_r_clk <= clkdomain.io.lsu_free_c2_clk @[el2_lsu.scala 243:46]
|
||||
dccm_ctl.io.lsu_c2_r_clk <= clkdomain.io.lsu_c2_r_clk @[el2_lsu.scala 241:46]
|
||||
dccm_ctl.io.lsu_free_c2_clk <= clkdomain.io.lsu_free_c2_clk @[el2_lsu.scala 242:46]
|
||||
dccm_ctl.io.lsu_c1_r_clk <= clkdomain.io.lsu_c1_r_clk @[el2_lsu.scala 243:46]
|
||||
dccm_ctl.io.lsu_store_c1_r_clk <= clkdomain.io.lsu_store_c1_r_clk @[el2_lsu.scala 244:46]
|
||||
dccm_ctl.io.lsu_pkt_d.bits.store_data_bypass_m <= lsu_lsc_ctl.io.lsu_pkt_d.bits.store_data_bypass_m @[el2_lsu.scala 246:46]
|
||||
dccm_ctl.io.lsu_pkt_d.bits.load_ldst_bypass_d <= lsu_lsc_ctl.io.lsu_pkt_d.bits.load_ldst_bypass_d @[el2_lsu.scala 246:46]
|
||||
|
|
|
@ -11547,8 +11547,8 @@ module el2_lsu(
|
|||
assign dccm_ctl_clock = clock;
|
||||
assign dccm_ctl_reset = reset;
|
||||
assign dccm_ctl_io_lsu_c2_m_clk = clkdomain_io_lsu_c2_m_clk; // @[el2_lsu.scala 240:46]
|
||||
assign dccm_ctl_io_lsu_c2_r_clk = clkdomain_io_lsu_c2_m_clk; // @[el2_lsu.scala 241:46]
|
||||
assign dccm_ctl_io_lsu_free_c2_clk = clkdomain_io_lsu_c2_r_clk; // @[el2_lsu.scala 242:46]
|
||||
assign dccm_ctl_io_lsu_c2_r_clk = clkdomain_io_lsu_c2_r_clk; // @[el2_lsu.scala 241:46]
|
||||
assign dccm_ctl_io_lsu_free_c2_clk = clkdomain_io_lsu_free_c2_clk; // @[el2_lsu.scala 242:46]
|
||||
assign dccm_ctl_io_lsu_store_c1_r_clk = clkdomain_io_lsu_store_c1_r_clk; // @[el2_lsu.scala 244:46]
|
||||
assign dccm_ctl_io_lsu_pkt_d_valid = lsu_lsc_ctl_io_lsu_pkt_d_valid; // @[el2_lsu.scala 246:46]
|
||||
assign dccm_ctl_io_lsu_pkt_d_bits_word = lsu_lsc_ctl_io_lsu_pkt_d_bits_word; // @[el2_lsu.scala 246:46]
|
||||
|
|
23248
el2_swerv.fir
23248
el2_swerv.fir
File diff suppressed because one or more lines are too long
10337
el2_swerv.v
10337
el2_swerv.v
File diff suppressed because it is too large
Load Diff
|
@ -89,7 +89,7 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val sb_axi_rdata = Input(UInt(64.W))
|
||||
val sb_axi_rresp = Input(UInt(2.W))
|
||||
val dbg_bus_clk_en = Input(Bool())
|
||||
val dbg_rst_l = Input(AsyncReset())
|
||||
val dbg_rst_l = Input(Bool())
|
||||
val clk_override = Input(Bool())
|
||||
val scan_mode = Input(Bool())
|
||||
})
|
||||
|
@ -127,30 +127,30 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val sb_free_clken = io.dmi_reg_en | sb_state_en | (sb_state =/= sb_state_t.sbidle) | io.clk_override;
|
||||
val dbg_free_clk = rvclkhdr(clock, dbg_free_clken, io.scan_mode) // dbg_free_cgc
|
||||
val sb_free_clk = rvclkhdr(clock, sb_free_clken, io.scan_mode) // sb_free_cgc
|
||||
val dbg_dm_rst_l = (io.dbg_rst_l.asBool() & (dmcontrol_reg(0) | io.scan_mode)).asAsyncReset()
|
||||
val dbg_dm_rst_l = io.dbg_rst_l.asBool() & (dmcontrol_reg(0) | io.scan_mode)
|
||||
io.dbg_core_rst_l := (!dmcontrol_reg(1)).asBool()
|
||||
val sbcs_wren = (io.dmi_reg_addr === "h38".U) & io.dmi_reg_en & io.dmi_reg_wr_en & (sb_state === sb_state_t.sbidle)
|
||||
val sbcs_sbbusyerror_wren = (sbcs_wren & io.dmi_reg_wdata(22)) | ((sb_state =/= sb_state_t.sbidle) & io.dmi_reg_en &
|
||||
((io.dmi_reg_addr === "h39".U) | (io.dmi_reg_addr === "h3c".U) | (io.dmi_reg_addr === "h3d".U)))
|
||||
|
||||
val sbcs_sbbusyerror_din = (~(sbcs_wren & io.dmi_reg_wdata(22))).asUInt()
|
||||
val temp_sbcs_22 = withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val temp_sbcs_22 = withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(sbcs_sbbusyerror_din, 0.U, sbcs_sbbusyerror_wren)
|
||||
} // sbcs_sbbusyerror_reg
|
||||
|
||||
val temp_sbcs_21 = withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val temp_sbcs_21 = withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(sbcs_sbbusy_din, 0.U, sbcs_sbbusy_wren)
|
||||
} // sbcs_sbbusy_reg
|
||||
|
||||
val temp_sbcs_20 = withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val temp_sbcs_20 = withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(io.dmi_reg_wdata(20), 0.U, sbcs_wren)
|
||||
} // sbcs_sbreadonaddr_reg
|
||||
|
||||
val temp_sbcs_19_15 = withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val temp_sbcs_19_15 = withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(io.dmi_reg_wdata(19, 15), 0.U, sbcs_wren)
|
||||
} // sbcs_misc_reg
|
||||
|
||||
val temp_sbcs_14_12 = withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val temp_sbcs_14_12 = withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(sbcs_sberror_din(2, 0), 0.U, sbcs_sberror_wren)
|
||||
} // sbcs_error_reg
|
||||
sbcs_reg := Cat(1.U(3.W), 0.U(6.W), temp_sbcs_22, temp_sbcs_21, temp_sbcs_20, temp_sbcs_19_15, temp_sbcs_14_12, "h20".U(7.W), "b01111".U(5.W))
|
||||
|
@ -175,11 +175,11 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val sbdata1_din = Fill(32, sbdata1_reg_wren0) & io.dmi_reg_wdata |
|
||||
Fill(32, sbdata1_reg_wren1) & sb_bus_rdata(63, 32)
|
||||
|
||||
val sbdata0_reg = withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val sbdata0_reg = withReset(!dbg_dm_rst_l) {
|
||||
rvdffe(sbdata0_din, sbdata0_reg_wren, clock, io.scan_mode)
|
||||
} // dbg_sbdata0_reg
|
||||
|
||||
val sbdata1_reg = withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val sbdata1_reg = withReset(!dbg_dm_rst_l) {
|
||||
rvdffe(sbdata1_din, sbdata1_reg_wren, clock, io.scan_mode)
|
||||
} // dbg_sbdata1_reg
|
||||
|
||||
|
@ -187,7 +187,7 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val sbaddress0_reg_wren = sbaddress0_reg_wren0 | sbaddress0_reg_wren1
|
||||
val sbaddress0_reg_din = Fill(32, sbaddress0_reg_wren0) & io.dmi_reg_wdata |
|
||||
Fill(32, sbaddress0_reg_wren1) & (sbaddress0_reg + Cat(0.U(28.W), sbaddress0_incr))
|
||||
sbaddress0_reg := withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
sbaddress0_reg := withReset(!dbg_dm_rst_l) {
|
||||
rvdffe(sbaddress0_reg_din, sbaddress0_reg_wren, clock, io.scan_mode)
|
||||
} // dbg_sbaddress0_reg
|
||||
|
||||
|
@ -195,7 +195,7 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val sbreadondata_access = io.dmi_reg_en & !io.dmi_reg_wr_en & (io.dmi_reg_addr === "h3c".U) & sbcs_reg(15)
|
||||
val sbdata0wr_access = io.dmi_reg_en & io.dmi_reg_wr_en & (io.dmi_reg_addr === "h3c".U)
|
||||
val dmcontrol_wren = (io.dmi_reg_addr === "h10".U) & io.dmi_reg_en & io.dmi_reg_wr_en
|
||||
val dm_temp = withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val dm_temp = withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(
|
||||
Cat(io.dmi_reg_wdata(31, 30), io.dmi_reg_wdata(28), io.dmi_reg_wdata(1)),
|
||||
0.U, dmcontrol_wren)
|
||||
|
@ -208,7 +208,7 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val temp = Cat(dm_temp(3, 2), 0.U, dm_temp(1), 0.U(26.W), dm_temp(0), dm_temp_0)
|
||||
dmcontrol_reg := temp
|
||||
|
||||
val dmcontrol_wren_Q = withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val dmcontrol_wren_Q = withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegNext(dmcontrol_wren, 0.U)
|
||||
} // dmcontrol_wrenff
|
||||
|
||||
|
@ -221,15 +221,15 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
val temp_rst = reset.asBool()
|
||||
dmstatus_unavail := (dmcontrol_reg(1) | !(temp_rst)).asBool()
|
||||
dmstatus_running := ~(dmstatus_unavail | dmstatus_halted)
|
||||
dmstatus_resumeack := withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
dmstatus_resumeack := withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(dmstatus_resumeack_din, 0.U, dmstatus_resumeack_wren)
|
||||
} // dmstatus_resumeack_reg
|
||||
|
||||
dmstatus_halted := withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
dmstatus_halted := withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegNext(io.dec_tlu_dbg_halted & !io.dec_tlu_mpc_halted_only, 0.U)
|
||||
} // dmstatus_halted_reg
|
||||
|
||||
dmstatus_havereset := withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
dmstatus_havereset := withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(~dmstatus_havereset_rst, 0.U, dmstatus_havereset_wren)
|
||||
} // dmstatus_havereset_reg
|
||||
|
||||
|
@ -253,11 +253,11 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
(Fill(3, abstractcs_error_sel5) & (~io.dmi_reg_wdata(10, 8)).asUInt() & abstractcs_reg(10, 8)) |
|
||||
(Fill(3, (~abstractcs_error_selor).asUInt()) & abstractcs_reg(10, 8))
|
||||
|
||||
val abs_temp_12 = withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val abs_temp_12 = withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(abstractcs_busy_din, 0.U, abstractcs_busy_wren)
|
||||
} // dmabstractcs_busy_reg
|
||||
|
||||
val abs_temp_10_8 = withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
val abs_temp_10_8 = withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegNext(abstractcs_error_din(2, 0), 0.U)
|
||||
} // dmabstractcs_error_reg
|
||||
|
||||
|
@ -265,8 +265,8 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
|
||||
val command_wren = (io.dmi_reg_addr === "h17".U) & io.dmi_reg_en & io.dmi_reg_wr_en & (dbg_state === state_t.halted)
|
||||
val command_din = Cat(io.dmi_reg_wdata(31, 24), 0.U(1.W), io.dmi_reg_wdata(22, 20), 0.U(3.W), io.dmi_reg_wdata(16, 0))
|
||||
val command_reg = withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
rvdffe(command_din, command_wren, clock, io.scan_mode)
|
||||
val command_reg = withReset(!dbg_dm_rst_l) {
|
||||
RegEnable(command_din, 0.U, command_wren)
|
||||
} // dmcommand_reg
|
||||
|
||||
val data0_reg_wren0 = io.dmi_reg_en & io.dmi_reg_wr_en & (io.dmi_reg_addr === "h4".U) & (dbg_state === state_t.halted)
|
||||
|
@ -274,13 +274,13 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
|
||||
val data0_reg_wren = data0_reg_wren0 | data0_reg_wren1
|
||||
val data0_din = Fill(32, data0_reg_wren0) & io.dmi_reg_wdata | Fill(32, data0_reg_wren1) & io.core_dbg_rddata
|
||||
val data0_reg = withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
rvdffe(data0_din, data0_reg_wren, clock, io.scan_mode)
|
||||
val data0_reg = withReset(!dbg_dm_rst_l) {
|
||||
RegEnable(data0_din, 0.U, data0_reg_wren)
|
||||
} // dbg_data0_reg
|
||||
|
||||
val data1_reg_wren = (io.dmi_reg_en & io.dmi_reg_wr_en & (io.dmi_reg_addr === "h5".U) & (dbg_state === state_t.halted))
|
||||
val data1_din = Fill(32, data1_reg_wren) & io.dmi_reg_wdata
|
||||
data1_reg := withReset((!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
data1_reg := withReset(!dbg_dm_rst_l) {
|
||||
rvdffe(data1_din, data1_reg_wren, clock, io.scan_mode)
|
||||
} // dbg_data1_reg
|
||||
|
||||
|
@ -343,12 +343,12 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
Fill(32, io.dmi_reg_addr === "h39".U) & sbaddress0_reg | Fill(32, io.dmi_reg_addr === "h3c".U) & sbdata0_reg |
|
||||
Fill(32, io.dmi_reg_addr === "h3d".U) & sbdata1_reg
|
||||
|
||||
dbg_state := withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool() & temp_rst).asAsyncReset()) {
|
||||
dbg_state := withClockAndReset(dbg_free_clk, !dbg_dm_rst_l & temp_rst) {
|
||||
RegEnable(dbg_nxtstate, 0.U, dbg_state_en)
|
||||
} // dbg_state_reg
|
||||
|
||||
|
||||
io.dmi_reg_rdata := withClockAndReset(dbg_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
io.dmi_reg_rdata := withClockAndReset(dbg_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(dmi_reg_rdata_din, 0.U, io.dmi_reg_en)
|
||||
} // dmi_rddata_reg
|
||||
|
||||
|
@ -425,7 +425,7 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
sbaddress0_reg_wren1 := sbcs_reg(16)
|
||||
}}
|
||||
|
||||
sb_state := withClockAndReset(sb_free_clk, (!dbg_dm_rst_l.asBool()).asAsyncReset()) {
|
||||
sb_state := withClockAndReset(sb_free_clk, !dbg_dm_rst_l) {
|
||||
RegEnable(sb_nxtstate, 0.U, sb_state_en)
|
||||
} // sb_state_reg
|
||||
|
||||
|
@ -476,5 +476,5 @@ class el2_dbg extends Module with el2_lib with RequireAsyncReset {
|
|||
}
|
||||
|
||||
object debug extends App {
|
||||
println(chisel3.Driver.emitVerilog(new el2_dbg))
|
||||
chisel3.Driver.emitVerilog(new el2_dbg)
|
||||
}
|
|
@ -238,9 +238,9 @@ class el2_lsu extends Module with RequireAsyncReset with param with el2_lib {
|
|||
// DCCM Control
|
||||
//Inputs
|
||||
dccm_ctl.io.lsu_c2_m_clk := clkdomain.io.lsu_c2_m_clk
|
||||
dccm_ctl.io.lsu_c2_r_clk := clkdomain.io.lsu_c2_m_clk
|
||||
dccm_ctl.io.lsu_free_c2_clk := clkdomain.io.lsu_c2_r_clk
|
||||
dccm_ctl.io.lsu_c1_r_clk := clkdomain.io.lsu_free_c2_clk
|
||||
dccm_ctl.io.lsu_c2_r_clk := clkdomain.io.lsu_c2_r_clk
|
||||
dccm_ctl.io.lsu_free_c2_clk := clkdomain.io.lsu_free_c2_clk
|
||||
dccm_ctl.io.lsu_c1_r_clk := clkdomain.io.lsu_c1_r_clk
|
||||
dccm_ctl.io.lsu_store_c1_r_clk := clkdomain.io.lsu_store_c1_r_clk
|
||||
//dccm_ctl.io.clk := clock
|
||||
dccm_ctl.io.lsu_pkt_d <> lsu_lsc_ctl.io.lsu_pkt_d
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue