1 | #ifdef SYSTEMC |
---|
2 | /* |
---|
3 | * $Id: Decod_queue_genMoore.cpp 82 2008-05-01 16:48:45Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_front_end { |
---|
15 | namespace front_end { |
---|
16 | namespace decod_unit { |
---|
17 | namespace decod_queue { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Decod_queue::genMoore" |
---|
22 | void Decod_queue::genMoore (void) |
---|
23 | { |
---|
24 | log_begin(Decod_queue,FUNCTION); |
---|
25 | |
---|
26 | //-------------------------------------------------------------------- |
---|
27 | //-----[ DECOD_IN ]--------------------------------------------------- |
---|
28 | //-------------------------------------------------------------------- |
---|
29 | { |
---|
30 | Tcontrol_t ack = reg_QUEUE->size() < _param->_size_bank; |
---|
31 | |
---|
32 | for (uint32_t i=0; i<_param->_nb_inst_decod; i++) |
---|
33 | { |
---|
34 | internal_DECOD_IN_ACK [i] = ack; |
---|
35 | PORT_WRITE(out_DECOD_IN_ACK [i],ack); |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | //-------------------------------------------------------------------- |
---|
40 | //-----[ DECOD_OUT ]-------------------------------------------------- |
---|
41 | //-------------------------------------------------------------------- |
---|
42 | if (not reg_QUEUE->empty()) |
---|
43 | for (uint32_t i=0; i<_param->_nb_inst_decod; i++) |
---|
44 | { |
---|
45 | if (_param->_have_port_context_id) |
---|
46 | PORT_WRITE(out_DECOD_OUT_CONTEXT_ID [i],reg_QUEUE->front()->_context_id [i]); |
---|
47 | if (_param->_have_port_depth) |
---|
48 | PORT_WRITE(out_DECOD_OUT_DEPTH [i],reg_QUEUE->front()->_depth [i]); |
---|
49 | PORT_WRITE(out_DECOD_OUT_TYPE [i],reg_QUEUE->front()->_type [i]); |
---|
50 | PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [i]); |
---|
51 | PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]); |
---|
52 | PORT_WRITE(out_DECOD_OUT_ADDRESS [i],reg_QUEUE->front()->_address [i]); |
---|
53 | PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT [i],reg_QUEUE->front()->_has_immediat [i]); |
---|
54 | PORT_WRITE(out_DECOD_OUT_IMMEDIAT [i],reg_QUEUE->front()->_immediat [i]); |
---|
55 | PORT_WRITE(out_DECOD_OUT_READ_RA [i],reg_QUEUE->front()->_read_ra [i]); |
---|
56 | PORT_WRITE(out_DECOD_OUT_NUM_REG_RA [i],reg_QUEUE->front()->_num_reg_ra [i]); |
---|
57 | PORT_WRITE(out_DECOD_OUT_READ_RB [i],reg_QUEUE->front()->_read_rb [i]); |
---|
58 | PORT_WRITE(out_DECOD_OUT_NUM_REG_RB [i],reg_QUEUE->front()->_num_reg_rb [i]); |
---|
59 | PORT_WRITE(out_DECOD_OUT_READ_RC [i],reg_QUEUE->front()->_read_rc [i]); |
---|
60 | PORT_WRITE(out_DECOD_OUT_NUM_REG_RC [i],reg_QUEUE->front()->_num_reg_rc [i]); |
---|
61 | PORT_WRITE(out_DECOD_OUT_WRITE_RD [i],reg_QUEUE->front()->_write_rd [i]); |
---|
62 | PORT_WRITE(out_DECOD_OUT_NUM_REG_RD [i],reg_QUEUE->front()->_num_reg_rd [i]); |
---|
63 | PORT_WRITE(out_DECOD_OUT_WRITE_RE [i],reg_QUEUE->front()->_write_re [i]); |
---|
64 | PORT_WRITE(out_DECOD_OUT_NUM_REG_RE [i],reg_QUEUE->front()->_num_reg_re [i]); |
---|
65 | PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]); |
---|
66 | } |
---|
67 | |
---|
68 | //-------------------------------------------------------------------- |
---|
69 | //-----[ NB_INST ]---------------------------------------------------- |
---|
70 | //-------------------------------------------------------------------- |
---|
71 | for (uint32_t i=0; i<_param->_nb_context; i++) |
---|
72 | PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]); |
---|
73 | |
---|
74 | log_end(Decod_queue,FUNCTION); |
---|
75 | }; |
---|
76 | |
---|
77 | }; // end namespace decod_queue |
---|
78 | }; // end namespace decod_unit |
---|
79 | }; // end namespace front_end |
---|
80 | }; // end namespace multi_front_end |
---|
81 | }; // end namespace core |
---|
82 | |
---|
83 | }; // end namespace behavioural |
---|
84 | }; // end namespace morpheo |
---|
85 | #endif |
---|