1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Generic/Shifter/include/Shifter.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace generic { |
---|
14 | namespace shifter { |
---|
15 | |
---|
16 | |
---|
17 | void Shifter::deallocation (void) |
---|
18 | { |
---|
19 | #if (defined(STATISTICS) || defined (VHDL_TESTBENCH)) |
---|
20 | delete in_CLOCK; |
---|
21 | #endif |
---|
22 | |
---|
23 | // Interface "shifter" |
---|
24 | for (uint32_t i=0; i<_param._nb_port; i++) |
---|
25 | { |
---|
26 | delete in_SHIFTER_DATA [i]; |
---|
27 | if (_param._shift_value == 0) |
---|
28 | delete in_SHIFTER_SHIFT [i]; |
---|
29 | if (_param._direction == external_direction) |
---|
30 | delete in_SHIFTER_DIRECTION [i]; |
---|
31 | if (_param._rotate == external_rotate) |
---|
32 | delete in_SHIFTER_TYPE [i]; |
---|
33 | if (_param._carry == external_carry) |
---|
34 | delete in_SHIFTER_CARRY [i]; |
---|
35 | if (_param._carry == external_completion) |
---|
36 | if (_param._type_completion_bool == true) |
---|
37 | delete in_SHIFTER_CARRY_IN [i]; |
---|
38 | else |
---|
39 | delete in_SHIFTER_COMPLETION[i]; |
---|
40 | delete out_SHIFTER_DATA [i]; |
---|
41 | } |
---|
42 | |
---|
43 | delete in_SHIFTER_DATA ; |
---|
44 | if (_param._shift_value == 0) |
---|
45 | delete in_SHIFTER_SHIFT ; |
---|
46 | if (_param._direction == external_direction ) |
---|
47 | delete in_SHIFTER_DIRECTION ; |
---|
48 | if (_param._rotate == external_rotate ) |
---|
49 | delete in_SHIFTER_TYPE ; |
---|
50 | if (_param._carry == external_carry ) |
---|
51 | delete in_SHIFTER_CARRY ; |
---|
52 | if (_param._carry == external_completion) |
---|
53 | if (_param._type_completion_bool == true) |
---|
54 | delete in_SHIFTER_CARRY_IN ; |
---|
55 | else |
---|
56 | delete in_SHIFTER_COMPLETION; |
---|
57 | delete out_SHIFTER_DATA ; |
---|
58 | }; |
---|
59 | |
---|
60 | }; // end namespace shifter |
---|
61 | }; // end namespace generic |
---|
62 | |
---|
63 | }; // end namespace behavioural |
---|
64 | }; // end namespace morpheo |
---|
65 | #endif |
---|