source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_genMoore.cpp @ 100

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

1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Queue_genMoore.cpp 100 2009-01-08 13:06:27Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Queue/include/Queue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace queue {
15
16#undef  FUNCTION
17#define FUNCTION "Queue::genMoore"
18  void Queue::genMoore (void)
19  {
20    log_printf(FUNC,Queue,FUNCTION,"Begin");
21
22    // Output
23    internal_INSERT_ACK = not _queue_control->full();
24    internal_RETIRE_VAL = not _queue_control->empty();
25   
26    PORT_WRITE(out_INSERT_ACK , internal_INSERT_ACK);
27    PORT_WRITE(out_RETIRE_VAL , internal_RETIRE_VAL);
28    PORT_WRITE(out_RETIRE_DATA,_queue_data[(*_queue_control)[0]]);
29
30    // Slot
31    // Note : Slot 0 is the same slot as retire interface.
32    uint32_t nb_elt = _queue_control->nb_elt();
33
34    for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
35      {
36        PORT_WRITE(out_SLOT_VAL  [i], i<nb_elt);
37        PORT_WRITE(out_SLOT_DATA [i],_queue_data[(*_queue_control)[i]]);
38      }
39
40    log_printf(FUNC,Queue,FUNCTION,"End");
41  };
42
43}; // end namespace queue
44}; // end namespace generic
45
46}; // end namespace behavioural
47}; // end namespace morpheo             
48#endif
Note: See TracBrowser for help on using the repository browser.