Hello Dmitry, the definition sampled(expression, clocking event) = (clocking event) ? expression : $past(expression, clocking event). The straightforward synthesis without a system clock is not clear in general case. has a problem because there is no way to detect clocking event in a ternary expression. What about something like this: $sampled(expression, @(clocking_event)) ::= var type(expression) sample_expr; always @(clocking_event) sample_expr = $sample(expression); and use sample_expr in place of the original $sampled. Would this work? ed ________________________________ From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Korchemny, Dmitry Sent: Tuesday, October 03, 2006 6:08 AM To: sv-ac@eda.org Subject: [sv-ac] Issue #1550 Hi all, During the discussion of #1550 a question was raised whether we need to keep a second argument of $sampled function. The current definition is $sampled(expression [, clocking event]) If we want to keep it then its semantics should be: $sampled(expression, clocking event) = (clocking event) ? expression : $past(expression, clocking event). The straightforward synthesis without a system clock is not clear in general case. E.g., always a = $sampled(b, @(posedge clk)) or disable iff ($sampled(reset, @(posedge clk)) Therefore we have three options: 1. Allow only one argument form, which is not backward compatible 2. Allow two argument form in trivial cases only, e.g., always @(posedge clk) a = $sampled(b, @(posedge clk)), which is redundant 3. Allow two argument form in trivial cases or when a system clock is present (I have a proposal about a system clock in one of my presentations) What do you think? Thanks, DmitryReceived on Tue Oct 3 07:23:39 2006
This archive was generated by hypermail 2.1.8 : Tue Oct 03 2006 - 07:23:59 PDT