Skip to content

【求助】cpu_test中与字符处理相关的程序运行不通 #15

Description

@lsyic

目前可以通过其它cpu_test程序,但是含有字符操作的程序通不过
image
image
通过看波形可以观察是运行sprintf函数的时候直接就运行halt了。
联系之前AM教程中讲到的完善putch函数,这个问题是否是未修改putch导致的?请问大家有遇到这个问题吗?是怎么解决的?多谢!!!

Activity

  1. lsyic commented on Aug 19, 2021

    @lsyic
    Author

    有大佬帮忙指点一下吗😀

  2. shili2017 commented on Aug 19, 2021

    @shili2017

    hello-str是需要完善putch函数的,但是string不需要。你需要自己在am的stdio里补上printf、sprintf等函数的实现。

  3. lsyic commented on Aug 19, 2021

    @lsyic
    Author

    hello-str是需要完善putch函数的,但是string不需要。你需要自己在am的stdio里补上printf、sprintf等函数的实现。

    请问这个有实现好的版本吗?还是说必须要自己来实现?或者能提示一下putch是如何实现的吗?

  4. shili2017 commented on Aug 21, 2021

    @shili2017

    putch可以自己添加一条自定义指令,然后在自己的core中使用chisel中的printf或者verilog中的fwrite输出字符。至于标准库中的函数,应该自己按照文档实现(不过github上也有很多开源的实现,可以参考)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions