google / google/xls

Channel declarations in config funtions should return a struct in DSLX

Open
#830 0 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

Right now in the `config` of a proc chan declarations produce a two-tuple of in and out channels which can be used when spawing other procs. Exmaple:

```
pub proc foo {
in_ch: chan in;
...
config (a: chan in) {
let (x_in, x_out) = chan;
spawn bar(x_in);
spawn qux(x_out);
(a, )
}
next (...) { }
}
```

A cleaner syntax might be for `chan` to return a struct containing the in and out channels. So you'd have:

```
pub proc foo {
in_ch: chan in;
...
config (a: chan in) {
let x = chan;
spawn bar(x.in);
spawn qux(x.out);
(a, )
}
next (...) { }
}
```

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.