Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【IMSIC interrupt file 中的setipnum配置,支持写,但是读不支持,且读出来的数据应该是0】 #10

Open
zhaohong1988 opened this issue Nov 12, 2024 · 1 comment

Comments

@zhaohong1988
Copy link
Contributor

按照spec规定,IMSIC 分配的MMIO空间,支持写操作,且必须是single操作,且32bit对齐,另外读出来的数据,永远是0.
image
image
image

@xieby1
Copy link
Collaborator

xieby1 commented Nov 12, 2024

下面代码中的RegField(32, ...)保证了读写的数据宽度为32bit。
下面代码中的RegField(..., 0.U, ...)保证了seteipnum只读为0。

        (j * pow2(params.intFileMemWidth).toInt -> Seq(RegField(32, 0.U,
          RegWriteFn((valid, data) => {
            when (valid) { seteipnum.bits := data; seteipnum.valid := true.B }; true.B
        }))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants