llvm / llvm/circt

[ExportVerilog] Emit integer signedness in type

Open
#397 3 comments 0 reactions 0 assignees View on GitHub
enhancement HW
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

Emit the signedness whenever the type is printed, especially in structs.

```verilog
struct example {
logic signed [7:0] a; // Type si8
logic unsigned [7:0] b; // Type ui8
logic [7:0] c; // Type i8
}
```

This should probably be based on the IntegerType's signedness so it works correctly in the case where there are no operations on said signal/port to be found.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the ExportVerilog type-printing path and trace how IntegerType signedness is represented and emitted. Check the struct example and cases where a signal or port has no operations, then verify that signed, unsigned, and default integer types print the expected Verilog declarations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.