google / google/xls

[enhancement] request a zero prefix for trace_fmt when using the `:#x" format.

Open
#1,772 4 comments 0 reactions 0 assignees View on GitHub
dslx enhancement
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

### What's hard to do? (limit 100 words)

It would be nice to be able request a zero prefix for `trace_fmt` when using the `:#x" format.

**To Reproduce**
```
let x = u20:0x00800;
trace_fmt!("{:#x}", x);
```

The program outputs `0x800`.

It would be nice to be able to output it in the original format for compatibility with other tools.

### Current best alternative workaround (limit 100 words)

None that I'm aware of.

### Your view of the "best case XLS enhancement" (limit 100 words)

The syntax `{:#0x}` would be a natural extension, similar to the `{:0x}` format.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.