source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_access_genMealy_insert.cpp @ 138

Last change on this file since 138 was 138, checked in by rosiere, 14 years ago

1) add counters_t type for interface
2) fix in check load in load_store_unit
3) add parameters (but not yet implemented)
4) change environment and add script (distcc_env.sh ...)
5) add warning if an unser change rename flag with l.mtspr instruction
6) ...

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#ifdef SYSTEMC
2//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
3/*
4 * $Id: Load_store_unit_function_speculative_load_access_genMealy_insert.cpp 138 2010-05-12 17:34:01Z rosiere $
5 *
6 * [ Description ]
7 *
8 */
9
10#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace multi_execute_loop {
16namespace execute_loop {
17namespace multi_execute_unit {
18namespace execute_unit {
19namespace load_store_unit {
20
21
22#undef  FUNCTION
23#define FUNCTION "Load_store_unit::function_speculative_load_access_genMealy_insert"
24  void Load_store_unit::function_speculative_load_access_genMealy_insert (void)
25  {
26    log_begin(Load_store_unit,FUNCTION);
27    log_function(Load_store_unit,FUNCTION,_name.c_str());
28
29    // ~~~~~[ Output "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30   
31    // Initialisation
32    internal_MEMORY_IN_PORT = 0;
33    Tcontrol_t ack [_param->_nb_inst_memory];
34    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
35      ack [i] = 0;
36
37    if (PORT_READ(in_NRESET))
38      {
39    // find first valid entry
40    // store queue is never full (pointer is manage by rename stage)
41    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
42      if (PORT_READ(in_MEMORY_IN_VAL [i]))
43        {
44          internal_MEMORY_IN_ACK = is_operation_memory_store(PORT_READ(in_MEMORY_IN_OPERATION [i])) or not _speculative_access_queue_control->full();
45
46          if (internal_MEMORY_IN_ACK)
47            {
48              ack [i] = 1;
49              internal_MEMORY_IN_PORT = i;
50              break; // end
51            }
52        }
53      }
54    else
55      {
56        internal_MEMORY_IN_ACK = 0;
57//         internal_MEMORY_IN_PORT = i;
58      }
59
60    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
61      PORT_WRITE(out_MEMORY_IN_ACK [i], ack [i]);
62
63    log_end(Load_store_unit,FUNCTION);
64  };
65
66}; // end namespace load_store_unit
67}; // end namespace execute_unit
68}; // end namespace multi_execute_unit
69}; // end namespace execute_loop
70}; // end namespace multi_execute_loop
71}; // end namespace core
72
73}; // end namespace behavioural
74}; // end namespace morpheo             
75#endif
76//#endif
Note: See TracBrowser for help on using the repository browser.