source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/main.cpp @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 1.7 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/include/test.h"
9
10#define NB_PARAMS 3
11
12void usage (int argc, char * argv[])
13{
14  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
15  err (_("list_params is :\n"));
16  err (_(" * nb_instruction                (uint32_t)\n"));
17  err (_(" * size_address                  (uint32_t)\n"));
18  err (_(" * size_branch_update_prediction (uint32_t)\n"));
19
20  exit (1);
21}
22
23#ifndef SYSTEMC
24int main    (int argc, char * argv[])
25#else
26int sc_main (int argc, char * argv[])
27#endif
28{
29  if (argc != static_cast<int>(2+NB_PARAMS))
30    usage (argc, argv);
31
32  uint32_t x = 1;
33
34  string name = argv[x++];
35 
36  uint32_t _nb_instruction                = fromString<uint32_t>(argv[x++]);
37  uint32_t _size_address                  = fromString<uint32_t>(argv[x++]);
38  uint32_t _size_branch_update_prediction = fromString<uint32_t>(argv[x++]);
39
40  int _return = EXIT_SUCCESS;
41  try 
42    {
43      morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Parameters
44        (_nb_instruction               ,
45         _size_address                 ,
46         _size_branch_update_prediction);
47     
48      msg(_("%s"),param->print(1).c_str());
49     
50      test (name,param);
51    }
52  catch (morpheo::ErrorMorpheo & error)
53    {
54      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
55      _return = EXIT_FAILURE;
56    }
57  catch (...)
58    {
59      err (_("<%s> : This test must generate a error.\n"),name.c_str());
60      _return = EXIT_FAILURE;
61    }
62
63  return (_return);
64}
Note: See TracBrowser for help on using the repository browser.