I define a variable my_reg_file
in function post_access()
(this function is a vr_ad
hook for implementing side effects):
//file1.e
extend TIMER_LOAD_0 vr_ad_reg {
post_access(direction : vr_ad_rw_t) is first {
var my_reg_file : TIMER vr_ad_reg_file =
get_parents()[0].as_a(TIMER vr_ad_reg_file);
....
};
};
Then I extend this function in another e file:
//file2.e
extend TIMER_LOAD_0 vr_ad_reg {
post_access(direction : vr_ad_rw_t) is also {
start my_reg_file.some_tcm();
};
};
I get a compilation error:
*** Error: No such variable 'my_reg_file'
Why post_access()
does not recognizes the variable my_reg_file
? Thank you for your help.
Note: file1.e is imported before file2.e