google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.21k stars 179 forks source link

[DSLX] Support methods on structs #617

Open cdleary opened 2 years ago

cdleary commented 2 years ago

As reflected in #526 an outstanding request has been to support methods on struct instances so folks can use the familiar "object oriented receiver" style function invocations -- without polymorphism the additional utility is limited but familiarity/convenience / some conciseness will certainly be increased, and it helps pave the path towards monomorphization, right now the DSL only supports parametric instantiation via constexpr values.

taktoa commented 1 year ago

+1, this would be really nice. I was feeling this pain recently.

proppy commented 1 month ago

related https://github.com/google/xls/commit/1af3c8cf8144f46be9bca6e44b98477adfe5dd8d