[Sim] Add output-stream support and introduce sim.get_file#10163
Conversation
758b090 to
28a5c5a
Compare
|
Should we add an operation that directly represents stdout/stderr? However, since the stream parameter is currently optional, it might be feasible to have sim.print default to stderr when no stream is specified. If we need to do this, I think we might need to update the description of the print operation here to account for this detail. |
fzi-hielscher
left a comment
There was a problem hiding this comment.
Thanks for breaking this out. I wasn't aware until now that FIRRTL allows dynamic filenames. That does make thinks a bit more complicated.
Should we add an operation that directly represents stdout/stderr?
However, since the stream parameter is currently optional, it might be feasible to have sim.print default to stderr when no stream is specified.
Yes, let's add them in a followup PR. The FIRRTL behavior of defaulting to stderr is kind of unusual and that should be stated explicitly in the IR. If no stream is specified we can just let the backend pick its default output stream.
b92478d to
55d131b
Compare
7678ccb to
148b47a
Compare
uenoku
left a comment
There was a problem hiding this comment.
Thank you for breaking up the PR, I really appreciate. Also thank you @fzi-hielscher for thorough reviews.
e8ee155 to
6d33f8b
Compare
fzi-hielscher
left a comment
There was a problem hiding this comment.
Thanks, only a small nit left.
6d33f8b to
95bfc9e
Compare
…roc.print operations to support control over the output stream
95bfc9e to
46cb02d
Compare
This PR added sim.get_file operation, and extended the sim.print/sim.proc.print operations to support control over the output stream.
This PR was split from #10146 .