dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

Bug when not binding an output of type struct #74

Open bradunov opened 9 years ago

bradunov commented 9 years ago

The following code doesn't work: let comp main = read >>> downSample() >>> removeDC() >>> {x <- cca(); return (x)} >>> write[int]; nor the following: let comp main = read >>> downSample() >>> removeDC() >>> cca() >>> write[int]; The error (with full optimization turned on) is: GenericError "CodeGen: Unbound struct type \"CCAParams\" detected!\nBound are: [\"complex16\",\"complex32\",\"complex64\",\"complex8\"]" The following version works: let comp main = read >>> downSample() >>> removeDC() >>> {x <- cca(); return (0)} >>> write[int];

It seems that the problem is that the overall computation is a computer that returns a structure. But this should not be an issue.