source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMealy.cpp @ 118

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

1) Stat List : scan all queue to find free register
2) Write_queue : test "genMealy" add bypass [0]
3) Functionnal_unit : add const parameters to add or not the pipeline_in
4) Load Store Unit : if load make an exception, free nb_check
5) Debug, change test to add model

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Functionnal_unit_genMealy.cpp 118 2009-05-20 22:01:32Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_execute_loop {
15namespace execute_loop {
16namespace multi_execute_unit {
17namespace execute_unit {
18namespace functionnal_unit {
19
20
21#undef  FUNCTION
22#define FUNCTION "Functionnal_unit::genMealy"
23  void Functionnal_unit::genMealy (void)
24  {
25    log_begin(Functionnal_unit,FUNCTION);
26    log_function(Functionnal_unit,FUNCTION,_name.c_str());
27
28    if (PORT_READ(in_NRESET) != 0)
29      {
30        {
31          // Can out if : have an instruction and is finish (latence == 0)
32          internal_EXECUTE_OUT_VAL = (reg_BUSY_OUT and (_execute_operation_out->_timing._latence == 0));
33         
34          PORT_WRITE(out_EXECUTE_OUT_VAL, internal_EXECUTE_OUT_VAL);
35        }
36       
37        {
38          // Can accept an instruction if :
39          //  * pipeline in is not busy (not previous instruction)
40          //  * pipeline in is     busy (    previous instruction) and the instruction go to pipeline out
41          if (_param->_have_pipeline_in)
42            {         
43          internal_EXECUTE_IN_ACK = (not reg_BUSY_IN or
44                                     (reg_BUSY_IN and (not reg_BUSY_OUT or
45                                                       (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK)))));
46            }
47          else
48            {
49          internal_EXECUTE_IN_ACK = (not reg_BUSY_OUT or
50                                     (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK)));
51            }
52
53          PORT_WRITE(out_EXECUTE_IN_ACK , internal_EXECUTE_IN_ACK);
54        }
55      }
56
57    log_end(Functionnal_unit,FUNCTION);
58  };
59
60}; // end namespace functionnal_unit
61}; // end namespace execute_unit
62}; // end namespace multi_execute_unit
63}; // end namespace execute_loop
64}; // end namespace multi_execute_loop
65}; // end namespace core
66}; // end namespace behavioural
67}; // end namespace morpheo             
68#endif
Note: See TracBrowser for help on using the repository browser.