source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp @ 112

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

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/*
2 * $Id: Comparator_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Comparator/include/Comparator.h"
9#include "Behavioural/include/Allocation.h"
10#include "Common/include/Max.h"
11
12namespace morpheo                    {
13namespace behavioural {
14namespace generic {
15namespace comparator {
16
17
18
19#undef  FUNCTION
20#define FUNCTION "Comparator::allocation"
21  void Comparator::allocation (
22#ifdef STATISTICS
23                               morpheo::behavioural::Parameters_Statistics * param_statistics
24#else
25                               void
26#endif
27                               )
28  {
29    log_begin(Comparator,FUNCTION);
30
31    _component   = new Component (_usage);
32
33    Entity * entity = _component->set_entity (_name       
34                                              ,"Comparator"
35#ifdef POSITION
36                                              ,COMBINATORY
37#endif
38                                              );
39
40    _interfaces = entity->set_interfaces();
41
42    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43    {
44      Interface * interface = _interfaces->set_interface(""
45#ifdef POSITION
46                                                         ,IN
47                                                         ,SOUTH,
48                                                         _("Generalist interface")
49#endif
50                                                         );
51     
52      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
53      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
54    }
55    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
56
57#ifdef POSITION
58    if (usage_is_set(_usage,USE_POSITION))
59        _component->generate_file();
60#endif
61
62    log_end(Comparator,FUNCTION);
63  };
64
65}; // end namespace comparator
66}; // end namespace generic
67
68}; // end namespace behavioural
69}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.