Some event control assigns can be skipped so add an event clear.
Since some event control assignments can be skipped we need an event control clear so that future %evctl statements do not fail their assert. This patch adds %evctl/c and uses it in the compiler as appropriate to keep the event control information in sync.
This commit is contained in:
parent
8ffec473ef
commit
626394d198
|
|
@ -349,6 +349,7 @@ static void assign_to_lvector(ivl_lval_t lval, unsigned bit,
|
|||
fprintf(vvp_out, " %%assign/v0/x1/e v%p_%lu, %u;\n",
|
||||
sig, use_word, bit);
|
||||
fprintf(vvp_out, "t_%u ;\n", skip_assign);
|
||||
fprintf(vvp_out, " %%evctl/c;\n");
|
||||
} else {
|
||||
/* Constant delay... */
|
||||
draw_eval_expr_into_integer(part_off_ex, 1);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ extern bool of_DIV_S(vthread_t thr, vvp_code_t code);
|
|||
extern bool of_DIV_WR(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_END(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_EVCTL(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_EVCTLC(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_EVCTLI(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_EVCTLS(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_FORCE_LINK(vthread_t thr, vvp_code_t code);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ const static struct opcode_table_s opcode_table[] = {
|
|||
{ "%div/wr", of_DIV_WR, 2, {OA_BIT1, OA_BIT2, OA_NONE} },
|
||||
{ "%end", of_END, 0, {OA_NONE, OA_NONE, OA_NONE} },
|
||||
{ "%evctl", of_EVCTL, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%evctl/c",of_EVCTLC, 0, {OA_NONE, OA_NONE, OA_NONE} },
|
||||
{ "%evctl/i",of_EVCTLI, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%evctl/s",of_EVCTLS, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%force/link",of_FORCE_LINK,2,{OA_FUNC_PTR,OA_FUNC_PTR2,OA_NONE} },
|
||||
|
|
|
|||
|
|
@ -308,6 +308,7 @@ right operand is 0, then the result is NaN.
|
|||
|
||||
|
||||
* %evctl <functor-label> <idx>
|
||||
* %evctl/c
|
||||
* %evctl/s <functor-label> <idx>
|
||||
* %evctl/i <functor-label> <value>
|
||||
|
||||
|
|
@ -318,6 +319,12 @@ by the %assign/e instructions to do not blocking event control. The
|
|||
register to read the repetition count from (signed or unsigned).
|
||||
%evctl/i sets the repetition to an immediate unsigned value.
|
||||
|
||||
%evctl/c clears the event control information. This is needed if a
|
||||
%assign/e may be skiped since the %assign/e statements clear the
|
||||
event control information and the other %evctl statements assert
|
||||
that this information has been cleared. You can get an assert if
|
||||
this information is not managed correctly.
|
||||
|
||||
|
||||
* %force/v <label>, <bit>, <wid>
|
||||
|
||||
|
|
|
|||
|
|
@ -2061,6 +2061,12 @@ bool of_EVCTL(vthread_t thr, vvp_code_t cp)
|
|||
thr->ecount = thr->words[cp->bit_idx[0]].w_uint;
|
||||
return true;
|
||||
}
|
||||
bool of_EVCTLC(vthread_t thr, vvp_code_t)
|
||||
{
|
||||
thr->event = 0;
|
||||
thr->ecount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool of_EVCTLI(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue