xls
xls copied to clipboard
Internal channel names in DSLX should be nameable
Related google/xls#869 and google/xls#656
While top-level channel naming as improved due to google/xls#656 -- internal channels created within the config block of a proc are named with arbitrary line numbers and the module path.
Example: https://github.com/google/xls/blob/main/xls/dslx/ir_convert/ir_converter_test.cc#L1547 https://github.com/google/xls/blob/main/xls/dslx/ir_convert/testdata/ir_converter_test_HandlesChannelDecls.ir
chan main_chandecl_test_module_x_5_52_5_60(bits[32], id=0, kind=streaming, ops=send_receive, flow_control=ready_valid, strictness=proven_mutually_exclusive, metadata="""""")
chan main_chandecl_test_module_x_6_52_6_60(bits[64], id=1, kind=streaming, ops=send_receive, flow_control=ready_valid, strictness=proven_mutually_exclusive, metadata="""""")
chan main_chandecl_test_module_x_7_84_7_108((bits[64], (bits[64], (bits[64]))), id=2, kind=streaming, ops=send_receive, flow_control=ready_valid, strictness=proven_mutually_exclusive, metadata="""""")
chan main_chandecl_test_module_x_8_20_8_45((bits[64], (bits[64], bits[64][4])), id=3, kind=streaming, ops=send_receive, flow_control=ready_valid, strictness=proven_mutually_exclusive, metadata="""""")
This issue it to enhance DSLX ChanelDecl to include the name of the channel so that IR conversion can properly name internal channels.
Proposal:
proc main {
config() {
let (p0, c0) : (chan<u32> out, chan<u32> in) = chan<u32>("three_two_wide_channel");
()
}
...
}