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

Add support for Display in simulation #432

Open
whitequark opened this issue Jul 13, 2020 · 5 comments
Open

Add support for Display in simulation #432

whitequark opened this issue Jul 13, 2020 · 5 comments

Comments

@whitequark
Copy link
Member

@whitequark whitequark commented Jul 13, 2020

A Display feature, similar to Verilog $display, has been requested a few times. We would depend on Yosys to implement it, which in fact is strongly in favor of having it.

Related to #427.

@whitequark whitequark changed the title Add support for Display Add support for Display in simulation Jul 13, 2020
@whitequark whitequark added this to the 0.3 milestone Oct 12, 2020
@BracketMaster
Copy link

@BracketMaster BracketMaster commented Nov 1, 2020

Why would yosys need to support the display cell?
Is the thought that there would be an
m.d.comb += Display(f’foo {bar}’}?

And that yosys right now doesnt accept verilog with
Display?

I don’t imagine that yosys has anything useful it could
do with Display except in the case of CXXrtl, so perhaps
Yosys would mostly ignore Display?

@whitequark
Copy link
Member Author

@whitequark whitequark commented Nov 1, 2020

Is the thought that there would be an m.d.comb += Display(f’foo {bar}’}?

Yes.

I don’t imagine that yosys has anything useful it could do with Display

It should read and write Verilog with $display statements. Some reasons why that's necessary are:

  • LiteX integrates with nMigen through Verilog;
  • Using nMigen with iverilog or Verilator.

@RobertBaruch
Copy link

@RobertBaruch RobertBaruch commented Nov 21, 2020

I'm assuming we wouldn't use f-strings because that evaluates the expressions before passing control to the called function. Something more like m.d.comb += Display(s, *args, **kwargs) which does the equivalent of s.format(args, kwargs) except in $display language?

Also, is there an RTLIL equivalent?

@whitequark
Copy link
Member Author

@whitequark whitequark commented Nov 21, 2020

Something more like m.d.comb += Display(s, *args, **kwargs) which does the equivalent of s.format(args, kwargs) except in $display language?

Yep.

Also, is there an RTLIL equivalent?

Not yet, but I'm working on it, like, right now.

@RobertBaruch
Copy link

@RobertBaruch RobertBaruch commented Nov 21, 2020

Not yet, but I'm working on it, like, right now.

I kinda figured because now I recall the big meows about $display last week on Twitter :D

@whitequark whitequark removed this from the 0.3 milestone Dec 14, 2021
@whitequark whitequark added this to the 0.4 milestone Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants