Hello, while discussing Dmitry's comments regarding the sampled value functions $rose, $past etc., I think we should also review the definition of $sampled as outlined below. If you agree that this is useful I will enter it in Mantis. Best regards, ed ---------------------- Currently $sampled is defined as follows: --- $sampled(expression [, clocking_event]) Function $sampled returns the sampled value of the expression with respect to the last occurrence of the clocking event. When $sampled is invoked prior to the occurrence of the first clocking event, the value of X is returned. The use of $sampled in assertions, although allowed, is redundant, as the result of the function is identical to the sampled value of the expression itself used in the assertion. --- The use of this function outside of assertions and assertion action blocks is rather difficult. Yet it is useful in assignments to auxiliary state variables of assertions, once changed as follows: --- 1) Remove the clocking event: $sampled(expression) 2) Change the description to: Function $sampled returns the value of the expression at the prepone time of the current simulation time unit. --- With this definition, it is possible to have reg auxiliary_state; always @(posedge clk) auxiliary_state <= funct($sampled(some_input)); in which case the auxiliary_state is assigned the same value as seen by an assertion over some_input.Received on Wed May 10 11:13:30 2006
This archive was generated by hypermail 2.1.8 : Wed May 10 2006 - 11:13:37 PDT