From 5533252cc14c5a1371be2c9be74d120d6ed6f234 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 6 Jan 2010 21:40:26 -0800 Subject: [PATCH] Add generic single-step-display for vvp_gen_event_s objects. This gives a little bit more specificity to the event step display. --- vvp/schedule.cc | 17 +++++++++++++++++ vvp/schedule.h | 1 + 2 files changed, 18 insertions(+) diff --git a/vvp/schedule.cc b/vvp/schedule.cc index 4d9d87941..a3eb41cc7 100644 --- a/vvp/schedule.cc +++ b/vvp/schedule.cc @@ -94,6 +94,11 @@ vvp_gen_event_s::~vvp_gen_event_s() { } +void vvp_gen_event_s::single_step_display(void) +{ + cerr << "vvp_gen_event_s: Step into event " << typeid(*this).name() << endl; +} + /* * Derived event types */ @@ -326,6 +331,7 @@ struct propagate_vector4_event_s : public event_s { vvp_vector4_t val; /* Action */ void run_run(void); + void single_step_display(void); }; void propagate_vector4_event_s::run_run(void) @@ -333,6 +339,11 @@ void propagate_vector4_event_s::run_run(void) net->send_vec4(val, 0); } +void propagate_vector4_event_s::single_step_display(void) +{ + cerr << "propagate_vector4_event: Propagate val=" << val << endl; +} + struct assign_array_r_word_s : public event_s { vvp_array_t mem; unsigned adr; @@ -368,6 +379,7 @@ struct generic_event_s : public event_s { vvp_gen_event_t obj; bool delete_obj_when_done; void run_run(void); + void single_step_display(void); static void* operator new(size_t); static void operator delete(void*); @@ -383,6 +395,11 @@ void generic_event_s::run_run(void) } } +void generic_event_s::single_step_display(void) +{ + obj->single_step_display(); +} + static const size_t GENERIC_CHUNK_COUNT = 131072 / sizeof(struct generic_event_s); static slab_t generic_event_heap; diff --git a/vvp/schedule.h b/vvp/schedule.h index ce1edc494..5393e3417 100644 --- a/vvp/schedule.h +++ b/vvp/schedule.h @@ -125,6 +125,7 @@ struct vvp_gen_event_s { virtual ~vvp_gen_event_s() =0; virtual void run_run() =0; + virtual void single_step_display(void); }; /*