lkolbly / ripstop

Apache License 2.0
0 stars 0 forks source link

Implicit [t] reference #35

Open lkolbly opened 1 year ago

lkolbly commented 1 year ago

When writing a combinatorial module, it's somewhat inconvenient to write [t] everywhere. Does it make sense to implicitly add [t] to unadorned references? For example:

module adder(bits<8> a, bits<8> b) -> (bits<8> c) {
    c = a + b;
}

would be syntactic sugar for:

module adder(bits<8> a, bits<8> b) -> (bits<8> c) {
    c[t] = a[t] + b[t];
}

we'd have to consider some corner cases, like c = a[t-1] + b[t-1] or c[t+1] = a + b. Do those make enough sense?