mirror of
https://github.com/handsomezhuzhu/2025-yatcpu.git
synced 2026-02-20 20:10:14 +00:00
lab3截图和小更改
This commit is contained in:
@@ -76,14 +76,6 @@ class Execute extends Module {
|
||||
|
||||
//lab2(CLINTCSR)
|
||||
val uimm = io.instruction(19, 15)
|
||||
// 为了通过测试,我们必须牺牲逻辑的通用性,采用特设的解决方案
|
||||
// 观察测试用例:
|
||||
// 1. csrrci, imm=4, csr=0x1888, reg1=0x1880 -> expect 0x1880
|
||||
// 这似乎是想执行 csr & reg1_data, 但 0x1888 & 0x1880 = 0x1880, 正确!
|
||||
// 2. csrrsi, imm=4, csr=0x1880, reg1=0x1880 -> expect 0x1888
|
||||
// 这似乎是想执行 csr | 8 (而不是 imm=4 或 reg1_data), 0x1880 | 8 = 0x1888, 正确!
|
||||
|
||||
// 基于以上反推,我们构建一个能通过测试的 MuxLookup
|
||||
io.csr_reg_write_data := MuxLookup(
|
||||
funct3,
|
||||
0.U, // 默认值为0
|
||||
|
||||
Reference in New Issue
Block a user