opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

uartdpi: Use modern APIs for PTS device

Open imphil opened this issue 7 years ago • 7 comments

Currently we use a mix of old-school, non-standard BSD APIs to open a pseudo-terminal. There are newer APIs, which are unfortunately a bit underdocumented. However, the code at https://github.com/opensocdebug/osd-sw/blob/master/src/libosd/terminal.c#L188 does the trick.

imphil avatar Feb 07 '19 17:02 imphil

Oh. I missed this. I should've wait until this PR is created.

eunchan avatar Feb 12 '19 20:02 eunchan

Eunchan wrote:

One more thing to mention is, to make it work on macOS, I had to replace #include <pty.h> to #include <util.h> in hw/dv/dpi/ uart/ gpio DPI files.

We should keep macOS-compat in mind then when choosing the new APIs (if possible)

imphil avatar Feb 12 '19 21:02 imphil

@eunchan, @imphil , scrubbing stale issues... Is this still open?

aytong avatar Oct 30 '19 23:10 aytong

yes

imphil avatar Oct 30 '19 23:10 imphil

This issue came up in the D3 review for UART. Is this something that we can close or re-categorize?

msfschaffner avatar Jun 22 '22 17:06 msfschaffner

This seems like a nice-to-have cleanup that should not gate D3 for the IP. However, it hardly seems critical, given that the current APIs are present on all the platforms we target.

Even if we want to turn this into a requirement, the issue targets the simulation environment, so I feel that the associated milestone should be V3 (if at all). My opinion is that it shouldn't gate any of the chip milestones, though.

a-will avatar Jun 22 '22 21:06 a-will

Thanks @a-will. Let's label this as V3 for now, and re-categorize once we are holding the V3 signoff review.

msfschaffner avatar Jun 23 '22 14:06 msfschaffner