source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Decod_queue_genMoore.cpp 88 2008-12-10 18:31:39Z 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
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace decod_unit {
17namespace 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    log_function(Decod_queue,FUNCTION,_name.c_str());
26
27    //--------------------------------------------------------------------
28    //-----[ DECOD_IN ]---------------------------------------------------
29    //--------------------------------------------------------------------
30    {
31      Tcontrol_t ack = reg_QUEUE->size() < _param->_size_bank;
32
33      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
34        {
35          internal_DECOD_IN_ACK [i] = ack;
36          PORT_WRITE(out_DECOD_IN_ACK [i],ack);
37        }
38    }
39
40    //--------------------------------------------------------------------
41    //-----[ DECOD_OUT ]--------------------------------------------------
42    //--------------------------------------------------------------------
43    if (not reg_QUEUE->empty())
44      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
45        {
46          if (_param->_have_port_context_id)
47          PORT_WRITE(out_DECOD_OUT_CONTEXT_ID    [i],reg_QUEUE->front()->_context_id    [i]);
48          if (_param->_have_port_depth)
49          PORT_WRITE(out_DECOD_OUT_DEPTH         [i],reg_QUEUE->front()->_depth         [i]);
50          PORT_WRITE(out_DECOD_OUT_TYPE          [i],reg_QUEUE->front()->_type          [i]);
51          PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [i]);
52          PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
53          PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
54          PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [i]);
55          PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT  [i],reg_QUEUE->front()->_has_immediat  [i]);
56          PORT_WRITE(out_DECOD_OUT_IMMEDIAT      [i],reg_QUEUE->front()->_immediat      [i]);
57          PORT_WRITE(out_DECOD_OUT_READ_RA       [i],reg_QUEUE->front()->_read_ra       [i]);
58          PORT_WRITE(out_DECOD_OUT_NUM_REG_RA    [i],reg_QUEUE->front()->_num_reg_ra    [i]);
59          PORT_WRITE(out_DECOD_OUT_READ_RB       [i],reg_QUEUE->front()->_read_rb       [i]);
60          PORT_WRITE(out_DECOD_OUT_NUM_REG_RB    [i],reg_QUEUE->front()->_num_reg_rb    [i]);
61          PORT_WRITE(out_DECOD_OUT_READ_RC       [i],reg_QUEUE->front()->_read_rc       [i]);
62          PORT_WRITE(out_DECOD_OUT_NUM_REG_RC    [i],reg_QUEUE->front()->_num_reg_rc    [i]);
63          PORT_WRITE(out_DECOD_OUT_WRITE_RD      [i],reg_QUEUE->front()->_write_rd      [i]);
64          PORT_WRITE(out_DECOD_OUT_NUM_REG_RD    [i],reg_QUEUE->front()->_num_reg_rd    [i]);
65          PORT_WRITE(out_DECOD_OUT_WRITE_RE      [i],reg_QUEUE->front()->_write_re      [i]);
66          PORT_WRITE(out_DECOD_OUT_NUM_REG_RE    [i],reg_QUEUE->front()->_num_reg_re    [i]);
67          PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]);
68          PORT_WRITE(out_DECOD_OUT_EXCEPTION     [i],reg_QUEUE->front()->_exception     [i]);
69        }
70
71    //--------------------------------------------------------------------
72    //-----[ NB_INST ]----------------------------------------------------
73    //--------------------------------------------------------------------
74    for (uint32_t i=0; i<_param->_nb_context; i++)
75      PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]);
76
77    log_end(Decod_queue,FUNCTION);
78  };
79
80}; // end namespace decod_queue
81}; // end namespace decod_unit
82}; // end namespace front_end
83}; // end namespace multi_front_end
84}; // end namespace core
85
86}; // end namespace behavioural
87}; // end namespace morpheo             
88#endif
Note: See TracBrowser for help on using the repository browser.