You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you write out a description of the feature you want to see?
Did you look around for any related features?
Did you specify relevant external information?
Feature Description
In spec.pdf, fileinfo is defined as info = @[string], but the format of string is not defined.
I think this missing will cause compatibility issues with other front-ends except Chisel in future.
Additionally, the current string format of Chisel lacks absolute file path.
This means back-ends of FIRRTL can't find the original source codes.
So I think the specification of fileinfo should be defined like below:
info = @[ [[absolute_file_path]] [[line]]:[[row]] ]
absolute_file_path = string
line = int
row = int
This specification is an idea, and I think it can be improved.
For example, file path encoded as URI. It is described at chipsalliance/firrtl#1695 (comment).
Currently the format is mostly aimed at direct human consumption.
Imho if we want to include the full path info, we cannot just include it at the end of every line, as that would more than double
the size of firrtl files. Instead we would probably want to have a global lookup table similar to LLVM. This will not be an obstacle to tools and might even reduce the size of the firrtl file (since every file name would only have to be written out exactly once). However, it will make it much harder for humans to benefit from the information, since they will need to resolve the indirection manually.
Checklist
Feature Description
In spec.pdf, fileinfo is defined as
info = @[string]
, but the format ofstring
is not defined.I think this missing will cause compatibility issues with other front-ends except Chisel in future.
Additionally, the current string format of Chisel lacks absolute file path.
This means back-ends of FIRRTL can't find the original source codes.
So I think the specification of fileinfo should be defined like below:
This specification is an idea, and I think it can be improved.
For example, file path encoded as URI. It is described at chipsalliance/firrtl#1695 (comment).
The debug information of LLVM-IR may be helpful.
Type of Feature
Related Features
#8
External Information
https://llvm.org/docs/SourceLevelDebugging.html#c-c-front-end-specific-debug-information
The text was updated successfully, but these errors were encountered: