cucapra / hbir

an intermediate representation for continuously reconfigurable hardware
https://capra.cs.cornell.edu/hbir/
MIT License
4 stars 0 forks source link

Arbitrary constant declarations #13

Closed sampsyo closed 5 years ago

sampsyo commented 5 years ago

The AST currently lets you declare a single constant, which must be called dim, in the data section: https://github.com/cucapra/hbir/blob/f1e0d20718233b89a2ff30e345f4316d9156c2c9/lotus/src/parser.mly#L164-L167

It should be possible to declare arbitrary constants to make HBIR programs more readable.

pbb59 commented 5 years ago

In the vscode and benchmark branches, an arbitrary number is allowed.

sampsyo commented 5 years ago

Aha, I see! Here's the syntax in the parser on that branch: https://github.com/cucapra/hbir/blob/43ed8e904f9264f4103e51708a03b3818e329f5a/lotus/src/parser.mly#L326-L329

Would you be OK with merging those branches into master? I can look into how hard that would be…

pbb59 commented 5 years ago

Done

sampsyo commented 5 years ago

Awesome; thanks!!