1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h" |
---|
10 | |
---|
11 | namespace morpheo{ |
---|
12 | namespace behavioural { |
---|
13 | namespace generic { |
---|
14 | namespace select { |
---|
15 | namespace select_priority_fixed { |
---|
16 | |
---|
17 | void Select_Priority_Fixed::allocation (void) |
---|
18 | { |
---|
19 | string rename; |
---|
20 | |
---|
21 | log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin"); |
---|
22 | |
---|
23 | #ifdef POSITION |
---|
24 | _position = new Position (); |
---|
25 | |
---|
26 | Entity * entity = _position->set_entity (_name , |
---|
27 | "Select_Priority_Fixed", |
---|
28 | COMBINATORY ); |
---|
29 | |
---|
30 | _interfaces = entity->set_interfaces(); |
---|
31 | #else |
---|
32 | _interfaces = new Interfaces(); |
---|
33 | #endif |
---|
34 | |
---|
35 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
36 | |
---|
37 | Interface * interface_ = _interfaces->set_interface("" , |
---|
38 | IN , |
---|
39 | WEST, |
---|
40 | "..."); |
---|
41 | |
---|
42 | in_CLOCK = interface_->set_signal_clk ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO); |
---|
43 | in_NRESET = interface_->set_signal_in <Tcontrol_t> ("nreset",1); |
---|
44 | in_VAL = new SC_IN (Tcontrol_t) * [_param._nb_entity]; |
---|
45 | if (_param._encoding_one_hot) |
---|
46 | out_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_entity]; |
---|
47 | |
---|
48 | for (uint32_t i=0; i<_param._nb_entity; i++) |
---|
49 | { |
---|
50 | in_VAL [i] = interface_->set_signal_in <Tcontrol_t> ("val_"+toString(i),1); |
---|
51 | if (_param._encoding_one_hot) |
---|
52 | out_ACK [i] = interface_->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1); |
---|
53 | } |
---|
54 | |
---|
55 | if (_param._encoding_compact) |
---|
56 | { |
---|
57 | out_ENTITY = interface_->set_signal_out <Tentity_t > ("entity" , _param._size_entity); |
---|
58 | out_ENTITY_ACK = interface_->set_signal_out <Tcontrol_t> ("entity_ack", 1); |
---|
59 | } |
---|
60 | |
---|
61 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
62 | |
---|
63 | #ifdef POSITION |
---|
64 | _position->generate_file(); |
---|
65 | #endif |
---|
66 | |
---|
67 | log_printf(FUNC,Select_Priority_Fixed,"allocation","End"); |
---|
68 | }; |
---|
69 | |
---|
70 | }; // end namespace select_priority_fixed |
---|
71 | }; // end namespace select |
---|
72 | }; // end namespace generic |
---|
73 | }; // end namespace behavioural |
---|
74 | }; // end namespace morpheo |
---|
75 | #endif |
---|