circt icon indicating copy to clipboard operation
circt copied to clipboard

[FIRRTL][Sim] Add `fopen` and `fclose`

Open SpriteOvO opened this issue 8 months ago • 6 comments

Adding fopen and fclose allows fwrite to real files instead of just standard streams.

According to SV spec 21.3.1, the return value fd of fopen is an integer. The CIRCT SV dialect does not seem to implement the integer type at the moment.

I am preparing PR to add these two system tasks. For integer, should I implement it in its entirety as a new type, or try to reuse the existing Inout type? If the former is better, that means I'll have to implement a new op like sv.assign_integer for it as well, right?

CC @seldridge @nandor @sequencer

SpriteOvO avatar May 27 '24 11:05 SpriteOvO