VHDL AST element for `wait on' statement
This commit is contained in:
parent
7677b59650
commit
1f9ed2c5ec
|
|
@ -435,8 +435,8 @@ static int draw_wait(vhdl_procedural *_proc, stmt_container *container,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_stmt(proc, container, ivl_stmt_sub_stmt(stmt));
|
|
||||||
container->add_stmt(new vhdl_wait_stmt(VHDL_WAIT_UNTIL, test));
|
container->add_stmt(new vhdl_wait_stmt(VHDL_WAIT_UNTIL, test));
|
||||||
|
draw_stmt(proc, container, ivl_stmt_sub_stmt(stmt));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,16 @@ void vhdl_wait_stmt::emit(std::ostream &of, int level) const
|
||||||
of << " until ";
|
of << " until ";
|
||||||
expr_->emit(of, level);
|
expr_->emit(of, level);
|
||||||
break;
|
break;
|
||||||
|
case VHDL_WAIT_ON:
|
||||||
|
{
|
||||||
|
string_list_t::const_iterator it = sensitivity_.begin();
|
||||||
|
while (it != sensitivity_.end()) {
|
||||||
|
of << *it;
|
||||||
|
if (++it != sensitivity_.end())
|
||||||
|
of << ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
of << ";";
|
of << ";";
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,8 @@ public:
|
||||||
enum vhdl_wait_type_t {
|
enum vhdl_wait_type_t {
|
||||||
VHDL_WAIT_INDEF, // Suspend indefinitely
|
VHDL_WAIT_INDEF, // Suspend indefinitely
|
||||||
VHDL_WAIT_FOR, // Wait for a constant amount of time
|
VHDL_WAIT_FOR, // Wait for a constant amount of time
|
||||||
VHDL_WAIT_UNTIL, // Wait on a sensitivity list
|
VHDL_WAIT_UNTIL, // Wait on an expression
|
||||||
|
VHDL_WAIT_ON, // Wait on a sensitivity list
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -325,6 +326,7 @@ public:
|
||||||
private:
|
private:
|
||||||
vhdl_wait_type_t type_;
|
vhdl_wait_type_t type_;
|
||||||
vhdl_expr *expr_;
|
vhdl_expr *expr_;
|
||||||
|
string_list_t sensitivity_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue