[78] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: Ifetch_unit_Glue_genMealy_event.cpp 123 2009-06-08 20:43:30Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Ifetch_unit_Glue.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace ifetch_unit { |
---|
| 17 | namespace ifetch_unit_glue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Ifetch_unit_Glue::genMealy_event" |
---|
| 22 | void Ifetch_unit_Glue::genMealy_event (void) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin"); |
---|
| 25 | |
---|
[123] | 26 | if (PORT_READ(in_NRESET)) |
---|
| 27 | { |
---|
[78] | 28 | Tcontrol_t address_ack = PORT_READ(in_EVENT_ADDRESS_ACK); |
---|
| 29 | Tcontrol_t queue_ack = PORT_READ(in_EVENT_QUEUE_ACK ); |
---|
| 30 | Tcontrol_t val = PORT_READ(in_EVENT_VAL ); |
---|
| 31 | |
---|
| 32 | PORT_WRITE(out_EVENT_ACK , address_ack and queue_ack); |
---|
| 33 | PORT_WRITE(out_EVENT_ADDRESS_VAL, val and queue_ack); |
---|
| 34 | PORT_WRITE(out_EVENT_QUEUE_VAL , address_ack and val); |
---|
[123] | 35 | } |
---|
| 36 | else |
---|
| 37 | { |
---|
| 38 | PORT_WRITE(out_EVENT_ACK , 0); |
---|
| 39 | PORT_WRITE(out_EVENT_ADDRESS_VAL, 0); |
---|
| 40 | PORT_WRITE(out_EVENT_QUEUE_VAL , 0); |
---|
| 41 | } |
---|
| 42 | |
---|
[78] | 43 | log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End"); |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | }; // end namespace ifetch_unit_glue |
---|
| 47 | }; // end namespace ifetch_unit |
---|
| 48 | }; // end namespace front_end |
---|
| 49 | }; // end namespace multi_front_end |
---|
| 50 | }; // end namespace core |
---|
| 51 | |
---|
| 52 | }; // end namespace behavioural |
---|
| 53 | }; // end namespace morpheo |
---|
| 54 | #endif |
---|