Previous Entry Index Next Entry
It has become apparent that 2700 calories a day is not quite enough, and on Thursday I got tired of the scientific approach and compensated for the past few weeks' shortfall all at once. Cookies, raisins, ham, everything was drawn into the screaming void and annihilated to the greater glory of anabolism. I got tired of that on Saturday morning and didn't eat anything more until early on Sunday.
Things have been getting pretty crazy lately, and I'm getting up towards having half a dozen fixes waiting to check into various versions, most of which are locked up for the next few weeks. The policy is that no fixes get checked into certain "golden" versions unless absolutely necessary. In theory this minimizes the risk of breaking them inadvertantly. In practice it means that the golden versions are actually less reliable for some purposes than the development versions.
In VHDL, calls to functions with no parameters don't use an empty pair of parentheses. There's just the name of the function, as if it was a constant. Alternatively, constants are just pure functions without parameters. You can do this with functions with parameters if they have default values for all of them.
Now, VHDL has this notion of "names", which can be simple names, like the names of variables, selected names, for getting at things in other libraries or record elements, indexed names, for accessing array elements, and slice names, for referring to sub-sections of arrays. For indexed names, which are what concern us here, you just use the prefix, and the index in parentheses.
The prefix can be the name of a variable, signal, or other object...
or it can be a function call, with or without parameters. So, say we have
a function f that takes one parameter with a default value,
and returns an array. Is f(0) calling f
with the parameter 0, or is it calling f with default
parameters and indexing element 0 from the result?
If f takes an integer parameter, there's no way to tell,
and the expression is ambiguous, unless an enclosing expression
has an operator or function call that is legal only with the array type
or only with the element type. And if you think that's crazy, I should
tell you about formal subelement association.
Just another Song Fight round-up, going over items of interest and the ones I actually kept.