|
From: Cary R. <cy...@ya...> - 2008-03-27 03:07:03
|
A recent patch I submitted prevents these from crashing the simulator when
given calculated values (bits[i]+1, etc.), but they still do not always
work correctly. The basic problem is that the expressions need to be
calculated when the system functions run not when they are called. An
additional problem for $monitor is that any change to this expression
needs to trigger a cbValueChange call back.
I believe the $strobe family can be fixed by replacing the code generated
by draw_eval_* (in tgt-vvp/draw_vpi.c) with some sort of simple anonymous
function creation and call. It needs scope information to find the correct
variables but it doesn't need arguments and only has a single return
value. We may need vector and real versions. These anonymous functions are
only needed until the $strobe finishes executing.
To get $monitor to work correctly the anonymous function needs to get a
bit smarter. It needs to be able to create cbValueChange call backs for
all the variables or pieces of a variable it references when it is asked
to provide a cbValueChange call back. The anonymous functions for $monitor
would need to be persistent.
Does this sound like a reasonable plan? Any suggestions? Would an
anonymous and possible temporary continuous assignment be a better
solution?
FYI once this is implemented we will likely no longer need the scheduled
thread bits deletion so that can be removed.
I believe something similar to this will be needed to fix the
$fscanf/$sscanf problem (pr1876798). The data is propagating the other
way, but the rest is close to what we need for $strobe.
Cary
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
|