[88] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: Front_end_Glue_genMealy_depth.cpp 123 2009-06-08 20:43:30Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace front_end_glue { |
---|
| 17 | |
---|
| 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Front_end_Glue::genMealy_depth" |
---|
| 20 | void Front_end_Glue::genMealy_depth (void) |
---|
| 21 | { |
---|
| 22 | log_begin(Front_end_Glue,FUNCTION); |
---|
| 23 | |
---|
[123] | 24 | if (PORT_READ(in_NRESET)) |
---|
| 25 | { |
---|
[88] | 26 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 27 | { |
---|
| 28 | if (_param->_have_port_depth) |
---|
| 29 | { |
---|
[101] | 30 | Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]); |
---|
| 31 | PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min); |
---|
| 32 | PORT_WRITE(out_DEPTH_MIN [i],min); |
---|
| 33 | PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i])); |
---|
[88] | 34 | } |
---|
[101] | 35 | PORT_WRITE(out_DEPTH_FULL [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [i])); |
---|
[88] | 36 | } |
---|
| 37 | |
---|
| 38 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
| 39 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
| 40 | { |
---|
| 41 | uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j]; |
---|
| 42 | |
---|
[101] | 43 | PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH_VAL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_VAL [num_context])); |
---|
[88] | 44 | if (_param->_have_port_depth) |
---|
| 45 | { |
---|
[101] | 46 | PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context])); |
---|
| 47 | PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [num_context])); |
---|
| 48 | PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [num_context])); |
---|
[88] | 49 | } |
---|
[101] | 50 | PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [num_context])); |
---|
[88] | 51 | } |
---|
[123] | 52 | } |
---|
[88] | 53 | |
---|
| 54 | log_end(Front_end_Glue,FUNCTION); |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | }; // end namespace front_end_glue |
---|
| 58 | }; // end namespace front_end |
---|
| 59 | }; // end namespace multi_front_end |
---|
| 60 | }; // end namespace core |
---|
| 61 | |
---|
| 62 | }; // end namespace behavioural |
---|
| 63 | }; // end namespace morpheo |
---|
| 64 | #endif |
---|