#include <defines.h>
Data Fields | |
func_unit * | funit |
thread * | parent |
statement * | curr |
reentrant * | ren |
union { | |
uint8 all | |
struct { | |
uint8 state: 2 | |
uint8 kill: 1 | |
uint8 exec_first: 1 | |
} part | |
} | suppl |
unsigned | active_children |
thread * | queue_prev |
thread * | queue_next |
thread * | all_prev |
thread * | all_next |
sim_time | curr_time |
Simulator feature that keeps track of head pointer for a given thread along with pointers to the parent and children thread of this thread. Threads allow us to handle task calls and fork/join statements.
unsigned thread_s::active_children |
Set to the number of children threads in active thread queue
Referenced by expression_op_func__join(), sim_add_thread(), and sim_kill_thread().
uint8 thread_s::all |
Referenced by sim_add_thread(), and sim_create_thread().
Pointer to next thread in all pool
Referenced by sim_create_thread(), sim_dealloc(), sim_display_all_list(), sim_display_thread(), sim_kill_thread(), and sim_kill_thread_with_funit().
Pointer to previous thread in all pool
Referenced by sim_create_thread(), sim_display_thread(), and sim_kill_thread().
Pointer to current statement running in this thread
Referenced by funit_push_threads(), sim_add_thread(), sim_create_thread(), sim_display_thread(), sim_thread(), sim_thread_pop_head(), and sim_thread_push().
Set to the current simulation time for this thread
Referenced by expression_op_func__add_a(), expression_op_func__and_a(), expression_op_func__arshift_a(), expression_op_func__assign(), expression_op_func__delay(), expression_op_func__divide_a(), expression_op_func__dly_assign(), expression_op_func__func_call(), expression_op_func__idec(), expression_op_func__iinc(), expression_op_func__lshift_a(), expression_op_func__mod_a(), expression_op_func__multiply_a(), expression_op_func__nb_call(), expression_op_func__or_a(), expression_op_func__passign(), expression_op_func__pdec(), expression_op_func__pinc(), expression_op_func__random(), expression_op_func__realtime(), expression_op_func__rshift_a(), expression_op_func__sub_a(), expression_op_func__time(), expression_op_func__trigger(), expression_op_func__urandom(), expression_op_func__value_plusargs(), expression_op_func__xor_a(), sim_add_thread(), sim_create_thread(), sim_display_thread(), sim_kill_thread(), sim_simulate(), sim_thread_insert_into_delay_queue(), and sim_thread_push().
uint8 thread_s::exec_first |
Set to TRUE when the first statement is being executed
Pointer to functional unit that this thread is running for
Referenced by expression_op_func__bitstoreal(), expression_op_func__bitstoshortreal(), expression_op_func__func_call(), expression_op_func__itor(), expression_op_func__passign(), expression_op_func__realtime(), expression_op_func__realtobits(), expression_op_func__rtoi(), expression_op_func__shortrealtobits(), expression_op_func__test_plusargs(), expression_op_func__time(), expression_op_func__urandom_range(), expression_op_func__value_plusargs(), sim_create_thread(), sim_kill_thread(), sim_kill_thread_with_funit(), and sim_thread().
uint8 thread_s::kill |
Set to TRUE if this thread should be killed
Pointer to parent thread that spawned this thread
Referenced by sim_add_thread(), sim_create_thread(), sim_display_thread(), and sim_kill_thread().
struct { ... } thread_s::part |
Referenced by expression_op_func__aedge(), expression_op_func__delay(), expression_op_func__dly_assign(), expression_op_func__dly_op(), expression_op_func__nedge(), expression_op_func__pedge(), funit_push_threads(), sim_add_thread(), sim_display_thread(), sim_expression(), sim_kill_thread(), sim_kill_thread_with_funit(), sim_simulate(), sim_thread(), sim_thread_insert_into_delay_queue(), sim_thread_pop_head(), and sim_thread_push().
Pointer to next thread in active/delayed queue
Referenced by sim_add_thread(), sim_create_thread(), sim_display_queue(), sim_display_thread(), sim_kill_thread(), sim_simulate(), sim_thread_insert_into_delay_queue(), sim_thread_pop_head(), and sim_thread_push().
Pointer to previous thread in active/delayed queue
Referenced by sim_add_thread(), sim_create_thread(), sim_display_thread(), sim_kill_thread(), sim_simulate(), sim_thread_insert_into_delay_queue(), sim_thread_pop_head(), and sim_thread_push().
Pointer to re-entrant structure to use for this thread
Referenced by expression_op_func__func_call(), expression_op_func__passign(), sim_create_thread(), and sim_thread().
uint8 thread_s::state |
Set to current state of this thread (see Thread States for legal values)
union { ... } thread_s::suppl |
Referenced by expression_op_func__aedge(), expression_op_func__delay(), expression_op_func__dly_assign(), expression_op_func__dly_op(), expression_op_func__nedge(), expression_op_func__pedge(), funit_push_threads(), sim_add_thread(), sim_create_thread(), sim_display_thread(), sim_expression(), sim_kill_thread(), sim_kill_thread_with_funit(), sim_simulate(), sim_thread(), sim_thread_insert_into_delay_queue(), sim_thread_pop_head(), and sim_thread_push().