1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Front_end_Glue_genMealy_depth.cpp 101 2009-01-15 17:19:08Z 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 | |
---|
24 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
25 | { |
---|
26 | if (_param->_have_port_depth) |
---|
27 | { |
---|
28 | Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]); |
---|
29 | PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min); |
---|
30 | PORT_WRITE(out_DEPTH_MIN [i],min); |
---|
31 | PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i])); |
---|
32 | } |
---|
33 | PORT_WRITE(out_DEPTH_FULL [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [i])); |
---|
34 | } |
---|
35 | |
---|
36 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
37 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
38 | { |
---|
39 | uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j]; |
---|
40 | |
---|
41 | PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH_VAL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_VAL [num_context])); |
---|
42 | if (_param->_have_port_depth) |
---|
43 | { |
---|
44 | PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context])); |
---|
45 | PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [num_context])); |
---|
46 | PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [num_context])); |
---|
47 | } |
---|
48 | PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [num_context])); |
---|
49 | } |
---|
50 | |
---|
51 | log_end(Front_end_Glue,FUNCTION); |
---|
52 | }; |
---|
53 | |
---|
54 | }; // end namespace front_end_glue |
---|
55 | }; // end namespace front_end |
---|
56 | }; // end namespace multi_front_end |
---|
57 | }; // end namespace core |
---|
58 | |
---|
59 | }; // end namespace behavioural |
---|
60 | }; // end namespace morpheo |
---|
61 | #endif |
---|