Changeset 113 for trunk/IPs


Ignore:
Timestamp:
Apr 14, 2009, 8:39:12 PM (15 years ago)
Author:
rosiere
Message:

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

Location:
trunk/IPs/systemC
Files:
62 added
1 deleted
259 edited
12 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/Cache/Makefile

    r88 r113  
    1 #-----[ Directory ]----------------------------------------
    2 
    3 DIR_QUEUE                       = ../Queue
    4 
    5 #-----[ Variable ]-----------------------------------------
    6 
    7 ENTITY                         ?= Cache
    8 
    9 OBJECTS_DEPS                    = $(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp))
    10 
    111#-----[ Rules ]--------------------------------------------
    122
     
    2616                                @$(MAKE) environment_help
    2717
    28 include                         ../Makefile.Environment
     18include                         Makefile.defs
     19include                         $(DIR_ENVIRONMENT)/Makefile.Environment
  • trunk/IPs/systemC/Environment/Data/Makefile

    r88 r113  
    1 #-----[ Directory ]----------------------------------------
    2 
    3 # DIR_ENDIANNESS                        = ../Endianness
    4 
    5 #-----[ Variable ]-----------------------------------------
    6 
    7 ENTITY                         ?= Data
    8 
    9 # OBJECTS_DEPS                  = $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))
    10 
    111#-----[ Rules ]--------------------------------------------
    122
    133all                             :
    14                                 @\
    15                                 $(MAKE) all_environment
    16 
    17 #                               $(MAKE) --directory=$(DIR_ENDIANNESS) all; \
     4                                @$(MAKE) all_environment
    185
    196clean                           :
    20                                 @\
    21                                 $(MAKE) environment_clean
    22 
    23 #                               $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
     7                                @$(MAKE) environment_clean
    248
    259clean_all                       : clean
     
    2812                                @$(MAKE) environment_help
    2913
    30 include                         ../Makefile.Environment
     14include                         Makefile.defs
     15include                         $(DIR_ENVIRONMENT)/Makefile.Environment
  • trunk/IPs/systemC/Environment/Endianness/Makefile

    r88 r113  
    1 #-----[ Directory ]----------------------------------------
    2 
    3 #-----[ Variable ]-----------------------------------------
    4 
    5 ENTITY                         ?= Endianness
    6 
    7 #OBJECTS_DEPS                   =
    8 
    91#-----[ Rules ]--------------------------------------------
    102
     
    2214                                @$(MAKE) environment_help
    2315
    24 include                         ../Makefile.Environment
     16include                         Makefile.defs
     17include                         $(DIR_ENVIRONMENT)/Makefile.Environment
  • trunk/IPs/systemC/Environment/Makefile

    r88 r113  
     1ifeq ($(origin MORPHEO_TMP), undefined)
     2        $(error "variable MORPHEO_TMP      is undefined");
     3endif
     4
    15#-----[ Directory ]----------------------------------------
     6DIR_LIB                         = $(DIR_TMP)/lib
     7DIR_ENVIRONMENT                 = .
     8DIR_CACHE                       = Cache
     9DIR_DATA                        = Data
     10DIR_ENDIANNESS                  = Endianness
     11DIR_QUEUE                       = Queue
     12DIR_RAMLOCK                     = RamLock
     13DIR_SIM2OS                      = Sim2OS
     14DIR_TTY                         = TTY
    215
    3 DIR_LIB                         = ./lib
    4 DIR_CACHE                       = ./Cache
    5 DIR_DATA                        = ./Data
    6 DIR_ENDIANNESS                  = ./Endianness
    7 DIR_QUEUE                       = ./Queue
    8 DIR_RAMLOCK                     = ./RamLock
    9 DIR_SIM2OS                      = ./Sim2OS
    10 DIR_TTY                         = ./TTY
     16include $(DIR_CACHE)/Makefile.defs
     17include $(DIR_DATA)/Makefile.defs
     18include $(DIR_ENDIANNESS)/Makefile.defs
     19include $(DIR_QUEUE)/Makefile.defs
     20include $(DIR_RAMLOCK)/Makefile.defs
     21include $(DIR_SIM2OS)/Makefile.defs
     22include $(DIR_TTY)/Makefile.defs
    1123
    1224#-----[ Variable ]-----------------------------------------
    13 ENTITY                         ?=       Environment
    1425
    15 LIBRARY_NAME                    = Environment
    16 LIBRARY_FILE                    = $(DIR_LIB)/lib$(LIBRARY_NAME).a
     26ENTITY                          := Environment
     27DIR_SRC                          = $(DIR_ENVIRONMENT)/src
    1728
    18 OBJECTS_DEPS                    =       $(patsubst $(DIR_CACHE)/$(DIR_SRC)/%.cpp,$(DIR_CACHE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_CACHE)/$(DIR_SRC)/*.cpp))                 \
    19                                         $(patsubst $(DIR_DATA)/$(DIR_SRC)/%.cpp,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.cpp))                    \
    20                                         $(patsubst $(DIR_DATA)/$(DIR_SRC)/%.c,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.c))                        \
    21                                         $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))  \
    22                                         $(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp))                 \
    23                                         $(patsubst $(DIR_RAMLOCK)/$(DIR_SRC)/%.cpp,$(DIR_RAMLOCK)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_RAMLOCK)/$(DIR_SRC)/*.cpp))           \
    24                                         $(patsubst $(DIR_SIM2OS)/$(DIR_SRC)/%.cpp,$(DIR_SIM2OS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_SIM2OS)/$(DIR_SRC)/*.cpp))              \
    25                                         $(patsubst $(DIR_TTY)/$(DIR_SRC)/%.cpp,$(DIR_TTY)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_TTY)/$(DIR_SRC)/*.cpp))                       
     29include                          $(DIR_ENVIRONMENT)/Makefile.defs
    2630
     31LIBRARY_NAME                    := $(ENTITY)
     32LIBRARY_FILE                    := $(DIR_LIB)/lib$(LIBRARY_NAME).a
     33
     34Environment_OBJECTS_DEPS        :=      $(OBJECTS) \
     35                                        $(Cache_OBJECTS_DEPS) \
     36                                        $(Data_OBJECTS_DEPS) \
     37                                        $(Endianness_OBJECTS_DEPS) \
     38                                        $(Queue_OBJECTS_DEPS) \
     39                                        $(RamLock_OBJECTS_DEPS) \
     40                                        $(Sim2OS_OBJECTS_DEPS) \
     41                                        $(TTY_OBJECTS_DEPS)
    2742
    2843#-----[ Rules ]--------------------------------------------
    2944
    30 all                             : a b c d e f g
     45all                             :
    3146                                @\
    3247                                $(MAKE) all_environment; \
     48                                $(MAKE) --directory=$(DIR_CACHE)      all; \
     49                                $(MAKE) --directory=$(DIR_DATA)       all; \
     50                                $(MAKE) --directory=$(DIR_ENDIANNESS) all; \
     51                                $(MAKE) --directory=$(DIR_QUEUE)      all; \
     52                                $(MAKE) --directory=$(DIR_RAMLOCK)    all; \
     53                                $(MAKE) --directory=$(DIR_SIM2OS)     all; \
     54                                $(MAKE) --directory=$(DIR_TTY)        all; \
    3355                                $(MAKE) $(LIBRARY_FILE);
    3456
    35 a                               :
    36                                 @\
    37                                 $(MAKE) --directory=$(DIR_CACHE)      all;
    3857
    39 b                               :
    40                                 @\
    41                                 $(MAKE) --directory=$(DIR_DATA)       all;
    42 
    43 c                               :
    44                                 @\
    45                                 $(MAKE) --directory=$(DIR_ENDIANNESS) all;
    46 
    47 d                               :
    48                                 @\
    49                                 $(MAKE) --directory=$(DIR_QUEUE)      all;
    50 
    51 e                               :
    52                                 @\
    53                                 $(MAKE) --directory=$(DIR_RAMLOCK)    all;
    54 
    55 f                               :
    56                                 @\
    57                                 $(MAKE) --directory=$(DIR_SIM2OS)     all;
    58 
    59 g                               :
    60                                 @\
    61                                 $(MAKE) --directory=$(DIR_TTY)        all;
    62 
    63 
    64 $(LIBRARY_FILE)                 : $(OBJECTS_DEPS) $(OBJECTS) $(DIR_LIB)
     58$(LIBRARY_FILE)                 : $(Environment_OBJECTS_DEPS)
    6559                                @\
    6660                                $(ECHO) "Archive            : $@";\
    67                                 $(AR)  -r $@ $(OBJECTS_DEPS) $(OBJECTS);\
     61                                $(ECHO) "Archive            : $@";\
     62                                $(MKDIR) $(DIR_LIB);\
     63                                $(AR)  -r $@ $(Environment_OBJECTS_DEPS);\
    6864                                $(RANLIB) $@;
    6965
     
    7167                                @\
    7268                                $(ECHO) "Create directory   : $@";\
    73                                 $(MKDIR) $@;
     69                                $(MKDIR) $@
    7470
    7571exe_all                         :
    7672                                @\
     73                                $(MAKE) --directory=$(DIR_CACHE)      clean; \
    7774                                $(MAKE) --directory=$(DIR_CACHE)      exe; \
     75                                $(MAKE) --directory=$(DIR_DATA)       clean; \
    7876                                $(MAKE) --directory=$(DIR_DATA)       exe; \
     77                                $(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
    7978                                $(MAKE) --directory=$(DIR_ENDIANNESS) exe; \
     79                                $(MAKE) --directory=$(DIR_QUEUE)      clean; \
    8080                                $(MAKE) --directory=$(DIR_QUEUE)      exe; \
     81                                $(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
    8182                                $(MAKE) --directory=$(DIR_RAMLOCK)    exe; \
     83                                $(MAKE) --directory=$(DIR_SIM2OS)     clean; \
    8284                                $(MAKE) --directory=$(DIR_SIM2OS)     exe; \
     85                                $(MAKE) --directory=$(DIR_TTY)        clean; \
    8386                                $(MAKE) --directory=$(DIR_TTY)        exe; \
    84                                 $(MAKE) exe; \
     87                                $(MAKE) clean; \
     88                                $(MAKE) exe;
    8589
    8690clean                           :
  • trunk/IPs/systemC/Environment/Makefile.Environment

    r88 r113  
    1 ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
    2         $(error "variable MORPHEO_TOPLEVEL is undefined");
    3 else
    4         include $(MORPHEO_TOPLEVEL)/Makefile.tools
    5         include $(MORPHEO_TOPLEVEL)/Makefile.flags
    6 endif
    7 
    8 #-----[ Directory ]----------------------------------------
    9 ENTITY                         ?=       Environment
    10 
    11 DIR_TMP                         =       $(MORPHEO_TMP)/$(ENTITY)
    12 DIR_TST                         =       ./selftest
    13 DIR_INC                         =       ./include
    14 DIR_SRC                         =       ./src
    15 DIR_OBJ                         =       ./obj
    16 DIR_BIN                         =       $(DIR_TMP)/bin
    17 
    18 #-----[ Compilation ]--------------------------------------
    19 INCDIR                          = $(SYSTEMC_INCDIR_$(SIMULATOR))        \
    20                                   -I$(DIR_INC)                          \
    21                                   -I../processor/Morpheo
    22 
    23 LIBDIR                          = $(SYSTEMC_LIBDIR_$(SIMULATOR))
    24 
    25 LIBNAME                         = -lbfd                                 \
    26                                   -liberty                              \
    27                                   $(SYSTEMC_LIBNAME_$(SIMULATOR))
    28 
    29 FLAGS                           = $(SYSTEMC_CFLAGS_$(SIMULATOR))
    30 
    31 MORPHEO_CC_FLAGS                = $(MORPHEO_FLAGS) $(CC_FLAGS)           $(INCDIR)
    32 MORPHEO_CXX_FLAGS               = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(INCDIR)
    33 MORPHEO_L_FLAGS                 = $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(LIBDIR)
    34 
    35 #-----[ Variable ]-----------------------------------------
    36 
    37 OBJECTS                         = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) \
    38                                   $(patsubst $(DIR_SRC)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.c))
    39 OBJECTS_BIN                     = $(patsubst $(DIR_TST)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_TST)/*.cpp))
    40 
    41 HEADERS                         = $(wildcard $(DIR_INC)/*.h)
    42 
    43 EXE                             = $(DIR_BIN)/soft.x
    44 
    45 EXEC_PREFIX                     =
    46 #$(VALGRIND)
     1include Makefile.defs
    472
    483#-----[ Rules ]--------------------------------------------
     
    538vpath   %.o     $(DIR_OBJ)
    549
    55 .PRECIOUS                       : $(DIR_OBJ)/%.o $(DIR_BIN)/%.x
     10.PRECIOUS                       : $(DIR_OBJ)/$(ENTITY)_%.o $(DIR_BIN)/%.x
    5611
    5712test_env                        :
     
    5914                                $(ECHO) "-------------------| $(ENTITY)"
    6015
    61 $(DIR_OBJ)/%.o                  : %.cpp $(HEADERS)
     16$(DIR_OBJ)/$(ENTITY)_%.o        : %.cpp $(HEADERS)
    6217                                @\
    6318                                $(ECHO) "Compilation        : $*";\
    6419                                $(CXX) $(MORPHEO_CXX_FLAGS) -c -o $@ $<;
    6520
    66 $(DIR_OBJ)/%.o                  : %.c $(HEADERS)
     21$(DIR_OBJ)/$(ENTITY)_%.o        : %.c $(HEADERS)
    6722                                @\
    6823                                $(ECHO) "Compilation        : $*";\
    6924                                $(CC)  $(MORPHEO_CC_FLAGS)  -c -o $@ $<;
    7025
    71 $(DIR_BIN)/%.x                  : $(OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)
    72                                 \
     26$(DIR_BIN)/%.x                  : $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN)
     27                                @\
    7328                                $(ECHO) "Compilation        : $*";\
    7429                                $(CXX) $(MORPHEO_L_FLAGS)      -o $@ $^ $(LIBNAME);
     
    9348all_environment                 : test_env $(DIR_OBJ)
    9449                                @\
    95                                 $(MAKE) $(OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)
     50                                $(MAKE) $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN)
    9651
    9752environment_clean               :
  • trunk/IPs/systemC/Environment/Makefile.deps

    r88 r113  
    1717ENVIRONMENT_INCDIR              =       -I$(ENVIRONMENT_DIR)/include
    1818ENVIRONMENT_LIBDIR              =       -L$(ENVIRONMENT_DIR)/lib
    19 ENVIRONMENT_LIBNAME             =       -lEnvironment -lbfd -liberty 
     19ENVIRONMENT_LIBNAME             =       -lEnvironment -lbfd -liberty
  • trunk/IPs/systemC/Environment/Queue/Makefile

    r88 r113  
    1 #-----[ Variables ]----------------------------------------
    2 
    3 ENTITY                         ?= Queue
    4 
    51#-----[ Rules ]--------------------------------------------
    62
     
    1612                                @$(MAKE) environment_help
    1713
    18 include                         ../Makefile.Environment
     14include                         Makefile.defs
     15include                         $(DIR_ENVIRONMENT)/Makefile.Environment
  • trunk/IPs/systemC/Environment/RamLock/Makefile

    r88 r113  
    1 #-----[ Variables ]----------------------------------------
    2 
    3 ENTITY                         ?= RamLock
    4 
    51#-----[ Rules ]--------------------------------------------
    62
     
    1612                                @$(MAKE) environment_help
    1713
    18 include                         ../Makefile.Environment
     14include                         Makefile.defs
     15include                         $(DIR_ENVIRONMENT)/Makefile.Environment
  • trunk/IPs/systemC/Environment/Sim2OS/Makefile

    r88 r113  
    1 #-----[ Directory ]----------------------------------------
    2 
    3 DIR_ENDIANNESS                  = ../Endianness
    4 
    5 #-----[ Variable ]-----------------------------------------
    6 
    7 ENTITY                         ?= Sim2OS
    8 
    9 OBJECTS_DEPS                    = $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))
    10 
    111#-----[ Rules ]--------------------------------------------
    122
     
    2616                                @$(MAKE) environment_help
    2717
    28 include                         ../Makefile.Environment
     18include                         Makefile.defs
     19include                         $(DIR_ENVIRONMENT)/Makefile.Environment
     20
  • trunk/IPs/systemC/Environment/TTY/Makefile

    r88 r113  
    1 #-----[ Directory ]----------------------------------------
    2 
    3 #-----[ Variable ]-----------------------------------------
    4 
    5 ENTITY                         ?= TTY
    6 
    7 #OBJECTS_DEPS                   =
    8 
    91#-----[ Rules ]--------------------------------------------
    102
    113all                             :
    12                                 @\
    13                                 $(MAKE) all_environment;
     4                                @$(MAKE) all_environment
    145
    156clean                           :
    16                                 @\
    17                                 $(MAKE)  environment_clean;\
    18                                 $(RM) tty_*;
     7                                @$(MAKE) environment_clean; $(RM) tty_*
    198
    209clean_all                       : clean
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Configuration
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Core_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Dcache_Access
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Icache_Access
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Core
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Execute_loop_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/SelfTest/src/test.cpp

    r88 r113  
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4949 
     50  sc_signal<Tcontrol_t        > **  in_GPR_WRITE_WRITE_UNIT_VAL               ;
     51  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_WRITE_UNIT_ACK               ;
     52  sc_signal<Tcontext_t        > **  in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
     53  sc_signal<Tgeneral_address_t> **  in_GPR_WRITE_WRITE_UNIT_NUM_REG           ;
     54  sc_signal<Tgeneral_data_t   > **  in_GPR_WRITE_WRITE_UNIT_DATA              ;
     55  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_REGISTER_FILE_VAL            ;
     56  sc_signal<Tcontrol_t        > **  in_GPR_WRITE_REGISTER_FILE_ACK            ;
     57  sc_signal<Tcontext_t        > ** out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
     58  sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_REGISTER_FILE_NUM_REG        ;
     59  sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_REGISTER_FILE_DATA           ;
     60  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_READ_UNIT_VAL                ;
     61  sc_signal<Tcontext_t        > ** out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
     62  sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_READ_UNIT_NUM_REG            ;
     63  sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_READ_UNIT_DATA               ;
     64  sc_signal<Tcontrol_t        > **  in_SPR_WRITE_WRITE_UNIT_VAL               ;
     65  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_WRITE_UNIT_ACK               ;
     66  sc_signal<Tcontext_t        > **  in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
     67  sc_signal<Tspecial_address_t> **  in_SPR_WRITE_WRITE_UNIT_NUM_REG           ;
     68  sc_signal<Tspecial_data_t   > **  in_SPR_WRITE_WRITE_UNIT_DATA              ;
     69  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_REGISTER_FILE_VAL            ;
     70  sc_signal<Tcontrol_t        > **  in_SPR_WRITE_REGISTER_FILE_ACK            ;
     71  sc_signal<Tcontext_t        > ** out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
     72  sc_signal<Tspecial_address_t> ** out_SPR_WRITE_REGISTER_FILE_NUM_REG        ;
     73  sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_REGISTER_FILE_DATA           ;
     74  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_READ_UNIT_VAL                ;
     75  sc_signal<Tcontext_t        > ** out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
     76  sc_signal<Tspecial_address_t> ** out_SPR_WRITE_READ_UNIT_NUM_REG            ;
     77  sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_READ_UNIT_DATA               ;
     78
    5079  ALLOC1_SC_SIGNAL( in_GPR_WRITE_WRITE_UNIT_VAL               ," in_GPR_WRITE_WRITE_UNIT_VAL             ",Tcontrol_t        ,_param->_nb_gpr_write);
    5180  ALLOC1_SC_SIGNAL(out_GPR_WRITE_WRITE_UNIT_ACK               ,"out_GPR_WRITE_WRITE_UNIT_ACK             ",Tcontrol_t        ,_param->_nb_gpr_write);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Execute_loop
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Functionnal_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Operation
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Load_store_unit
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h

    r101 r113  
    147147    trace_memory_t trace;
    148148
    149     trace._cycle    = sc_simulation_time();
     149    trace._cycle    = simulation_cycle();
    150150    trace._context  = context;
    151151    trace._address  = address;
     
    229229    trace_memory_t trace;
    230230
    231     trace._cycle    = sc_simulation_time();
     231    trace._cycle    = simulation_cycle();
    232232    trace._context  = context;
    233233    trace._address  = address;
     
    247247    trace_memory_t trace;
    248248
    249     trace._cycle    = sc_simulation_time();
     249    trace._cycle    = simulation_cycle();
    250250    trace._context  = context;
    251251    trace._address  = address;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp

    r82 r113  
    270270            load_queue_use  [i] = false;
    271271
    272           double             current_cycle = sc_simulation_time();
     272          double             current_cycle = simulation_cycle();
    273273          double             cycle_min     = current_cycle;
    274274
     
    451451              in_MEMORY_IN_VAL ->write((not fifo_request.empty()) and
    452452                                       can_execute                and
    453                                        (sc_simulation_time() >= fifo_request.top()._cycle));
     453                                       (simulation_cycle() >= fifo_request.top()._cycle));
    454454
    455455              if (_param->_have_port_context_id)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r104 r113  
    412412              if (not fifo_request.empty())
    413413                {
    414                   can_execute = sc_simulation_time() >= fifo_request.top()._cycle;
     414                  can_execute = simulation_cycle() >= fifo_request.top()._cycle;
    415415                  if (is_operation_memory_store(fifo_request.top()._operation))
    416416                    can_execute &= (not store_queue_use [fifo_request.top()._store_queue_ptr_write] and (nb_store_slot_use < _param->_size_store_queue-1)) or is_operation_memory_store_head(fifo_request.top()._operation);
     
    512512                    }
    513513                 
    514                   std::cout << "kane - nb_request_memory_out : " << nb_request_memory_out << std::endl;
    515 
    516514                  // a lot of test
    517515                  TEST(Tpacket_t         , out_MEMORY_OUT_PACKET_ID    [0]->read(), tab_request[packet_id]._packet_id    );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Read_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Read_queue
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Reservation_station
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Execute_queue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h

    r111 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "Execute_queue"
    77 */
    88
     
    1111#endif
    1212
    13 #include <string>
    14 #include <iostream>
    15 #include <sys/time.h>
     13#define NB_ITERATION  16
     14#define CYCLE_MAX     (1024*NB_ITERATION)
    1615
     16#include "Common/include/Test.h"
    1717#include "Common/include/Time.h"
    1818#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
     
    2929using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue;
    3030
    31 void test    (string name,
    32               morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param);
     31SC_MODULE(top)
     32{
     33#ifdef SYSTEMC
     34 private: sc_clock               *  in_CLOCK ;
     35 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     36
     37  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_IN_VAL           ;
     38  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_IN_ACK           ;
     39  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_CONTEXT_ID    ;
     40  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_FRONT_END_ID  ;
     41  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ;
     42  private: sc_signal<Tpacket_t         >    *  in_EXECUTE_QUEUE_IN_PACKET_ID     ;
     43//private: sc_signal<Toperation_t      >    *  in_EXECUTE_QUEUE_IN_OPERATION     ;
     44//private: sc_signal<Ttype_t           >    *  in_EXECUTE_QUEUE_IN_TYPE          ;
     45  private: sc_signal<Tspecial_data_t   >    *  in_EXECUTE_QUEUE_IN_FLAGS         ;
     46  private: sc_signal<Texception_t      >    *  in_EXECUTE_QUEUE_IN_EXCEPTION     ;
     47  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ;
     48  private: sc_signal<Taddress_t        >    *  in_EXECUTE_QUEUE_IN_ADDRESS       ;
     49  private: sc_signal<Tgeneral_data_t   >    *  in_EXECUTE_QUEUE_IN_DATA          ;
     50
     51  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_OUT_VAL          ;
     52  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_OUT_ACK          ;
     53  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;
     54  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_FRONT_END_ID ;
     55  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;
     56  private: sc_signal<Tpacket_t         >    * out_EXECUTE_QUEUE_OUT_PACKET_ID    ;
     57//private: sc_signal<Toperation_t      >    * out_EXECUTE_QUEUE_OUT_OPERATION    ;
     58//private: sc_signal<Ttype_t           >    * out_EXECUTE_QUEUE_OUT_TYPE         ;
     59  private: sc_signal<Tspecial_data_t   >    * out_EXECUTE_QUEUE_OUT_FLAGS        ;
     60  private: sc_signal<Texception_t      >    * out_EXECUTE_QUEUE_OUT_EXCEPTION    ;
     61  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
     62  private: sc_signal<Taddress_t        >    * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
     63  private: sc_signal<Tgeneral_data_t   >    * out_EXECUTE_QUEUE_OUT_DATA         ;
     64
     65#endif
     66
     67 private: std::string name;
     68 private: Tusage_t _usage;
     69 private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * _param;
     70#ifdef STATISTICS
     71 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
     72#endif
     73 private: Execute_queue * component;
     74
     75 private: void usage
     76    (
     77#ifdef MTI_SYSTEMC
     78     int argc, const char * const * argv
     79#else
     80     int argc, char * argv[]
     81#endif
     82     );
     83 private: void allocation   (void);
     84 private: void deallocation (void);
     85 public : void test         (void);
     86
     87#ifdef MTI_SYSTEMC
     88  SC_CTOR(top::top);
     89#else
     90 public : top (sc_module_name module_name,int argc, char * argv[]);
     91#endif
     92 public : ~top(void);
     93};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp

    r88 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h"
     8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 7
    11 
    12 void usage (int argc, char * argv[])
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
    1316{
    14   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    15   err (_("list_params is :\n"));
    16   err (_(" * size_queue          (uint32_t)\n"));
    17   err (_(" * nb_context          (uint32_t)\n"));
    18   err (_(" * nb_front_end        (uint32_t)\n"));
    19   err (_(" * nb_ooo_engine       (uint32_t)\n"));
    20   err (_(" * nb_packet           (uint32_t)\n"));
    21   err (_(" * size_general_data   (uint32_t)\n"));
    22   err (_(" * size_special_data   (uint32_t)\n"));
    23 
    24   exit (1);
    25 }
    26 
    27 #ifndef SYSTEMC
    28 int main    (int argc, char * argv[])
    29 #else
    30 int sc_main (int argc, char * argv[])
    31 #endif
    32 {
    33   if (argc != 2+NB_PARAMS)
    34     usage (argc, argv);
    35 
    36   uint32_t       x = 1;
    37 
    38   const string   name      =      argv[x++];
    39   const uint32_t size_queue          = atoi(argv[x++]);
    40   const uint32_t nb_context          = atoi(argv[x++]);
    41   const uint32_t nb_front_end        = atoi(argv[x++]);
    42   const uint32_t nb_ooo_engine       = atoi(argv[x++]);
    43   const uint32_t nb_packet           = atoi(argv[x++]);
    44   const uint32_t size_general_data   = atoi(argv[x++]);
    45   const uint32_t size_special_data   = atoi(argv[x++]);
     17  int _return = EXIT_SUCCESS;
    4618
    4719  try
    4820    {
    49       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters
    50         (size_queue         ,
    51          nb_context         ,
    52          nb_front_end       ,
    53          nb_ooo_engine      ,
    54          nb_packet          ,
    55          size_general_data  ,
    56          size_special_data  ,
    57          true // is_toplevel
    58          );
    59      
    60       msg(_("%s"),param->print(1).c_str());
    61      
    62       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    6326    }
    6427  catch (morpheo::ErrorMorpheo & error)
    6528    {
    66       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    67       exit (EXIT_FAILURE);
     29      msgError(_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
    6831    }
    69   catch (...)
     32 
     33  try
    7034    {
    71       err (_("<%s> : This test must generate a error.\n"),name.c_str());
    72       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Execute_queue : no error");
     37      else
     38        TEST_KO("Execute_queue : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    7344    }
    7445
    75   return (EXIT_SUCCESS);
     46  return _return;
    7647}
    77 
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h

    r101 r113  
    1818#include "Common/include/Debug.h"
    1919
     20#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h"
    2021#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
    2122#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h"
     
    2829#endif
    2930#include "Behavioural/include/Usage.h"
     31#include "Behavioural/include/Simulation.h"
     32
     33#include "Behavioural/Generic/Queue/include/Queue.h"
    3034
    3135namespace morpheo {
     
    4751  protected : const std::string  _name;
    4852  protected : const Parameters * _param;
    49   private   : const Tusage_t     _usage;
     53  public    :      Tusage_t     _usage;
    5054
    5155#ifdef STATISTICS
     
    9599  public    : SC_OUT(Taddress_t        )    * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
    96100  public    : SC_OUT(Tgeneral_data_t   )    * out_EXECUTE_QUEUE_OUT_DATA         ;
    97 
    98     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    99101   
    100102    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    103105  private   : Tcontrol_t                       internal_EXECUTE_QUEUE_IN_ACK ;
    104106  private   : Tcontrol_t                       internal_EXECUTE_QUEUE_OUT_VAL;
     107
     108    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     109# ifdef VHDL
     110  private   : morpheo::behavioural::generic::queue::Parameters * _param_queue;
     111  private   : morpheo::behavioural::generic::queue::Queue      * _component_queue;
     112# endif
     113#endif
     114
     115#ifdef MODELSIM_COSIMULATION
     116    // ~~~~~[ Wrapper ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     117  private   : Wrapper_Execute_queue * _wrapper;
    105118#endif
    106119
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h

    r98 r113  
    6161  public :        Parameters_test msg_error  (void);
    6262
    63   public :        std::string   print      (uint32_t depth);
    64   public : friend std::ostream& operator<< (std::ostream& output_stream,
    65                                             morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters & x);
     63  public :        std::string     id         (void) const;
     64
     65  public :        std::string     print      (uint32_t depth);
     66  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     67                                              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters & x);
    6668  };
    6769
     
    7274}; // end namespace multi_execute_loop
    7375}; // end namespace core
    74 
    7576}; // end namespace behavioural
    7677}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp

    r88 r113  
    3535    _name              (name)
    3636    ,_param            (param)
    37     ,_usage            (usage)
    3837  {
    39     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     38    log_begin(Execute_queue,FUNCTION);
    4039
    41 #if DEBUG_Execute_queue == true
    42     log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40    _usage = usage_environment(usage);
    4341
    44     std::cout << *param << std::endl;
    45 #endif   
     42// #if DEBUG_Execute_queue == true
     43//     log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
    4644
    47     log_printf(INFO,Execute_queue,FUNCTION,"Allocation");
     45//     std::cout << *param << std::endl;
     46// #endif   
     47
     48#ifdef MODELSIM_COSIMULATION
     49    {
     50      std::string param_id = param->id();
     51     
     52      if ((_model.get_type(_param->_type) == MODEL_VHDL) and
     53          (param_id != "")
     54          )
     55        {
     56          std::string vhdl_id = vhdl_get_id(_name);
     57         
     58          if (vhdl_id == param_id)
     59            {
     60              msgInformation(_("<%s> Use VHDL model\n"),_name.c_str());
     61              _usage = usage_cosimulation(_usage);
     62            }
     63          else
     64            {
     65              log_printf(TRACE,Execute_queue,FUNCTION,"get_id : %s",vhdl_id.c_str());
     66              log_printf(TRACE,Execute_queue,FUNCTION,"id     : %s",param_id.c_str());
     67           
     68              msgWarning(_("<%s> Can't load VHDL model, continue with SystemC model\n"),_name.c_str());
     69            }
     70        }
     71    }
     72#endif
     73
     74    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4875    allocation ();
    4976
     
    5178    if (usage_is_set(_usage,USE_STATISTICS))
    5279      {
    53         log_printf(INFO,Execute_queue,FUNCTION,"Allocation of statistics");
     80        log_printf(INFO,Execute_queue,FUNCTION,("<%s> Allocation of statistics"),_name.c_str());
    5481
    5582        statistics_declaration(param_statistics);
     
    6188      {
    6289        // generate the vhdl
    63         log_printf(INFO,Execute_queue,FUNCTION,"Generate the vhdl");
     90        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6491       
    6592        vhdl();
     
    6895
    6996#ifdef SYSTEMC
    70     if (usage_is_set(_usage,USE_SYSTEMC))
     97    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
    7198      {
    72         log_printf(INFO,Execute_queue,FUNCTION,"Method - transition");
     99        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    73100
    74101        SC_METHOD (transition);
     
    80107# endif   
    81108
    82         log_printf(INFO,Execute_queue,FUNCTION,"Method - genMoore");
     109        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
    83110
    84111        SC_METHOD (genMoore);
     
    89116        // List dependency information
    90117# endif   
    91        
     118      }
    92119#endif
    93       }
    94     log_printf(FUNC,Execute_queue,FUNCTION,"End");
     120    log_end(Execute_queue,FUNCTION);
    95121  };
    96122   
     
    99125  Execute_queue::~Execute_queue (void)
    100126  {
    101     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     127    log_begin(Execute_queue,FUNCTION);
    102128
    103129#ifdef STATISTICS
    104130    if (usage_is_set(_usage,USE_STATISTICS))
    105131      {
    106         log_printf(INFO,Execute_queue,FUNCTION,"Generate Statistics file");
     132        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
    107133       
    108134        delete _stat;
     
    110136#endif
    111137
    112     log_printf(INFO,Execute_queue,FUNCTION,"Deallocation");
     138    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    113139    deallocation ();
    114140
    115     log_printf(FUNC,Execute_queue,FUNCTION,"End");
     141    log_end(Execute_queue,FUNCTION);
    116142  };
    117143
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp

    r112 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
     8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h"
    89#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
    910#include "Behavioural/include/Allocation.h"
     
    2728
    2829    Entity * entity = _component->set_entity (_name       
    29                                               ,"Execute_queue"
     30                                              ,_param->_type
    3031#ifdef POSITION
    3132                                              ,COMBINATORY
     
    3536    _interfaces = entity->set_interfaces();
    3637
    37     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     38    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3839
    3940      Interface * interface = _interfaces->set_interface(""
     
    5455       ALLOC0_VALACK_IN ( in_EXECUTE_QUEUE_IN_VAL,VAL);
    5556       ALLOC0_VALACK_OUT(out_EXECUTE_QUEUE_IN_ACK,ACK);
    56        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
    57        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
    58        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
    59        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr        );
    60 //     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
    61 //     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
    62        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS        ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data     );
    63        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception        );
    64        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                              );
     57       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id         );
     58       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id       );
     59       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id      );
     60       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr            );
     61//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation          );
     62//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type               );
     63       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS        ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data       );
     64       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception          );
     65       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                                );
    6566       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_ADDRESS      ,"address"      ,Taddress_t        ,_param->_size_instruction_address);
    66        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data     );
     67       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data       );
    6768
    6869       ALLOC0_INTERFACE_END();
     
    9091     }
    9192
    92     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    93 
    94      _queue = new std::list<execute_queue_entry_t *>;
     93     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     94     if (usage_is_set(_usage,USE_SYSTEMC_BODY))
     95       {
     96         _queue = new std::list<execute_queue_entry_t *>;
     97       }
     98
     99     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     100#ifdef VHDL
     101    if (usage_is_set(_usage,USE_VHDL))
     102      {
     103        _param_queue = new morpheo::behavioural::generic::queue::Parameters
     104          (_param->_size_queue,
     105           _param->_size_internal_queue,
     106           0,
     107           false,
     108           false
     109           );
     110       
     111        std::string queue_name = _name + "_queue";
     112        _component_queue = new morpheo::behavioural::generic::queue::Queue
     113          (queue_name.c_str()
     114# ifdef STATISTICS
     115           ,NULL
     116# endif
     117           ,_param_queue
     118           ,USE_VHDL);
     119       
     120        _component->set_component(_component_queue->_component
     121# ifdef POSITION
     122                                  , 0, 0, 0, 0
     123# endif
     124                                  , INSTANCE_LIBRARY
     125                                  );
     126      }
     127#endif
    95128
    96129#ifdef POSITION
    97      if (usage_is_set(_usage,USE_POSITION))
    98        _component->generate_file();
    99 #endif
    100 
     130    if (usage_is_set(_usage,USE_POSITION))
     131      _component->generate_file();
     132#endif
     133 
     134#ifdef MODELSIM_COSIMULATION
     135    if (usage_is_set(_usage,USE_COSIMULATION))
     136      {
     137        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Create Wrapper"),_name.c_str());
     138
     139        _wrapper = new Wrapper_Execute_queue(_name.c_str(),"morpheo_behavioural","/dsk/l1/misc/Morpheo/work",_param);
     140//      _wrapper = new Wrapper_Execute_queue(_name.c_str(),"morpheo_behavioural","work");
     141
     142        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Wrapper Instanciation"),_name.c_str());
     143
     144//         INSTANCE0_FOREIGN_SIGNAL_CLOCK(_wrapper, in_CLOCK                                              , "in_CLOCK"                           ,1);
     145//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_NRESET                          ,Tcontrol_t        , "in_NRESET"                          ,1);
     146                                                                                                                     
     147//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_VAL            ,Tcontrol_t        , "in_EXECUTE_QUEUE_IN_VAL"            ,1                                );
     148//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_IN_ACK            ,Tcontrol_t        ,"out_EXECUTE_QUEUE_IN_ACK"            ,1                                );
     149//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_CONTEXT_ID     ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_CONTEXT_ID"     ,_param->_size_context_id         );
     150//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_FRONT_END_ID   ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_FRONT_END_ID"   ,_param->_size_front_end_id       );
     151//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID  ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"  ,_param->_size_ooo_engine_id      );
     152//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_PACKET_ID      ,Tpacket_t         , "in_EXECUTE_QUEUE_IN_PACKET_ID"      ,_param->_size_rob_ptr            );
     153// //      INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_OPERATION      ,Toperation_t      , "in_EXECUTE_QUEUE_IN_OPERATION"      ,_param->_size_operation          );
     154// //      INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_TYPE           ,Ttype_t           , "in_EXECUTE_QUEUE_IN_TYPE"           ,_param->_size_type               );
     155//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_FLAGS          ,Tspecial_data_t   , "in_EXECUTE_QUEUE_IN_FLAGS"          ,_param->_size_special_data       );
     156//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_EXCEPTION      ,Texception_t      , "in_EXECUTE_QUEUE_IN_EXCEPTION"      ,_param->_size_exception          );
     157//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_NO_SEQUENCE    ,Tcontrol_t        , "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"    ,1                                );
     158//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_ADDRESS        ,Taddress_t        , "in_EXECUTE_QUEUE_IN_ADDRESS"        ,_param->_size_instruction_address);
     159//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_DATA           ,Tgeneral_data_t   , "in_EXECUTE_QUEUE_IN_DATA"           ,_param->_size_general_data       );
     160                                                                                                                     
     161//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_VAL           ,Tcontrol_t        ,"out_EXECUTE_QUEUE_OUT_VAL"           ,1                                );
     162//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_OUT_ACK           ,Tcontrol_t        , "in_EXECUTE_QUEUE_OUT_ACK"           ,1                                );
     163//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_CONTEXT_ID    ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"    ,_param->_size_context_id         );
     164//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_FRONT_END_ID  ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID"  ,_param->_size_front_end_id       );
     165//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID" ,_param->_size_ooo_engine_id      );
     166//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_PACKET_ID     ,Tpacket_t         ,"out_EXECUTE_QUEUE_OUT_PACKET_ID"     ,_param->_size_rob_ptr            );
     167// //      INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_OPERATION     ,Toperation_t      ,"out_EXECUTE_QUEUE_OUT_OPERATION"     ,_param->_size_operation          );
     168// //      INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_TYPE          ,Ttype_t           ,"out_EXECUTE_QUEUE_OUT_TYPE"          ,_param->_size_type               );
     169//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_FLAGS         ,Tspecial_data_t   ,"out_EXECUTE_QUEUE_OUT_FLAGS"         ,_param->_size_special_data       );
     170//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_EXCEPTION     ,Texception_t      ,"out_EXECUTE_QUEUE_OUT_EXCEPTION"     ,_param->_size_exception          );
     171//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   ,Tcontrol_t        ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"   ,1                                );
     172//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_ADDRESS       ,Taddress_t        ,"out_EXECUTE_QUEUE_OUT_ADDRESS"       ,_param->_size_instruction_address);
     173//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_DATA          ,Tgeneral_data_t   ,"out_EXECUTE_QUEUE_OUT_DATA"          ,_param->_size_general_data       );
     174
     175        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_CLOCK                           ,Tcontrol_t     , "in_CLOCK"                           ,1);
     176        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_NRESET                          ,Tcontrol_t     , "in_NRESET"                          ,1);
     177                                                                                           
     178        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_VAL            ,Tcontrol_t     , "in_EXECUTE_QUEUE_IN_VAL"            ,1                                );
     179        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_IN_ACK            ,Tcontrol_t     ,"out_EXECUTE_QUEUE_IN_ACK"            ,1                                );
     180        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_CONTEXT_ID     ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_CONTEXT_ID"     ,_param->_size_context_id         );
     181        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_FRONT_END_ID   ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_FRONT_END_ID"   ,_param->_size_front_end_id       );
     182        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID  ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"  ,_param->_size_ooo_engine_id      );
     183        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_PACKET_ID      ,Tpacket_t      , "in_EXECUTE_QUEUE_IN_PACKET_ID"      ,_param->_size_rob_ptr            );
     184//      INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_OPERATION      ,Toperation_t   , "in_EXECUTE_QUEUE_IN_OPERATION"      ,_param->_size_operation          );
     185//      INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_TYPE           ,Ttype_t        , "in_EXECUTE_QUEUE_IN_TYPE"           ,_param->_size_type               );
     186        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_FLAGS          ,Tspecial_data_t, "in_EXECUTE_QUEUE_IN_FLAGS"          ,_param->_size_special_data       );
     187        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_EXCEPTION      ,Texception_t   , "in_EXECUTE_QUEUE_IN_EXCEPTION"      ,_param->_size_exception          );
     188        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_NO_SEQUENCE    ,Tcontrol_t     , "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"    ,1                                );
     189        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_ADDRESS        ,Taddress_t     , "in_EXECUTE_QUEUE_IN_ADDRESS"        ,_param->_size_instruction_address);
     190        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_DATA           ,Tgeneral_data_t, "in_EXECUTE_QUEUE_IN_DATA"           ,_param->_size_general_data       );
     191                                                                                           
     192        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_VAL           ,Tcontrol_t     ,"out_EXECUTE_QUEUE_OUT_VAL"           ,1                                );
     193        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_OUT_ACK           ,Tcontrol_t     , "in_EXECUTE_QUEUE_OUT_ACK"           ,1                                );
     194        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_CONTEXT_ID    ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"    ,_param->_size_context_id         );
     195        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_FRONT_END_ID  ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID"  ,_param->_size_front_end_id       );
     196        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID" ,_param->_size_ooo_engine_id      );
     197        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_PACKET_ID     ,Tpacket_t      ,"out_EXECUTE_QUEUE_OUT_PACKET_ID"     ,_param->_size_rob_ptr            );
     198//      INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_OPERATION     ,Toperation_t   ,"out_EXECUTE_QUEUE_OUT_OPERATION"     ,_param->_size_operation          );
     199//      INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_TYPE          ,Ttype_t        ,"out_EXECUTE_QUEUE_OUT_TYPE"          ,_param->_size_type               );
     200        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_FLAGS         ,Tspecial_data_t,"out_EXECUTE_QUEUE_OUT_FLAGS"         ,_param->_size_special_data       );
     201        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_EXCEPTION     ,Texception_t   ,"out_EXECUTE_QUEUE_OUT_EXCEPTION"     ,_param->_size_exception          );
     202        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   ,Tcontrol_t     ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"   ,1                                );
     203        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_ADDRESS       ,Taddress_t     ,"out_EXECUTE_QUEUE_OUT_ADDRESS"       ,_param->_size_instruction_address);
     204        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_DATA          ,Tgeneral_data_t,"out_EXECUTE_QUEUE_OUT_DATA"          ,_param->_size_general_data       );
     205
     206        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Wrapper Instanciation end"),_name.c_str());
     207      }
     208#endif
     209     
    101210    log_printf(FUNC,Execute_queue,FUNCTION,"End");
    102211  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp

    r112 r113  
    2525    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    2626
    27     if (usage_is_set(_usage,USE_SYSTEMC))
     27    if (usage_is_set(_usage,USE_SYSTEMC_INTERFACE))
    2828      {
    2929        delete    in_CLOCK ;
     
    6060
    6161    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    62     while (not _queue->empty())
     62    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
    6363      {
    64         delete _queue->front();
    65         _queue->pop_front();
     64        while (not _queue->empty())
     65          {
     66            delete _queue->front();
     67            _queue->pop_front();
     68          }
     69        delete _queue;
    6670      }
    67     delete _queue;
    6871
    6972    delete _component;
     73
     74#ifdef VHDL
     75    if (usage_is_set(_usage,USE_VHDL))
     76      {
     77        delete _component_queue;
     78        delete _param_queue;
     79      }
     80#endif
     81
     82#ifdef MODELSIM_COSIMULATION
     83    if (usage_is_set(_usage,USE_COSIMULATION))
     84      {
     85        delete _wrapper;
     86      }
     87#endif
    7088
    7189    log_printf(FUNC,Execute_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_statistics_declaration.cpp

    r81 r113  
    2626
    2727    _stat = new Stat (static_cast<std::string>(_name),
    28                       "Execute_queue",
     28                      _param->_type,
    2929                      param_statistics);
    3030   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp

    r101 r113  
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
    1010#include "Behavioural/include/Vhdl.h"
    11 #include "Behavioural/Generic/Queue/include/Queue.h"
    1211
    1312namespace morpheo                    {
     
    2322#undef  FUNCTION
    2423#define FUNCTION "Execute_queue::vhdl"
    25   void Execute_queue::vhdl (void)
     24  void Execute_queue::vhdl (void) 
    2625  {
    2726    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    2827
    29     //----- Queue -----
    30    
    31     morpheo::behavioural::generic::queue::Parameters * param_queue;
    32     morpheo::behavioural::generic::queue::Queue      * queue;
    33    
    34     param_queue = new morpheo::behavioural::generic::queue::Parameters
    35       (_param->_size_queue,
    36        _param->_size_internal_queue,
    37        0,
    38        false,
    39        false
    40        );
    41    
    42     std::string queue_name = _name + "_queue";
    43     queue = new morpheo::behavioural::generic::queue::Queue
    44       (queue_name.c_str()
    45 #ifdef STATISTICS
    46        ,NULL
    47 #endif
    48        ,param_queue
    49        ,USE_VHDL);
    50    
    51     _component->set_component(queue->_component
    52 #ifdef POSITION
    53                               , 0, 0, 0, 0
    54 #endif
    55                               , INSTANCE_LIBRARY
    56                               );
    57 
    58     Vhdl * vhdl = new Vhdl (_name);
     28    Vhdl * vhdl = new Vhdl (_name,_param->id());
    5929
    6030    _interfaces->set_port(vhdl);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp

    r98 r113  
    5757    size = _param->_size_context_id;
    5858    max = min-1+size;
    59     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
     59    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID "+std_logic_range(size)+";");
    6060    min = max+1;
    6161      }
     
    6464    size = _param->_size_front_end_id;
    6565    max = min-1+size;
    66     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
     66    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID"+std_logic_range(size)+";");
    6767    min = max+1;
    6868      }
     
    7171    size = _param->_size_ooo_engine_id;
    7272    max = min-1+size;
    73     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
     73    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"+std_logic_range(size)+";");
    7474    min = max+1;
    7575      }
     
    7878    size = _param->_size_rob_ptr;
    7979    max = min-1+size;
    80     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
     80    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID"+std_logic_range(size)+";");
    8181    min = max+1;
    8282      }
     
    8484//  size = _param->_size_operation;
    8585//  max = min-1+size;
    86 //  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION;");
     86//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION"+std_logic_range(size)+";");
    8787//  min = max+1;
    8888//
    8989//  size = _param->_size_type;
    9090//  max = min-1+size;
    91 //  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE;");
     91//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE"+std_logic_range(size)+";");
    9292//  min = max+1;
    9393
    9494    size = _param->_size_special_data;
    9595    max = min-1+size;
    96     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS;");
     96    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS"+std_logic_range(size)+";");
    9797    min = max+1;
    9898
    9999    size = _param->_size_exception;   
    100100    max = min-1+size;
    101     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
     101    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION"+std_logic_range(size)+";");
    102102    min = max+1;
    103103
    104104    size = 1;
    105105    max = min-1+size;
    106     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
     106    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE"+std_logic_range(size)+";");
    107107    min = max+1;
    108108
    109109    size = _param->_size_instruction_address;
    110110    max = min-1+size;
    111     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;");
     111    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS"+std_logic_range(size)+";");
    112112    min = max+1;
    113113
    114114    size = _param->_size_general_data;
    115115    max = min-1+size;
    116     vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA;");
     116    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA"+std_logic_range(size)+";");
    117117    min = max+1;
    118118    }
     
    125125
    126126    if(_param->_have_port_context_id)
    127     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
     127    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    "+std_logic_range(_param->_size_context_id         )+" <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
    128128    if(_param->_have_port_front_end_id)
    129     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
     129    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  "+std_logic_range(_param->_size_front_end_id       )+" <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
    130130    if(_param->_have_port_ooo_engine_id)
    131     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
     131    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID "+std_logic_range(_param->_size_ooo_engine_id      )+" <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
    132132    if(_param->_have_port_rob_ptr)
    133     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
    134 //  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
    135 //  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
    136     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
    137     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
    138     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
    139     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
    140     vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
     133    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     "+std_logic_range(_param->_size_rob_ptr            )+" <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
     134//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     "+std_logic_range(_param->_size_operation          )+" <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
     135//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          "+std_logic_range(_param->_size_type               )+" <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
     136    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         "+std_logic_range(_param->_size_special_data       )+" <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
     137    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     "+std_logic_range(_param->_size_exception          )+" <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
     138    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   "+std_logic_range(1                                )+" <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
     139    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       "+std_logic_range(_param->_size_instruction_address)+" <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
     140    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          "+std_logic_range(_param->_size_general_data       )+" <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
    141141
    142 
    143 //     vhdl->set_body (0,"");
    144 //     vhdl->set_body (0,"process (in_CLOCK)");
    145 //     vhdl->set_body (0,"begin");
    146 //     vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
    147 // //     vhdl->set_body (2,"if in_NRESET = '0' then");
    148 // //     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
    149 // //     vhdl->set_body (2,"else");
    150 //     vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
    151 // //     vhdl->set_body (2,"end if;");
    152 
    153 //     for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
    154 //       {
    155 //      vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
    156 //      vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
    157 //      if (_param->_have_port_context_id)
    158 //      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
    159 //      if (_param->_have_port_front_end_id)
    160 //      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
    161 //      if (_param->_have_port_ooo_engine_id)
    162 //      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
    163 //      if (_param->_have_port_rob_ptr)
    164 //         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
    165 //      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
    166 //      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
    167 //      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
    168 //      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
    169 //      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
    170 
    171 //      vhdl->set_body (3, "else");
    172 //      if (_param->_have_port_context_id)
    173 //      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
    174 //      if (_param->_have_port_front_end_id)
    175 //      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
    176 //      if (_param->_have_port_ooo_engine_id)
    177 //      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
    178 //      if (_param->_have_port_rob_ptr)
    179 //         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
    180 //      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
    181 //      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
    182 //      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
    183 //      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
    184 //      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
    185        
    186 //      vhdl->set_body (3,"end if;");
    187 
    188 //      vhdl->set_body (2,"end if;");
    189 //       }
    190 
    191 //     vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
    192 //     if (_param->_have_port_context_id)
    193 //       vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
    194 //     if (_param->_have_port_front_end_id)
    195 //       vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
    196 //     if (_param->_have_port_ooo_engine_id)
    197 //       vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
    198 //     if (_param->_have_port_rob_ptr)
    199 //       vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
    200 //     vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
    201 //     vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
    202 //     vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
    203 //     vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
    204 //     vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
    205 //     vhdl->set_body (2,"end if;");
    206 
    207 
    208 //     vhdl->set_body (1,"end if;");
    209 //     vhdl->set_body (0,"end process;");
    210 
    211 
    212 //     vhdl->set_body (0,"");
    213 //     vhdl->set_body (0,"");
    214 //     vhdl->set_body (0,"");
    215 
    216 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
    217 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
    218 //     if (_param->_have_port_context_id)
    219 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
    220 //     if (_param->_have_port_front_end_id)
    221 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
    222 //     if (_param->_have_port_ooo_engine_id)
    223 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
    224 //     if (_param->_have_port_rob_ptr)
    225 //     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
    226 //     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
    227 //     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
    228 //     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
    229 //     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
    230 //     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
    231 
    232 
    233 //     vhdl->set_body (0,"");
    234 
    235 //     vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
    236 //     vhdl->set_body (0,"begin");
    237 //     vhdl->set_body (1,"if in_NRESET = '0' then");
    238 //     vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
    239 //     vhdl->set_body (1,"else");
    240 //     vhdl->set_body (2,"case reg_CURRENT_STATE is");
    241 //     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
    242 //       {
    243 //      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
    244 //      if (i == 0)
    245 //        {
    246 //          vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
    247 //          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
    248 //          vhdl->set_body (4,"else");
    249 //          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    250 //          vhdl->set_body (4,"end if;");
    251 //          continue;
    252 //        }
    253 //      if (i == (_param->_size_queue))
    254 //        {
    255 //          vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
    256 //          vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
    257 //          vhdl->set_body (4,"else");
    258 //          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    259 //          vhdl->set_body (4,"end if;");
    260 //          continue;
    261 //        }
    262 //      vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
    263 //      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
    264 //      vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
    265 //      vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
    266 //      vhdl->set_body (4,"else");
    267 //      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    268 //      vhdl->set_body (4,"end if;");
    269 //       }
    270 //     vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
    271 //     vhdl->set_body (2,"end case;");
    272 //     vhdl->set_body (1,"end if;");
    273 
    274 //     vhdl->set_body (2,"case reg_CURRENT_STATE is");
    275 //     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
    276 //       {
    277 //      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
    278 //      if (i == 0)
    279 //        {
    280 //          vhdl->set_body (4,"sig_OUT_VAL <= '0';");
    281 //          vhdl->set_body (4,"sig_IN_ACK <= '1';");
    282 //          for (uint32_t j = 0; j <_param->_size_queue; j++)
    283 //            {
    284 //              if (i == j)
    285 //                {
    286 //                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    287 //                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
    288 //                }
    289 //              else
    290 //                {
    291 //                  if (j < (_param->_size_queue - 1))
    292 //                    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    293 //                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    294 //                }
    295 //            }
    296 //          continue;
    297 //        }
    298 //      if (i == (_param->_size_queue))
    299 //        {
    300 //          vhdl->set_body (4,"sig_OUT_VAL <= '1';");
    301 //          vhdl->set_body (4,"sig_IN_ACK <= '0';");
    302 //          for (uint32_t j = 0; j <_param->_size_queue; j++)
    303 //            {
    304 //              if (j == (i - 1))
    305 //                {
    306 //                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    307 //                }
    308 //              else
    309 //                {
    310 //                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    311 //                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    312 //                }
    313 //            }
    314 //          continue;
    315 //        }
    316 //      vhdl->set_body (4,"sig_OUT_VAL <= '1';");
    317 //      vhdl->set_body (4,"sig_IN_ACK <= '1';");
    318 //      for (uint32_t j = 0; j <_param->_size_queue; j++)
    319 //        {
    320 //          if (j < (i - 1))
    321 //            {
    322 //              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    323 //              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    324 //            }
    325 //          if (j == (i - 1))
    326 //            {
    327 //              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    328 //              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
    329 //            }
    330 //          if (j == i)
    331 //            {
    332 //              if (j < (_param->_size_queue - 1))
    333 //                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    334 //              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
    335 //            }
    336 //          if (j > i)
    337 //            {
    338 //              if (j < (_param->_size_queue - 1))
    339 //                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    340 //              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    341 //            }
    342 //        }
    343 //       }
    344 //     vhdl->set_body (3,"when others =>");
    345 //     vhdl->set_body (2,"end case;");
    346 //     vhdl->set_body (0,"end process;");
     142    vhdl->set_debug  ("in_CLOCK = 'U'","GLOP1: Clock = 'U'");
     143    vhdl->set_debug  ("in_CLOCK = 'X'","GLOP2: Clock = 'X'");
     144    vhdl->set_debug  ("in_CLOCK = 'Z'","GLOP3: Clock = 'Z'");
     145    vhdl->set_debug  ("in_CLOCK = 'W'","GLOP4: Clock = 'W'");
     146    vhdl->set_debug  ("in_CLOCK = '1'","KANE : Clock = '1'");
     147    vhdl->set_debug  ("in_CLOCK = '0'","SETH : Clock = '0'");
    347148
    348149    log_printf(FUNC,Execute_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp

    r111 r113  
    2727                          uint32_t size_general_data  ,
    2828                          uint32_t size_special_data  ,
    29                           bool     is_toplevel        )
     29                          bool     is_toplevel        ):
     30    behavioural::Parameters("Execute_queue")
    3031  {
    3132    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     
    5758        copy();
    5859      }
    59 
    60     _size_internal_queue =
    61       (_size_context_id          +
    62        _size_front_end_id        +
    63        _size_ooo_engine_id       +
    64        _size_rob_ptr             +     
    65 //     _size_operation           +
    66 //     _size_type                +
    67        _size_special_data        +
    68        _size_exception           +
    69        1                         +
    70        _size_general_data        +
    71        _size_general_data
    72        );
    7360
    7461    log_printf(FUNC,Execute_queue,FUNCTION,"End");
     
    114101  {
    115102    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     103
     104    _size_internal_queue =
     105      (_size_context_id          +
     106       _size_front_end_id        +
     107       _size_ooo_engine_id       +
     108       _size_rob_ptr             +     
     109//     _size_operation           +
     110//     _size_type                +
     111       _size_special_data        +
     112       _size_exception           +
     113       1                         +
     114       _size_general_data        +
     115       _size_general_data
     116       );
     117
    116118    log_printf(FUNC,Execute_queue,FUNCTION,"End");
    117119  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Write_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h

    r111 r113  
    44 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "Write_unit"
    77 */
    88
     
    1111#endif
    1212
    13 #include <string>
    14 #include <iostream>
    15 #include <sys/time.h>
     13#define NB_ITERATION  1
     14#define CYCLE_MAX     (2048*NB_ITERATION)
    1615
     16#include "Common/include/Test.h"
    1717#include "Common/include/Time.h"
    1818#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h"
     
    2828using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
    2929
    30 void test    (string name,
    31               morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * param);
     30SC_MODULE(top)
     31{
     32#ifdef SYSTEMC
     33 private: sc_clock               *  in_CLOCK ;
     34 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     35
     36  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_VAL          ;
     37  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_IN_ACK          ;
     38  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_CONTEXT_ID   ;
     39  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_FRONT_END_ID ;
     40  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_OOO_ENGINE_ID;
     41  private: sc_signal<Tpacket_t         >    *  in_WRITE_UNIT_IN_PACKET_ID    ;
     42//private: sc_signal<Toperation_t      >    *  in_WRITE_UNIT_IN_OPERATION    ;
     43//private: sc_signal<Ttype_t           >    *  in_WRITE_UNIT_IN_TYPE         ;
     44  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_WRITE_RD     ;
     45  private: sc_signal<Tgeneral_address_t>    *  in_WRITE_UNIT_IN_NUM_REG_RD   ;
     46  private: sc_signal<Tgeneral_data_t   >    *  in_WRITE_UNIT_IN_DATA_RD      ;
     47  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_WRITE_RE     ;
     48  private: sc_signal<Tspecial_address_t>    *  in_WRITE_UNIT_IN_NUM_REG_RE   ;
     49  private: sc_signal<Tspecial_data_t   >    *  in_WRITE_UNIT_IN_DATA_RE      ;
     50  private: sc_signal<Texception_t      >    *  in_WRITE_UNIT_IN_EXCEPTION    ;
     51  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_NO_SEQUENCE  ;
     52  private: sc_signal<Taddress_t        >    *  in_WRITE_UNIT_IN_ADDRESS      ;
     53
     54  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_OUT_VAL          ;
     55  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_OUT_ACK          ;
     56  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_CONTEXT_ID   ;
     57  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_FRONT_END_ID ;
     58  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_OOO_ENGINE_ID;
     59  private: sc_signal<Tpacket_t         >    * out_WRITE_UNIT_OUT_PACKET_ID    ;
     60//private: sc_signal<Toperation_t      >    * out_WRITE_UNIT_OUT_OPERATION    ;
     61//private: sc_signal<Ttype_t           >    * out_WRITE_UNIT_OUT_TYPE         ;
     62  private: sc_signal<Tspecial_data_t   >    * out_WRITE_UNIT_OUT_FLAGS        ;
     63  private: sc_signal<Texception_t      >    * out_WRITE_UNIT_OUT_EXCEPTION    ;
     64  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_OUT_NO_SEQUENCE  ;
     65  private: sc_signal<Taddress_t        >    * out_WRITE_UNIT_OUT_ADDRESS      ;
     66  private: sc_signal<Tgeneral_data_t   >    * out_WRITE_UNIT_OUT_DATA         ;
     67
     68  private: sc_signal<Tcontrol_t        >   ** out_GPR_WRITE_VAL               ;
     69  private: sc_signal<Tcontrol_t        >   **  in_GPR_WRITE_ACK               ;
     70  private: sc_signal<Tcontext_t        >   ** out_GPR_WRITE_OOO_ENGINE_ID     ;
     71  private: sc_signal<Tgeneral_address_t>   ** out_GPR_WRITE_NUM_REG           ;
     72  private: sc_signal<Tgeneral_data_t   >   ** out_GPR_WRITE_DATA              ;
     73
     74  private: sc_signal<Tcontrol_t        >   ** out_SPR_WRITE_VAL               ;
     75  private: sc_signal<Tcontrol_t        >   **  in_SPR_WRITE_ACK               ;
     76  private: sc_signal<Tcontext_t        >   ** out_SPR_WRITE_OOO_ENGINE_ID     ;
     77  private: sc_signal<Tspecial_address_t>   ** out_SPR_WRITE_NUM_REG           ;
     78  private: sc_signal<Tspecial_data_t   >   ** out_SPR_WRITE_DATA              ;
     79
     80  private: sc_signal<Tcontext_t        >   ** out_BYPASS_WRITE_OOO_ENGINE_ID ;
     81  private: sc_signal<Tcontrol_t        >   ** out_BYPASS_WRITE_GPR_VAL       ;
     82  private: sc_signal<Tgeneral_address_t>   ** out_BYPASS_WRITE_GPR_NUM_REG   ; // RD
     83  private: sc_signal<Tgeneral_data_t   >   ** out_BYPASS_WRITE_GPR_DATA      ;
     84  private: sc_signal<Tcontrol_t        >   ** out_BYPASS_WRITE_SPR_VAL       ;
     85  private: sc_signal<Tspecial_address_t>   ** out_BYPASS_WRITE_SPR_NUM_REG   ; // RE
     86  private: sc_signal<Tspecial_data_t   >   ** out_BYPASS_WRITE_SPR_DATA      ;
     87#endif
     88
     89 private: std::string name;
     90 private: Tusage_t _usage;
     91 private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * _param;
     92#ifdef STATISTICS
     93 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
     94#endif
     95 private: Write_unit * component;
     96
     97 private: void usage
     98    (
     99#ifdef MTI_SYSTEMC
     100     int argc, const char * const * argv
     101#else
     102     int argc, char * argv[]
     103#endif
     104     );
     105 private: void allocation   (void);
     106 private: void deallocation (void);
     107 public : void test         (void);
     108
     109#ifdef MTI_SYSTEMC
     110  SC_CTOR(top::top);
     111#else
     112 public : top (sc_module_name module_name,int argc, char * argv[]);
     113#endif
     114 public : ~top(void);
     115};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/main.cpp

    r88 r113  
    66 */
    77
    8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/test.h"
     8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 11
    11 
    12 void usage (int argc, char * argv[])
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
    1316{
    14   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    15   err (_("list_params is :\n"));
    16   err (_(" * size_write_queue    (uint32_t)\n"));
    17   err (_(" * size_execute_queue  (uint32_t)\n"));
    18   err (_(" * nb_context          (uint32_t)\n"));
    19   err (_(" * nb_front_end        (uint32_t)\n"));
    20   err (_(" * nb_ooo_engine       (uint32_t)\n"));
    21   err (_(" * nb_packet           (uint32_t)\n"));
    22   err (_(" * size_general_data   (uint32_t)\n"));
    23   err (_(" * nb_general_register (uint32_t)\n"));
    24   err (_(" * size_special_data   (uint32_t)\n"));
    25   err (_(" * nb_special_register (uint32_t)\n"));
    26   err (_(" * nb_bypass_write     (uint32_t)\n"));
    27 
    28   exit (1);
    29 }
    30 
    31 #ifndef SYSTEMC
    32 int main    (int argc, char * argv[])
    33 #else
    34 int sc_main (int argc, char * argv[])
    35 #endif
    36 {
    37   if (argc != 2+NB_PARAMS)
    38     usage (argc, argv);
    39 
    40   uint32_t       x = 1;
    41 
    42   const string   name                =      argv[x++];
    43   const uint32_t size_write_queue    = atoi(argv[x++]);
    44   const uint32_t size_execute_queue  = atoi(argv[x++]);
    45   const uint32_t nb_context          = atoi(argv[x++]);
    46   const uint32_t nb_front_end        = atoi(argv[x++]);
    47   const uint32_t nb_ooo_engine       = atoi(argv[x++]);
    48   const uint32_t nb_packet           = atoi(argv[x++]);
    49   const uint32_t size_general_data   = atoi(argv[x++]);
    50   const uint32_t nb_general_register = atoi(argv[x++]);
    51   const uint32_t size_special_data   = atoi(argv[x++]);
    52   const uint32_t nb_special_register = atoi(argv[x++]);
    53   const uint32_t nb_bypass_write     = atoi(argv[x++]);
     17  int _return = EXIT_SUCCESS;
    5418
    5519  try
    5620    {
    57       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters
    58         (size_write_queue   ,
    59          size_execute_queue ,
    60          nb_context         ,
    61          nb_front_end       ,
    62          nb_ooo_engine      ,
    63          nb_packet          ,
    64          size_general_data  ,
    65          nb_general_register,
    66          size_special_data  ,
    67          nb_special_register,
    68          nb_bypass_write    ,
    69          true // is_toplevel
    70          );
    71      
    72       msg(_("%s"),param->print(1).c_str());
    73      
    74       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    7526    }
    7627  catch (morpheo::ErrorMorpheo & error)
    7728    {
    78       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    79       exit (EXIT_FAILURE);
     29      msgError(_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
    8031    }
    81   catch (...)
     32 
     33  try
    8234    {
    83       err (_("<%s> : This test must generate a error.\n"),name.c_str());
    84       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Write_unit : no error");
     37      else
     38        TEST_KO("Write_unit : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    8544    }
    8645
    87   return (EXIT_SUCCESS);
     46  return _return;
    8847}
    89 
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Write_queue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h

    r111 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "Write_queue"
    77 */
    88
     
    1111#endif
    1212
    13 #include <string>
    14 #include <iostream>
    15 #include <sys/time.h>
     13#define NB_ITERATION  1
     14#define CYCLE_MAX     (1024*NB_ITERATION)
    1615
     16#include "Common/include/Test.h"
    1717#include "Common/include/Time.h"
    1818#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
     
    2929using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue;
    3030
    31 void test    (string name,
    32               morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * param);
     31SC_MODULE(top)
     32{
     33#ifdef SYSTEMC
     34 private: sc_clock               *  in_CLOCK ;
     35 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     36
     37  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_VAL           ;
     38  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_IN_ACK           ;
     39  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_CONTEXT_ID    ;
     40  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_FRONT_END_ID  ;
     41  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_OOO_ENGINE_ID ;
     42  private: sc_signal<Tpacket_t         >  *  in_WRITE_QUEUE_IN_PACKET_ID     ;
     43//private: sc_signal<Toperation_t      >  *  in_WRITE_QUEUE_IN_OPERATION     ;
     44//private: sc_signal<Ttype_t           >  *  in_WRITE_QUEUE_IN_TYPE          ;
     45  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_WRITE_RD      ;
     46  private: sc_signal<Tgeneral_address_t>  *  in_WRITE_QUEUE_IN_NUM_REG_RD    ;
     47  private: sc_signal<Tgeneral_data_t   >  *  in_WRITE_QUEUE_IN_DATA_RD       ;
     48  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_WRITE_RE      ;
     49  private: sc_signal<Tspecial_address_t>  *  in_WRITE_QUEUE_IN_NUM_REG_RE    ;
     50  private: sc_signal<Tspecial_data_t   >  *  in_WRITE_QUEUE_IN_DATA_RE       ;
     51  private: sc_signal<Texception_t      >  *  in_WRITE_QUEUE_IN_EXCEPTION     ;
     52  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_NO_SEQUENCE   ;
     53  private: sc_signal<Taddress_t        >  *  in_WRITE_QUEUE_IN_ADDRESS       ;
     54  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_OUT_VAL          ;
     55  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_OUT_ACK          ;
     56  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_CONTEXT_ID   ;
     57  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_FRONT_END_ID ;
     58  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_OOO_ENGINE_ID;
     59  private: sc_signal<Tpacket_t         >  * out_WRITE_QUEUE_OUT_PACKET_ID    ;
     60//private: sc_signal<Toperation_t      >  * out_WRITE_QUEUE_OUT_OPERATION    ;
     61//private: sc_signal<Ttype_t           >  * out_WRITE_QUEUE_OUT_TYPE         ;
     62  private: sc_signal<Tspecial_data_t   >  * out_WRITE_QUEUE_OUT_FLAGS        ;
     63  private: sc_signal<Texception_t      >  * out_WRITE_QUEUE_OUT_EXCEPTION    ;
     64  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
     65  private: sc_signal<Tgeneral_data_t   >  * out_WRITE_QUEUE_OUT_ADDRESS      ;
     66  private: sc_signal<Taddress_t        >  * out_WRITE_QUEUE_OUT_DATA         ;
     67  private: sc_signal<Tcontrol_t        > ** out_GPR_WRITE_VAL                ;
     68  private: sc_signal<Tcontrol_t        > **  in_GPR_WRITE_ACK                ;
     69  private: sc_signal<Tcontext_t        > ** out_GPR_WRITE_OOO_ENGINE_ID      ;
     70  private: sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_NUM_REG            ;
     71  private: sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_DATA               ;
     72  private: sc_signal<Tcontrol_t        > ** out_SPR_WRITE_VAL                ;
     73  private: sc_signal<Tcontrol_t        > **  in_SPR_WRITE_ACK                ;
     74  private: sc_signal<Tcontext_t        > ** out_SPR_WRITE_OOO_ENGINE_ID      ;
     75  private: sc_signal<Tspecial_address_t> ** out_SPR_WRITE_NUM_REG            ;
     76  private: sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_DATA               ;
     77  private: sc_signal<Tcontext_t        > ** out_BYPASS_WRITE_OOO_ENGINE_ID   ;
     78  private: sc_signal<Tcontrol_t        > ** out_BYPASS_WRITE_GPR_VAL         ;
     79  private: sc_signal<Tgeneral_address_t> ** out_BYPASS_WRITE_GPR_NUM_REG     ;
     80  private: sc_signal<Tgeneral_data_t   > ** out_BYPASS_WRITE_GPR_DATA        ;
     81  private: sc_signal<Tcontrol_t        > ** out_BYPASS_WRITE_SPR_VAL         ;
     82  private: sc_signal<Tspecial_address_t> ** out_BYPASS_WRITE_SPR_NUM_REG     ;
     83  private: sc_signal<Tspecial_data_t   > ** out_BYPASS_WRITE_SPR_DATA        ;
     84
     85#endif
     86
     87 private: std::string name;
     88 private: Tusage_t _usage;
     89 private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * _param;
     90#ifdef STATISTICS
     91 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
     92#endif
     93 private: Write_queue * component;
     94
     95 private: void usage
     96    (
     97#ifdef MTI_SYSTEMC
     98     int argc, const char * const * argv
     99#else
     100     int argc, char * argv[]
     101#endif
     102     );
     103 private: void allocation   (void);
     104 private: void deallocation (void);
     105 public : void test         (void);
     106
     107#ifdef MTI_SYSTEMC
     108  SC_CTOR(top::top);
     109#else
     110 public : top (sc_module_name module_name,int argc, char * argv[]);
     111#endif
     112 public : ~top(void);
     113};
     114
     115 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/main.cpp

    r88 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h"
     8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 10
    11 
    12 void usage (int argc, char * argv[])
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
    1316{
    14   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    15   err (_("list_params is :\n"));
    16   err (_(" * size_queue          (uint32_t)\n"));
    17   err (_(" * nb_context          (uint32_t)\n"));
    18   err (_(" * nb_front_end        (uint32_t)\n"));
    19   err (_(" * nb_ooo_engine       (uint32_t)\n"));
    20   err (_(" * nb_packet           (uint32_t)\n"));
    21   err (_(" * size_general_data   (uint32_t)\n"));
    22   err (_(" * nb_general_register (uint32_t)\n"));
    23   err (_(" * size_special_data   (uint32_t)\n"));
    24   err (_(" * nb_special_register (uint32_t)\n"));
    25   err (_(" * nb_bypass_write     (uint32_t)\n"));
    26 
    27   exit (1);
    28 }
    29 
    30 #ifndef SYSTEMC
    31 int main    (int argc, char * argv[])
    32 #else
    33 int sc_main (int argc, char * argv[])
    34 #endif
    35 {
    36   if (argc != 2+NB_PARAMS)
    37     usage (argc, argv);
    38 
    39   uint32_t       x = 1;
    40 
    41   const string   name                =      argv[x++];
    42   const uint32_t size_queue          = atoi(argv[x++]);
    43   const uint32_t nb_context          = atoi(argv[x++]);
    44   const uint32_t nb_front_end        = atoi(argv[x++]);
    45   const uint32_t nb_ooo_engine       = atoi(argv[x++]);
    46   const uint32_t nb_packet           = atoi(argv[x++]);
    47   const uint32_t size_general_data   = atoi(argv[x++]);
    48   const uint32_t nb_general_register = atoi(argv[x++]);
    49   const uint32_t size_special_data   = atoi(argv[x++]);
    50   const uint32_t nb_special_register = atoi(argv[x++]);
    51   const uint32_t nb_bypass_write     = atoi(argv[x++]);
     17  int _return = EXIT_SUCCESS;
    5218
    5319  try
    5420    {
    55       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters
    56         (size_queue         ,
    57          nb_context         ,
    58          nb_front_end       ,
    59          nb_ooo_engine      ,
    60          nb_packet          ,
    61          size_general_data  ,
    62          nb_general_register,
    63          size_special_data  ,
    64          nb_special_register,
    65          nb_bypass_write    ,
    66          true // is_toplevel
    67          );
    68      
    69       msg(_("%s"),param->print(1).c_str());
    70      
    71       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    7226    }
    7327  catch (morpheo::ErrorMorpheo & error)
    7428    {
    75       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    76       exit (EXIT_FAILURE);
     29      msg(_("%s"),error.what ());
     30      _return = EXIT_FAILURE;
    7731    }
    78   catch (...)
     32 
     33  try
    7934    {
    80       err (_("<%s> : This test must generate a error.\n"),name.c_str());
    81       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Write_queue : no error");
     37      else
     38        TEST_KO("Write_queue : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    8244    }
    8345
    84   return (EXIT_SUCCESS);
     46  return _return;
    8547}
    86 
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h

    r97 r113  
    3030#include "Behavioural/include/Usage.h"
    3131
     32#include "Behavioural/Generic/Queue/include/Queue.h"
     33
    3234namespace morpheo {
    3335namespace behavioural {
     
    4850  protected : const std::string  _name;
    4951  protected : const Parameters * _param;
    50   private   : const Tusage_t     _usage;
     52  public    :      Tusage_t     _usage;
    5153
    5254#ifdef STATISTICS
     
    126128
    127129    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     130  private   : morpheo::behavioural::generic::queue::Parameters * _param_queue;
     131  private   : morpheo::behavioural::generic::queue::Queue      * _component_queue;
    128132
    129133    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp

    r103 r113  
    3030                          uint32_t nb_special_register,
    3131                          uint32_t nb_bypass_write    ,
    32                           bool     is_toplevel)
     32                          bool     is_toplevel):
     33    behavioural::Parameters ("Write_queue")
    3334  {
    3435    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     
    6768        copy();
    6869      }
    69 
    70     _size_internal_queue =
    71       ( _size_context_id          + 
    72         _size_front_end_id        + 
    73         _size_ooo_engine_id       + 
    74         _size_rob_ptr             +
    75         1                         +
    76         _size_general_register    +
    77         _size_general_data        +
    78         1                         +
    79         _size_special_register    +
    80         _size_special_data        +
    81         _size_exception           +
    82         1                         +
    83         _size_instruction_address
    84        );
    8570
    8671    log_printf(FUNC,Write_queue,FUNCTION,"End");
     
    134119  {
    135120    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     121
     122    _size_internal_queue =
     123      ( _size_context_id          + 
     124        _size_front_end_id        + 
     125        _size_ooo_engine_id       + 
     126        _size_rob_ptr             +
     127        1                         +
     128        _size_general_register    +
     129        _size_general_data        +
     130        1                         +
     131        _size_special_register    +
     132        _size_special_data        +
     133        _size_exception           +
     134        1                         +
     135        _size_instruction_address
     136       );
     137
    136138    log_printf(FUNC,Write_queue,FUNCTION,"End");
    137139  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp

    r81 r113  
    2626    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    2727
    28     Parameters_test test ("Write_queue");
     28    Parameters_test test (_type);
    2929
    3030    if (_nb_bypass_write > _size_queue)
    31       test.error("The write_queue can't have more bypass_write than entry in the queue.");
     31      test.error("The write_queue can't have more bypass_write than entry in the queue.\n");
    3232
    3333    log_printf(FUNC,Write_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp

    r88 r113  
    3737    ,_usage            (usage)
    3838  {
    39     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     39    log_begin(Write_queue,FUNCTION);
    4040
    41 #if DEBUG_Write_queue == true
    42     log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     41// #if DEBUG_Write_queue == true
     42//     log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
    4343
    44     std::cout << *param << std::endl;
    45 #endif   
     44//     std::cout << *param << std::endl;
     45// #endif   
    4646
    47     log_printf(INFO,Write_queue,FUNCTION,"Allocation");
     47    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4848    allocation ();
    4949
     
    5151    if (usage_is_set(_usage,USE_STATISTICS))
    5252      {
    53         log_printf(INFO,Write_queue,FUNCTION,"Allocation of statistics");
     53        log_printf(INFO,Write_queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
    5454
    5555        statistics_declaration(param_statistics);
     
    6161      {
    6262        // generate the vhdl
    63         log_printf(INFO,Write_queue,FUNCTION,"Generate the vhdl");
     63        log_printf(INFO,Write_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6464       
    6565        vhdl();
     
    7070    if (usage_is_set(_usage,USE_SYSTEMC))
    7171      {
    72         log_printf(INFO,Write_queue,FUNCTION,"Method - transition");
     72        log_printf(INFO,Write_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    7373
    7474        SC_METHOD (transition);
     
    8080# endif   
    8181
    82         log_printf(INFO,Write_queue,FUNCTION,"Method - genMoore");
     82        log_printf(INFO,Write_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
    8383
    8484        SC_METHOD (genMoore);
     
    9292#endif
    9393      }
    94     log_printf(FUNC,Write_queue,FUNCTION,"End");
     94    log_end(Write_queue,FUNCTION);
    9595  };
    9696   
     
    9999  Write_queue::~Write_queue (void)
    100100  {
    101     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     101    log_begin(Write_queue,FUNCTION);
    102102
    103103#ifdef STATISTICS
    104104    if (usage_is_set(_usage,USE_STATISTICS))
    105105      {
    106         log_printf(INFO,Write_queue,FUNCTION,"Generate Statistics file");
     106        log_printf(INFO,Write_queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
    107107       
    108108        delete _stat;
     
    110110#endif
    111111
    112     log_printf(INFO,Write_queue,FUNCTION,"Deallocation");
     112    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    113113    deallocation ();
    114114
    115     log_printf(FUNC,Write_queue,FUNCTION,"End");
     115    log_end(Write_queue,FUNCTION);
    116116  };
    117117
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp

    r112 r113  
    2828
    2929    Entity * entity = _component->set_entity (_name       
    30                                               ,"Write_queue"
     30                                              ,_param->_type
    3131#ifdef POSITION
    3232                                              ,COMBINATORY
     
    136136     }
    137137
    138     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     138    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    139139
    140140     _queue = new std::list<write_queue_entry_t *>;
     141
     142    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     143    _param_queue = new morpheo::behavioural::generic::queue::Parameters
     144      (_param->_size_queue,
     145       _param->_size_internal_queue,
     146       _param->_nb_bypass_write,
     147       false,
     148       false
     149       );
     150
     151    std::string queue_name = _name + "_queue";
     152    _component_queue = new morpheo::behavioural::generic::queue::Queue
     153      (queue_name.c_str()
     154#ifdef STATISTICS
     155       ,NULL
     156#endif
     157       ,_param_queue
     158       ,USE_VHDL);
     159   
     160    _component->set_component(_component_queue->_component
     161#ifdef POSITION
     162                              , 50, 50, 50, 50
     163#endif
     164                              , INSTANCE_LIBRARY
     165                              );
    141166
    142167#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp

    r112 r113  
    9292
    9393    delete _component;
     94    delete _component_queue;
     95    delete _param_queue;
    9496
    9597    log_printf(FUNC,Write_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_statistics_declaration.cpp

    r81 r113  
    2626
    2727    _stat = new Stat (static_cast<std::string>(_name),
    28                       "Write_queue",
     28                      _param->_type,
    2929                      param_statistics);
    3030
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp

    r105 r113  
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
    1010#include "Behavioural/include/Vhdl.h"
    11 #include "Behavioural/Generic/Queue/include/Queue.h"
    1211
    1312namespace morpheo                    {
     
    2625  {
    2726    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    28 
    29     morpheo::behavioural::generic::queue::Parameters * param_queue;
    30     morpheo::behavioural::generic::queue::Queue      * queue;
    31    
    32     param_queue = new morpheo::behavioural::generic::queue::Parameters
    33       (_param->_size_queue,
    34        _param->_size_internal_queue,
    35        _param->_nb_bypass_write,
    36        false,
    37        false
    38        );
    39 
    40     std::cout << "size internal queue :" << _param->_size_internal_queue << "." << std::endl;
    41 
    42     std::string queue_name = _name + "_queue";
    43     queue = new morpheo::behavioural::generic::queue::Queue
    44       (queue_name.c_str()
    45 #ifdef STATISTICS
    46        ,NULL
    47 #endif
    48        ,param_queue
    49        ,USE_VHDL);
    50    
    51     _component->set_component(queue->_component
    52 #ifdef POSITION
    53                               , 50, 50, 50, 50
    54 #endif
    55                               , INSTANCE_LIBRARY
    56                               );
    57 
    58 
    5927
    6028    Vhdl * vhdl = new Vhdl (_name);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl_declaration.cpp

    r103 r113  
    5454    uint32_t min = 0;
    5555    uint32_t max, size;
    56     uint32_t min_ooo, max_ooo;
     56    uint32_t min_ooo, max_ooo = 0;
    5757    uint32_t pos_write_rd, min_gpr_num_reg, max_gpr_num_reg, min_gpr_data, max_gpr_data;
    5858    uint32_t pos_write_re, min_spr_num_reg, max_spr_num_reg, min_spr_data, max_spr_data;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h

    r97 r113  
    4848  protected : const std::string  _name;
    4949  protected : const Parameters * _param;
    50   private   : const Tusage_t     _usage;
     50  public    :      Tusage_t     _usage;
    5151
    5252#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp

    r97 r113  
    3030                          uint32_t nb_special_register,
    3131                          uint32_t nb_bypass_write    ,
    32                           bool     is_toplevel        )
     32                          bool     is_toplevel        ):
     33    behavioural::Parameters("Write_unit")
    3334  {
    3435    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp

    r88 r113  
    3636    ,_usage            (usage)
    3737  {
    38     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     38    log_begin(Write_unit,FUNCTION);
    3939
    40 #if DEBUG_Write_unit == true
    41     log_printf(INFO,Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40// #if DEBUG_Write_unit == true
     41//     log_printf(INFO,Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
    4242
    43     std::cout << *param << std::endl;
    44 #endif   
     43//     std::cout << *param << std::endl;
     44// #endif   
    4545
    46     log_printf(INFO,Write_unit,FUNCTION,"Allocation");
     46    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4747
    4848    allocation (
     
    5555    if (usage_is_set(_usage,USE_STATISTICS))
    5656      {
    57         log_printf(INFO,Write_unit,FUNCTION,"Allocation of statistics");
     57        log_printf(INFO,Write_unit,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
    5858
    5959        statistics_declaration(param_statistics);
     
    6565      {
    6666        // generate the vhdl
    67         log_printf(INFO,Write_unit,FUNCTION,"Generate the vhdl");
     67        log_printf(INFO,Write_unit,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6868       
    6969        vhdl();
     
    7474    if (usage_is_set(_usage,USE_SYSTEMC))
    7575      {
    76         log_printf(INFO,Write_unit,FUNCTION,"Method - transition");
     76        log_printf(INFO,Write_unit,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    7777
    7878        SC_METHOD (transition);
     
    8686#endif
    8787      }
    88     log_printf(FUNC,Write_unit,FUNCTION,"End");
     88    log_end(Write_unit,FUNCTION);
    8989  };
    9090   
     
    9393  Write_unit::~Write_unit (void)
    9494  {
    95     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     95    log_begin(Write_unit,FUNCTION);
    9696
    9797#ifdef STATISTICS
    9898    if (usage_is_set(_usage,USE_STATISTICS))
    9999      {
    100         log_printf(INFO,Write_unit,FUNCTION,"Generate Statistics file");
     100        log_printf(INFO,Write_unit,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
    101101
    102102        delete _stat;
     
    104104#endif
    105105
    106     log_printf(INFO,Write_unit,FUNCTION,"Deallocation");
     106    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    107107    deallocation ();
    108108
    109     log_printf(FUNC,Write_unit,FUNCTION,"End");
     109    log_end(Write_unit,FUNCTION);
    110110  };
    111111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp

    r112 r113  
    3434
    3535    Entity * entity = _component->set_entity (_name       
    36                                               ,"Write_unit"
     36                                              ,_param->_type
    3737#ifdef POSITION
    3838                                              ,COMBINATORY
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_statistics_declaration.cpp

    r81 r113  
    2525
    2626    _stat       = new Stat (static_cast<std::string>(_name),
    27                             "Write_unit",
     27                            _param->_type,
    2828                            param_statistics);
    2929
    30     _stat->add_stat(component_write_queue->_stat);
    31     if (_param->_have_component_execute_queue)
     30    if (usage_is_set(component_write_queue->_usage,USE_STATISTICS))
     31      _stat->add_stat(component_write_queue->_stat);
     32   
     33    if (_param->_have_component_execute_queue and (usage_is_set(component_execute_queue->_usage,USE_STATISTICS)))
    3234      _stat->add_stat(component_execute_queue->_stat);
    3335       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Execute_unit_to_Write_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Read_unit_to_Execution_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Register_unit
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Register_unit_Glue
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/Makefile.defs

    r83 r113  
    77#
    88
     9ENTITY                          = Context_State
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Instruction
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Decod
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r112 r113  
    5151  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5252  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     53
     54  sc_signal<Tcontrol_t         > ***  in_IFETCH_VAL                         ;//[nb_context][nb_inst_fetch]
     55  sc_signal<Tcontrol_t         > *** out_IFETCH_ACK                         ;//[nb_context][nb_inst_fetch]
     56  sc_signal<Tinstruction_t     > ***  in_IFETCH_INSTRUCTION                 ;//[nb_context][nb_inst_fetch]
     57  sc_signal<Tcontext_t         >  **  in_IFETCH_CONTEXT_ID                  ;//[nb_context]
     58  sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS                     ;//[nb_context]
     59//sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS_NEXT                ;//[nb_context]
     60  sc_signal<Tinst_ifetch_ptr_t >  **  in_IFETCH_INST_IFETCH_PTR             ;//[nb_context]
     61  sc_signal<Tbranch_state_t    >  **  in_IFETCH_BRANCH_STATE                ;//[nb_context]
     62  sc_signal<Tprediction_ptr_t  >  **  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;//[nb_context]
     63  sc_signal<Texception_t       >  **  in_IFETCH_EXCEPTION                   ;//[nb_context]
     64  sc_signal<Tcontrol_t         >  ** out_DECOD_VAL                          ;//[nb_inst_decod]
     65  sc_signal<Tcontrol_t         >  **  in_DECOD_ACK                          ;//[nb_inst_decod]
     66  sc_signal<Tcontext_t         >  ** out_DECOD_CONTEXT_ID                   ;//[nb_inst_decod]
     67  sc_signal<Tdepth_t           >  ** out_DECOD_DEPTH                        ;//[nb_inst_decod]
     68  sc_signal<Ttype_t            >  ** out_DECOD_TYPE                         ;//[nb_inst_decod]
     69  sc_signal<Toperation_t       >  ** out_DECOD_OPERATION                    ;//[nb_inst_decod]
     70  sc_signal<Tcontrol_t         >  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
     71  sc_signal<Tcontrol_t         >  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
     72  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     73  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
     74  sc_signal<Tcontrol_t         >  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
     75  sc_signal<Tgeneral_data_t    >  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
     76  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RA                      ;//[nb_inst_decod]
     77  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RA                   ;//[nb_inst_decod]
     78  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RB                      ;//[nb_inst_decod]
     79  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RB                   ;//[nb_inst_decod]
     80  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RC                      ;//[nb_inst_decod]
     81  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RC                   ;//[nb_inst_decod]
     82  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RD                     ;//[nb_inst_decod]
     83  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RD                   ;//[nb_inst_decod]
     84  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RE                     ;//[nb_inst_decod]
     85  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RE                   ;//[nb_inst_decod]
     86  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION_USE                ;//[nb_inst_decod]
     87  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION                    ;//[nb_inst_decod]
     88  sc_signal<Tcontrol_t         >  ** out_PREDICT_VAL                        ;//[nb_inst_decod]
     89  sc_signal<Tcontrol_t         >  **  in_PREDICT_ACK                        ;//[nb_inst_decod]
     90  sc_signal<Tcontext_t         >  ** out_PREDICT_CONTEXT_ID                 ;//[nb_inst_decod]
     91  sc_signal<Tcontrol_t         >  ** out_PREDICT_MATCH_INST_IFETCH_PTR      ;//[nb_inst_decod]
     92  sc_signal<Tbranch_state_t    >  ** out_PREDICT_BRANCH_STATE               ;//[nb_inst_decod]
     93  sc_signal<Tprediction_ptr_t  >  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID;//[nb_inst_decod]
     94  sc_signal<Tbranch_condition_t>  ** out_PREDICT_BRANCH_CONDITION           ;//[nb_inst_decod]
     95//sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_STACK_WRITE         ;//[nb_inst_decod]
     96  sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_DIRECTION           ;//[nb_inst_decod]
     97  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_SRC                ;//[nb_inst_decod]
     98  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_DEST               ;//[nb_inst_decod]
     99  sc_signal<Tcontrol_t         >  **  in_PREDICT_CAN_CONTINUE               ;//[nb_inst_decod]
     100  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DECOD_ENABLE               ;//[nb_context]
     101  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DEPTH_VAL                  ;//[nb_context]
     102  sc_signal<Tdepth_t           >  **  in_CONTEXT_DEPTH                      ;//[nb_context]
     103  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_VAL                  ;
     104  sc_signal<Tcontrol_t         >   *  in_CONTEXT_EVENT_ACK                  ;
     105  sc_signal<Tcontext_t         >   * out_CONTEXT_EVENT_CONTEXT_ID           ;
     106  sc_signal<Tdepth_t           >   * out_CONTEXT_EVENT_DEPTH                ;
     107  sc_signal<Tevent_type_t      >   * out_CONTEXT_EVENT_TYPE                 ;
     108  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
     109  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS              ;
     110  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS_EPCR         ;
    53111
    54112  ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/Makefile.defs

    r82 r113  
    77#
    88
     9ENTITY                          = Decod_queue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp

    r111 r113  
    5151  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5252  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     53
     54  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_VAL            ;//[nb_inst_decod]
     55  sc_signal<Tcontrol_t         >  ** out_DECOD_IN_ACK            ;//[nb_inst_decod]
     56  sc_signal<Tcontext_t         >  **  in_DECOD_IN_CONTEXT_ID     ;//[nb_inst_decod]
     57  sc_signal<Tdepth_t           >  **  in_DECOD_IN_DEPTH          ;//[nb_inst_decod]
     58  sc_signal<Ttype_t            >  **  in_DECOD_IN_TYPE           ;//[nb_inst_decod]
     59  sc_signal<Toperation_t       >  **  in_DECOD_IN_OPERATION      ;//[nb_inst_decod]
     60  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_NO_EXECUTE     ;//[nb_inst_decod]
     61  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_IS_DELAY_SLOT  ;//[nb_inst_decod]
     62  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
     63  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_ADDRESS_NEXT   ;//[nb_inst_decod]
     64  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_HAS_IMMEDIAT   ;//[nb_inst_decod]
     65  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_IMMEDIAT       ;//[nb_inst_decod]
     66  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RA        ;//[nb_inst_decod]
     67  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RA     ;//[nb_inst_decod]
     68  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RB        ;//[nb_inst_decod]
     69  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RB     ;//[nb_inst_decod]
     70  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RC        ;//[nb_inst_decod]
     71  sc_signal<Tspecial_address_t >  **  in_DECOD_IN_NUM_REG_RC     ;//[nb_inst_decod]
     72  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_WRITE_RD       ;//[nb_inst_decod]
     73  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RD     ;//[nb_inst_decod]
     74  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_WRITE_RE       ;//[nb_inst_decod]
     75  sc_signal<Tspecial_address_t >  **  in_DECOD_IN_NUM_REG_RE     ;//[nb_inst_decod]
     76  sc_signal<Texception_t       >  **  in_DECOD_IN_EXCEPTION_USE  ;//[nb_inst_decod]
     77  sc_signal<Texception_t       >  **  in_DECOD_IN_EXCEPTION      ;//[nb_inst_decod]
     78  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_VAL           ;//[nb_inst_decod]
     79  sc_signal<Tcontrol_t         >  **  in_DECOD_OUT_ACK           ;//[nb_inst_decod]
     80  sc_signal<Tcontext_t         >  ** out_DECOD_OUT_CONTEXT_ID    ;//[nb_inst_decod]
     81  sc_signal<Tdepth_t           >  ** out_DECOD_OUT_DEPTH         ;//[nb_inst_decod]
     82  sc_signal<Ttype_t            >  ** out_DECOD_OUT_TYPE          ;//[nb_inst_decod]
     83  sc_signal<Toperation_t       >  ** out_DECOD_OUT_OPERATION     ;//[nb_inst_decod]
     84  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
     85  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
     86  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
     87  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_ADDRESS_NEXT  ;//[nb_inst_decod]
     88  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_HAS_IMMEDIAT  ;//[nb_inst_decod]
     89  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_IMMEDIAT      ;//[nb_inst_decod]
     90  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RA       ;//[nb_inst_decod]
     91  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RA    ;//[nb_inst_decod]
     92  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RB       ;//[nb_inst_decod]
     93  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RB    ;//[nb_inst_decod]
     94  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RC       ;//[nb_inst_decod]
     95  sc_signal<Tspecial_address_t >  ** out_DECOD_OUT_NUM_REG_RC    ;//[nb_inst_decod]
     96  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_WRITE_RD      ;//[nb_inst_decod]
     97  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RD    ;//[nb_inst_decod]
     98  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_WRITE_RE      ;//[nb_inst_decod]
     99  sc_signal<Tspecial_address_t >  ** out_DECOD_OUT_NUM_REG_RE    ;//[nb_inst_decod]
     100  sc_signal<Texception_t       >  ** out_DECOD_OUT_EXCEPTION_USE ;//[nb_inst_decod]
     101  sc_signal<Texception_t       >  ** out_DECOD_OUT_EXCEPTION     ;//[nb_inst_decod]
     102  sc_signal<Tdepth_t           >  **  in_DEPTH_MIN               ;//[nb_context]
     103  sc_signal<Tdepth_t           >  **  in_DEPTH_MAX               ;//[nb_context]
     104  sc_signal<Tcontrol_t         >  **  in_DEPTH_FULL              ;//[nb_context]
     105  sc_signal<Tcounter_t         >  ** out_NB_INST_ALL             ;//[nb_context]
    53106
    54107  ALLOC1_SC_SIGNAL( in_DECOD_IN_VAL            ," in_DECOD_IN_VAL           ",Tcontrol_t         ,_param->_nb_inst_decod);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Makefile.defs

    r83 r113  
    77#
    88
     9ENTITY                          = Decod_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Front_end_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Address_management
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp

    r112 r113  
    5050  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5151  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     52
     53  sc_signal<Tcontrol_t        >    * out_ADDRESS_VAL                         ;
     54  sc_signal<Tcontrol_t        >    *  in_ADDRESS_ACK                         ; //icache_req_ack and ifetch_queue_ack
     55  sc_signal<Tgeneral_address_t>    * out_ADDRESS_INSTRUCTION_ADDRESS         ;
     56  sc_signal<Tcontrol_t        >   ** out_ADDRESS_INSTRUCTION_ENABLE          ; //[nb_instruction]
     57  sc_signal<Tinst_ifetch_ptr_t>    * out_ADDRESS_INST_IFETCH_PTR             ;
     58  sc_signal<Tbranch_state_t   >    * out_ADDRESS_BRANCH_STATE                ;
     59  sc_signal<Tprediction_ptr_t >    * out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ;
     60  sc_signal<Tcontrol_t        >    * out_PREDICT_VAL                         ;
     61  sc_signal<Tcontrol_t        >    *  in_PREDICT_ACK                         ;
     62  sc_signal<Tgeneral_address_t>    * out_PREDICT_PC_PREVIOUS                 ;
     63  sc_signal<Tgeneral_address_t>    * out_PREDICT_PC_CURRENT                  ;
     64  sc_signal<Tcontrol_t        >    * out_PREDICT_PC_CURRENT_IS_DS_TAKE       ;
     65  sc_signal<Tgeneral_address_t>    *  in_PREDICT_PC_NEXT                     ;
     66  sc_signal<Tcontrol_t        >    *  in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
     67  sc_signal<Tcontrol_t        >   **  in_PREDICT_INSTRUCTION_ENABLE          ; //[nb_instruction]
     68//sc_signal<Tcontrol_t        >    *  in_PREDICT_BRANCH_IS_CURRENT           ;
     69  sc_signal<Tbranch_state_t   >    *  in_PREDICT_BRANCH_STATE                ;
     70  sc_signal<Tprediction_ptr_t >    *  in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
     71  sc_signal<Tinst_ifetch_ptr_t>    *  in_PREDICT_INST_IFETCH_PTR             ;
     72  sc_signal<Tcontrol_t        >    *  in_EVENT_VAL                           ;
     73  sc_signal<Tcontrol_t        >    * out_EVENT_ACK                           ;
     74  sc_signal<Tgeneral_address_t>    *  in_EVENT_ADDRESS                       ;
     75  sc_signal<Tgeneral_address_t>    *  in_EVENT_ADDRESS_NEXT                  ;
     76  sc_signal<Tcontrol_t        >    *  in_EVENT_ADDRESS_NEXT_VAL              ;
     77  sc_signal<Tcontrol_t        >    *  in_EVENT_IS_DS_TAKE                    ;
    5278
    5379  ALLOC0_SC_SIGNAL (out_ADDRESS_VAL                        ,"out_ADDRESS_VAL                        ",Tcontrol_t        );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Ifetch_queue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/main.cpp

    r88 r113  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/include/test.h"
    9 
     9#include "Behavioural/include/Selftest.h"
    1010#define NB_PARAMS 4
    1111
     
    3333  uint32_t x = 1;
    3434
    35   string name = argv[x++];
    36  
    37   uint32_t _size_queue                    = fromString<uint32_t>(argv[x++]);
    38   uint32_t _nb_instruction                = fromString<uint32_t>(argv[x++]);
    39   uint32_t _size_branch_update_prediction = fromString<uint32_t>(argv[x++]);
    40   uint32_t _size_general_data             = fromString<uint32_t>(argv[x++]);
     35  string   name;
     36  uint32_t _size_queue                   ;
     37  uint32_t _nb_instruction               ;
     38  uint32_t _size_branch_update_prediction;
     39  uint32_t _size_general_data            ;
     40
     41  SELFTEST0( name                         ,string ,argv,x);
     42  SELFTEST0(_size_queue                   ,uint32_t,argv,x);
     43  SELFTEST0(_nb_instruction               ,uint32_t,argv,x);
     44  SELFTEST0(_size_branch_update_prediction,uint32_t,argv,x);
     45  SELFTEST0(_size_general_data            ,uint32_t,argv,x);
    4146
    4247  int _return = EXIT_SUCCESS;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp

    r112 r113  
    6767  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    6868  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     69
     70  sc_signal<Tcontrol_t            >  *  in_ADDRESS_VAL                         ;
     71  sc_signal<Tcontrol_t            >  * out_ADDRESS_ACK                         ;
     72  sc_signal<Tifetch_queue_ptr_t   >  * out_ADDRESS_IFETCH_QUEUE_ID             ;
     73  sc_signal<Tcontrol_t            > **  in_ADDRESS_INSTRUCTION_ENABLE          ;//[nb_instruction]
     74  sc_signal<Tgeneral_address_t    >  *  in_ADDRESS_INSTRUCTION_ADDRESS         ;
     75  sc_signal<Tinst_ifetch_ptr_t    >  *  in_ADDRESS_INST_IFETCH_PTR             ;
     76  sc_signal<Tbranch_state_t       >  *  in_ADDRESS_BRANCH_STATE                ;
     77  sc_signal<Tprediction_ptr_t     >  *  in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ;
     78  sc_signal<Tcontrol_t            > ** out_DECOD_VAL                           ;//[nb_instruction]
     79  sc_signal<Tcontrol_t            > **  in_DECOD_ACK                           ;//[nb_instruction]
     80  sc_signal<Tinstruction_t        > ** out_DECOD_INSTRUCTION                   ;//[nb_instruction]
     81  sc_signal<Tgeneral_address_t    >  * out_DECOD_ADDRESS                       ;
     82  sc_signal<Tinst_ifetch_ptr_t    >  * out_DECOD_INST_IFETCH_PTR               ;
     83  sc_signal<Tbranch_state_t       >  * out_DECOD_BRANCH_STATE                  ;
     84  sc_signal<Tprediction_ptr_t     >  * out_DECOD_BRANCH_UPDATE_PREDICTION_ID   ;
     85  sc_signal<Texception_t          >  * out_DECOD_EXCEPTION                     ;
     86  sc_signal<Tcontrol_t            >  *  in_ICACHE_RSP_VAL                      ;
     87  sc_signal<Tcontrol_t            >  * out_ICACHE_RSP_ACK                      ;
     88  sc_signal<Tpacket_t             >  *  in_ICACHE_RSP_PACKET_ID                ;
     89  sc_signal<Ticache_instruction_t > **  in_ICACHE_RSP_INSTRUCTION              ;//[nb_instruction]
     90  sc_signal<Ticache_error_t       >  *  in_ICACHE_RSP_ERROR                    ;
     91  sc_signal<Tcontrol_t            >  *  in_EVENT_RESET_VAL                     ;// val if : miss_speculation, exception, synchronization
     92  sc_signal<Tcontrol_t            >  * out_EVENT_RESET_ACK                     ;
    6993
    7094  ALLOC0_SC_SIGNAL( in_ADDRESS_VAL                        ," in_ADDRESS_VAL                        ",Tcontrol_t           );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_msg_error.cpp

    r109 r113  
    1818namespace ifetch_queue {
    1919
    20 
    2120#undef  FUNCTION
    2221#define FUNCTION "Ifetch_queue::msg_error"
     
    2827
    2928    if (not is_multiple (_nb_instruction_in_queue,_nb_instruction))
    30       test.error("Size of ifetch queue must be a multiple of nb_instruction.\n");
     29      test.error(_("Size of ifetch queue must be a multiple of nb_instruction.\n"));
    3130
    3231    if (_size_queue == 1)
    33       test.warning("To best perfomance, size_queue must be > 1.\n");
     32      test.warning(_("To best perfomance, size_queue must be > 1.\n"));
    3433   
    3534    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Ifetch_unit_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Ifetch_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Front_end
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Branch_Target_Buffer_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Branch_Target_Buffer_Register
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h

    r82 r113  
    137137   morpheo::behavioural::Tusage_t                usage
    138138   );
     139
    139140  public  :          ~Branch_Target_Buffer_Register             (void);
    140141                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp

    r88 r113  
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h"
    99
    10 namespace morpheo                    {
     10namespace morpheo {
    1111namespace behavioural {
    1212namespace core {
     
    1616namespace branch_target_buffer {
    1717namespace branch_target_buffer_register {
    18 
    1918
    2019#undef  FUNCTION
     
    3332   morpheo::behavioural::Tusage_t usage
    3433   ):
    35     _name              (name)
    36     ,_param            (param)
    37     ,_usage            (usage)
     34    _name  (name)
     35   ,_param (param)
     36   ,_usage (usage)
    3837  {
    3938    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     
    160159          }
    161160
    162 # ifdef SYSTEMCASS_SPECIFIC
    163         // List dependency information
    164         for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    165           {
    166             (*(out_DECOD_HIT [i])) (*(in_DECOD_VAL         [i]));
    167             (*(out_DECOD_HIT [i])) (*(in_DECOD_ADDRESS_SRC [i]));
    168             if (_param->_have_port_context_id)
    169             (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
    170 
    171             (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
    172             (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
    173             if (_param->_have_port_context_id)
    174             (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
    175           }
    176           }
    177 #endif
     161// # ifdef SYSTEMCASS_SPECIFIC
     162//      // List dependency information
     163//      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     164//        {
     165//          (*(out_DECOD_HIT [i])) (*(in_DECOD_VAL         [i]));
     166//          (*(out_DECOD_HIT [i])) (*(in_DECOD_ADDRESS_SRC [i]));
     167//          if (_param->_have_port_context_id)
     168//          (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
     169
     170//          (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
     171//          (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
     172//          if (_param->_have_port_context_id)
     173//          (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
     174//        }
     175// #endif
     176          }
    178177
    179178        if (_param->_have_port_victim)
     
    192191          }
    193192
    194 # ifdef SYSTEMCASS_SPECIFIC
    195         // List dependency information
    196         for (uint32_t i=0; i<_param->_nb_inst_update; i++)
    197           {
    198             (*(out_UPDATE_HIT [i])) (*(in_UPDATE_VAL         [i]));
    199             (*(out_UPDATE_HIT [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
    200             if (_param->_have_port_context_id)
    201             (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
    202 
    203             (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
    204             (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
    205             if (_param->_have_port_context_id)
    206             (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
    207           }
    208           }
    209 # endif
     193// # ifdef SYSTEMCASS_SPECIFIC
     194//      // List dependency information
     195//      for (uint32_t i=0; i<_param->_nb_inst_update; i++)
     196//        {
     197//          (*(out_UPDATE_HIT [i])) (*(in_UPDATE_VAL         [i]));
     198//          (*(out_UPDATE_HIT [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
     199//          if (_param->_have_port_context_id)
     200//          (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
     201
     202//          (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
     203//          (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
     204//          if (_param->_have_port_context_id)
     205//          (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
     206//        }
     207// # endif
     208          }
    210209#endif
    211210
     
    229228    log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Deallocation");
    230229    deallocation ();
    231 
    232230    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
    233231  };
     
    239237}; // end namespace multi_front_end
    240238}; // end namespace core
    241 
    242239}; // end namespace behavioural
    243 }; // end namespace morpheo             
     240}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Branch_Target_Buffer
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Direction_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Direction
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Makefile.defs

    r110 r113  
    77#
    88
     9ENTITY                          = Meta_Predictor
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/Makefile.defs

    r110 r113  
    77#
    88
     9ENTITY                          = Meta_Predictor_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Makefile.defs

    r110 r113  
    77#
    88
     9ENTITY                          = Two_Level_Branch_Predictor
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Prediction_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Prediction_unit_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Return_Address_Stack
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Update_Prediction_Table
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp

    r112 r113  
    12761276//                    TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
    12771277                      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_ufpt->condition));
    1278                       LABEL("KANE : out_UPDATE_RAS_ADDRESS [port]->read() : %.8x",out_UPDATE_RAS_ADDRESS [port]->read());
    1279                       LABEL("KANE : it_ufpt->ras_address                  : %.8x",it_ufpt->ras_address);
    1280 
    12811278                      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_ufpt->ras_address);
    12821279                      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_ufpt->ras_index);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r112 r113  
    117117                        << std::dec
    118118                        <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take         << " - "
    119                         << "["  << sc_simulation_time() << "] " << " "
     119                        << "["  << simulation_cycle() << "] " << " "
    120120                        <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction   << " "
    121121                        <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " "
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Commit_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r112 r113  
    175175                  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
    176176#ifdef DEBUG
    177                   entry->cycle_rob_in            = sc_simulation_time();
    178                   entry->cycle_commit            = sc_simulation_time();
     177                  entry->cycle_rob_in            = simulation_cycle();
     178                  entry->cycle_commit            = simulation_cycle();
    179179#endif
    180180
     
    352352
    353353#ifdef DEBUG
    354                   entry->cycle_commit            = sc_simulation_time();
     354                  entry->cycle_commit            = simulation_cycle();
    355355#endif
    356356                  }
     
    426426                // log file
    427427                instruction_log_file [num_thread]
    428                   << "[" << sc_simulation_time() << "] "
     428                  << "[" << simulation_cycle() << "] "
    429429                  << "{" << ((retire_ok)?" OK ":"!KO!") << "} "
    430430                  << std::hex
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Issue_queue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = OOO_Engine
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = OOO_Engine_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Reexecute_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Load_Store_pointer_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Rename_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Dependency_checking_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Free_List_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp

    r109 r113  
    4949  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5050  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     51
     52  sc_signal<Tcontrol_t        > **  in_POP_VAL        ;
     53  sc_signal<Tcontrol_t        > ** out_POP_ACK        ;
     54  sc_signal<Tcontrol_t        > **  in_POP_GPR_VAL    ; // write_rd
     55  sc_signal<Tgeneral_address_t> ** out_POP_GPR_NUM_REG; // num_reg_rd
     56  sc_signal<Tcontrol_t        > **  in_POP_SPR_VAL    ; // write_re
     57  sc_signal<Tspecial_address_t> ** out_POP_SPR_NUM_REG; // num_reg_re
     58  sc_signal<Tcontrol_t        > **  in_PUSH_GPR_VAL    ; // gpr_free (cf stat_list)
     59  sc_signal<Tcontrol_t        > ** out_PUSH_GPR_ACK    ;
     60  sc_signal<Tgeneral_address_t> **  in_PUSH_GPR_NUM_REG;
     61  sc_signal<Tcontrol_t        > **  in_PUSH_SPR_VAL    ; // spr_free (cf stat_list)
     62  sc_signal<Tcontrol_t        > ** out_PUSH_SPR_ACK    ;
     63  sc_signal<Tspecial_address_t> **  in_PUSH_SPR_NUM_REG;
    5164
    5265  ALLOC1_SC_SIGNAL( in_POP_VAL         ," in_POP_VAL         ",Tcontrol_t        ,_param->_nb_pop );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Register_translation_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Register_Address_Translation_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Register_translation_unit_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Stat_List_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp

    r112 r113  
    6060  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    6161  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     62
     63  sc_signal<Tcontrol_t        >   **  in_INSERT_VAL               ;//[nb_inst_insert]
     64  sc_signal<Tcontrol_t        >   ** out_INSERT_ACK               ;//[nb_inst_insert]
     65  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RA           ;//[nb_inst_insert]
     66  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RA_PHY    ;//[nb_inst_insert]
     67  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RB           ;//[nb_inst_insert]
     68  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RB_PHY    ;//[nb_inst_insert]
     69  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RC           ;//[nb_inst_insert]
     70  sc_signal<Tspecial_address_t>   **  in_INSERT_NUM_REG_RC_PHY    ;//[nb_inst_insert]
     71  sc_signal<Tcontrol_t        >   **  in_INSERT_WRITE_RD          ;//[nb_inst_insert]
     72  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RD_PHY_NEW;//[nb_inst_insert]
     73  sc_signal<Tcontrol_t        >   **  in_INSERT_WRITE_RE          ;//[nb_inst_insert]
     74  sc_signal<Tspecial_address_t>   **  in_INSERT_NUM_REG_RE_PHY_NEW;//[nb_inst_insert]
     75  sc_signal<Tcontrol_t        >   **  in_RETIRE_VAL               ;//[nb_inst_retire]
     76  sc_signal<Tcontrol_t        >   ** out_RETIRE_ACK               ;//[nb_inst_retire]
     77  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE           ;//[nb_inst_retire]
     78  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RA           ;//[nb_inst_retire]
     79  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RA_PHY    ;//[nb_inst_retire]
     80  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RB           ;//[nb_inst_retire]
     81  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RB_PHY    ;//[nb_inst_retire]
     82  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RC           ;//[nb_inst_retire]
     83  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RC_PHY    ;//[nb_inst_retire]
     84  sc_signal<Tcontrol_t        >   **  in_RETIRE_WRITE_RD          ;//[nb_inst_retire]
     85  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
     86  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
     87  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire]
     88  sc_signal<Tcontrol_t        >   **  in_RETIRE_WRITE_RE          ;//[nb_inst_retire]
     89  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
     90  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
     91  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
     92  sc_signal<Tcontrol_t        >   ** out_PUSH_GPR_VAL             ;//[nb_reg_free]
     93  sc_signal<Tcontrol_t        >   **  in_PUSH_GPR_ACK             ;//[nb_reg_free]
     94  sc_signal<Tgeneral_address_t>   ** out_PUSH_GPR_NUM_REG         ;//[nb_reg_free]
     95  sc_signal<Tcontrol_t        >   ** out_PUSH_SPR_VAL             ;//[nb_reg_free]
     96  sc_signal<Tcontrol_t        >   **  in_PUSH_SPR_ACK             ;//[nb_reg_free]
     97  sc_signal<Tspecial_address_t>   ** out_PUSH_SPR_NUM_REG         ;//[nb_reg_free]
    6298
    6399  ALLOC1_SC_SIGNAL( in_INSERT_VAL               ," in_INSERT_VAL               ",Tcontrol_t        ,_param->_nb_inst_insert);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Rename_select
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Rename_unit_Glue
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Special_Register_unit
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Custom
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Comparator
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/include/test.h

    r112 r113  
    1111#endif
    1212
    13 #define NB_ITERATION  1
     13#define NB_ITERATION  1024
    1414#define CYCLE_MAX     (1024*NB_ITERATION)
    1515
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp

    r112 r113  
    1919  err (_(" * type      (Tcomparator_scheme_t)\n"));
    2020
    21 
    2221  exit (1);
    2322}
     
    3433  uint32_t x = 1;
    3534
     35  string name = argv[x++];
    3636  uint32_t             _size_data;
    3737  bool                 _is_signed;
     
    4141  SELFTEST0(_is_signed,bool                ,argv,x);
    4242  SELFTEST0(_type     ,Tcomparator_scheme_t,argv,x);
    43 
    44   string name = argv[x++];
    4543
    4644  int _return = EXIT_SUCCESS;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/test.cpp

    r112 r113  
    99#include "Behavioural/Generic/Comparator/SelfTest/include/test.h"
    1010#include "Behavioural/include/Allocation.h"
     11#include "Common/include/BitManipulation.h"
    1112
    1213void test (string name,
     
    5051  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5152  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     53
     54  sc_signal<Tdata_t   > *  in_COMPARE_DATA_0;
     55  sc_signal<Tdata_t   > *  in_COMPARE_DATA_1;
     56  sc_signal<Tcontrol_t> * out_COMPARE_TEST  ;
     57
     58  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_0," in_COMPARE_DATA_0",Tdata_t   );
     59  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_1," in_COMPARE_DATA_1",Tdata_t   );
     60  ALLOC0_SC_SIGNAL(out_COMPARE_TEST  ,"out_COMPARE_TEST  ",Tcontrol_t);
    5261 
    5362  /********************************************************
     
    6069  (*(_Comparator->in_NRESET))       (*(in_NRESET));
    6170
    62 
     71  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_0);
     72  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_1);
     73  INSTANCE0_SC_SIGNAL(_Comparator,out_COMPARE_TEST  );
     74 
    6375  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    6476   
     
    90102      LABEL("Iteration %d",iteration);
    91103
     104      uint64_t data0 = range<uint64_t>(rand(),_param->_size_data);
     105      uint64_t data1 = range<uint64_t>(rand(),_param->_size_data);
     106
     107      in_COMPARE_DATA_0->write(static_cast<Tdata_t>(data0));
     108      in_COMPARE_DATA_1->write(static_cast<Tdata_t>(data1));
     109     
     110      SC_START(0);
     111     
     112      Tcontrol_t test = false;
     113      switch (_param->_size_data)
     114        {
     115        case 8 :
     116          {
     117            if (_param->_is_signed)
     118              switch (_param->_type)
     119                {
     120                case COMPARATOR_EQUAL            : test = static_cast< int8_t>(data0) == static_cast< int8_t>(data1); break;
     121                case COMPARATOR_NOT_EQUAL        : test = static_cast< int8_t>(data0) != static_cast< int8_t>(data1); break;
     122                case COMPARATOR_GREATER          : test = static_cast< int8_t>(data0) >  static_cast< int8_t>(data1); break;
     123                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int8_t>(data0) >= static_cast< int8_t>(data1); break;
     124                case COMPARATOR_LESS             : test = static_cast< int8_t>(data0) <  static_cast< int8_t>(data1); break;
     125                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int8_t>(data0) <= static_cast< int8_t>(data1); break;
     126                }
     127            else
     128              switch (_param->_type)
     129                {
     130                case COMPARATOR_EQUAL            : test = static_cast<uint8_t>(data0) == static_cast<uint8_t>(data1); break;
     131                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint8_t>(data0) != static_cast<uint8_t>(data1); break;
     132                case COMPARATOR_GREATER          : test = static_cast<uint8_t>(data0) >  static_cast<uint8_t>(data1); break;
     133                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint8_t>(data0) >= static_cast<uint8_t>(data1); break;
     134                case COMPARATOR_LESS             : test = static_cast<uint8_t>(data0) <  static_cast<uint8_t>(data1); break;
     135                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint8_t>(data0) <= static_cast<uint8_t>(data1); break;
     136                }
     137            break;
     138          }
     139        case 16 :
     140          {
     141            if (_param->_is_signed)
     142              switch (_param->_type)
     143                {
     144                case COMPARATOR_EQUAL            : test = static_cast< int16_t>(data0) == static_cast< int16_t>(data1); break;
     145                case COMPARATOR_NOT_EQUAL        : test = static_cast< int16_t>(data0) != static_cast< int16_t>(data1); break;
     146                case COMPARATOR_GREATER          : test = static_cast< int16_t>(data0) >  static_cast< int16_t>(data1); break;
     147                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int16_t>(data0) >= static_cast< int16_t>(data1); break;
     148                case COMPARATOR_LESS             : test = static_cast< int16_t>(data0) <  static_cast< int16_t>(data1); break;
     149                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int16_t>(data0) <= static_cast< int16_t>(data1); break;
     150                }
     151            else
     152              switch (_param->_type)
     153                {
     154                case COMPARATOR_EQUAL            : test = static_cast<uint16_t>(data0) == static_cast<uint16_t>(data1); break;
     155                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint16_t>(data0) != static_cast<uint16_t>(data1); break;
     156                case COMPARATOR_GREATER          : test = static_cast<uint16_t>(data0) >  static_cast<uint16_t>(data1); break;
     157                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint16_t>(data0) >= static_cast<uint16_t>(data1); break;
     158                case COMPARATOR_LESS             : test = static_cast<uint16_t>(data0) <  static_cast<uint16_t>(data1); break;
     159                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint16_t>(data0) <= static_cast<uint16_t>(data1); break;
     160                }
     161            break;
     162          }
     163        case 32 :
     164          {
     165            if (_param->_is_signed)
     166              switch (_param->_type)
     167                {
     168                case COMPARATOR_EQUAL            : test = static_cast< int32_t>(data0) == static_cast< int32_t>(data1); break;
     169                case COMPARATOR_NOT_EQUAL        : test = static_cast< int32_t>(data0) != static_cast< int32_t>(data1); break;
     170                case COMPARATOR_GREATER          : test = static_cast< int32_t>(data0) >  static_cast< int32_t>(data1); break;
     171                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int32_t>(data0) >= static_cast< int32_t>(data1); break;
     172                case COMPARATOR_LESS             : test = static_cast< int32_t>(data0) <  static_cast< int32_t>(data1); break;
     173                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int32_t>(data0) <= static_cast< int32_t>(data1); break;
     174                }
     175            else
     176              switch (_param->_type)
     177                {
     178                case COMPARATOR_EQUAL            : test = static_cast<uint32_t>(data0) == static_cast<uint32_t>(data1); break;
     179                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint32_t>(data0) != static_cast<uint32_t>(data1); break;
     180                case COMPARATOR_GREATER          : test = static_cast<uint32_t>(data0) >  static_cast<uint32_t>(data1); break;
     181                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint32_t>(data0) >= static_cast<uint32_t>(data1); break;
     182                case COMPARATOR_LESS             : test = static_cast<uint32_t>(data0) <  static_cast<uint32_t>(data1); break;
     183                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint32_t>(data0) <= static_cast<uint32_t>(data1); break;
     184                }
     185            break;
     186          }
     187        case 64 :
     188          {
     189            if (_param->_is_signed)
     190              switch (_param->_type)
     191                {
     192                case COMPARATOR_EQUAL            : test = static_cast< int64_t>(data0) == static_cast< int64_t>(data1); break;
     193                case COMPARATOR_NOT_EQUAL        : test = static_cast< int64_t>(data0) != static_cast< int64_t>(data1); break;
     194                case COMPARATOR_GREATER          : test = static_cast< int64_t>(data0) >  static_cast< int64_t>(data1); break;
     195                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int64_t>(data0) >= static_cast< int64_t>(data1); break;
     196                case COMPARATOR_LESS             : test = static_cast< int64_t>(data0) <  static_cast< int64_t>(data1); break;
     197                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int64_t>(data0) <= static_cast< int64_t>(data1); break;
     198                }
     199            else
     200              switch (_param->_type)
     201                {
     202                case COMPARATOR_EQUAL            : test = static_cast<uint64_t>(data0) == static_cast<uint64_t>(data1); break;
     203                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint64_t>(data0) != static_cast<uint64_t>(data1); break;
     204                case COMPARATOR_GREATER          : test = static_cast<uint64_t>(data0) >  static_cast<uint64_t>(data1); break;
     205                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint64_t>(data0) >= static_cast<uint64_t>(data1); break;
     206                case COMPARATOR_LESS             : test = static_cast<uint64_t>(data0) <  static_cast<uint64_t>(data1); break;
     207                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint64_t>(data0) <= static_cast<uint64_t>(data1); break;
     208                }
     209            break;
     210          }
     211        default :
     212          {
     213            TEST_KO("Invalid size for the test.");
     214          }
     215        }
     216
     217      TEST(Tcontrol_t,out_COMPARE_TEST->read(),test);
     218
    92219      SC_START(1);
    93220    }
     
    104231  delete in_CLOCK;
    105232  delete in_NRESET;
     233  DELETE0_SC_SIGNAL( in_COMPARE_DATA_0);
     234  DELETE0_SC_SIGNAL( in_COMPARE_DATA_1);
     235  DELETE0_SC_SIGNAL(out_COMPARE_TEST  );
    106236    }
    107237#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h

    r112 r113  
    6464  public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_0;
    6565  public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_1;
    66   public    : SC_OUT(Tcontrol_t)            *  in_COMPARE_TEST  ;
    67    
     66  public    : SC_OUT(Tcontrol_t)            * out_COMPARE_TEST  ;
    6867
    6968    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    105104#ifdef SYSTEMC                                 
    106105  public  : void        transition                (void);
    107 //public  : void        genMoore                  (void);
     106  public  : void        genMealy                  (void);
    108107#endif                                         
    109108
     
    112111  private : void        vhdl_declaration          (Vhdl * & vhdl);
    113112  private : void        vhdl_body                 (Vhdl * & vhdl);
     113
     114  private : void        vhdl_xilinx_declaration   (Vhdl * & vhdl);
     115  private : void        vhdl_xilinx_body          (Vhdl * & vhdl);
    114116#endif                                         
    115117
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Parameters.h

    r112 r113  
    2626  public : Tcomparator_scheme_t _type;
    2727
     28  public : int64_t              _extends;
     29  public : int64_t              _mask_sign;
     30
    2831    //-----[ methods ]-----------------------------------------------------------
    2932  public : Parameters  (uint32_t             size_data,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator.cpp

    r112 r113  
    7777# endif   
    7878
    79 //      log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
     79        log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMealy"),_name.c_str());
    8080
    81 //      SC_METHOD (genMoore);
    82 //      dont_initialize ();
    83 //      sensitive << (*(in_CLOCK)).neg(); // need internal register
     81        SC_METHOD (genMealy);
     82        dont_initialize ();
     83//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
     84        sensitive << (*(in_COMPARE_DATA_0))
     85                  << (*(in_COMPARE_DATA_1));
    8486       
    85 // # ifdef SYSTEMCASS_SPECIFIC
    86 //      // List dependency information
    87 // # endif   
     87# ifdef SYSTEMCASS_SPECIFIC
     88        // List dependency information
     89# endif   
    8890       
    8991#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp

    r112 r113  
    5353      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5454    }
     55
     56    // ~~~~~[ Interface : "compare" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     57    {
     58      ALLOC0_INTERFACE_BEGIN("compare",IN,SOUTH,_("Compare interface"));
     59
     60      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_0,"DATA_0",Tdata_t   ,_param->_size_data);
     61      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_1,"DATA_1",Tdata_t   ,_param->_size_data);
     62      ALLOC0_SIGNAL_OUT(out_COMPARE_TEST  ,"TEST"  ,Tcontrol_t,1);
     63
     64      ALLOC0_INTERFACE_END();
     65    }
     66
    5567    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    5668
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_deallocation.cpp

    r112 r113  
    2525        delete    in_CLOCK ;
    2626        delete    in_NRESET;
     27
     28        DELETE0_SIGNAL( in_COMPARE_DATA_0,_param->_size_data);
     29        DELETE0_SIGNAL( in_COMPARE_DATA_1,_param->_size_data);
     30        DELETE0_SIGNAL(out_COMPARE_TEST  ,1);
    2731      }
    2832    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl.cpp

    r112 r113  
    2727    _component->vhdl_instance(vhdl);
    2828
     29    // default architecture
    2930    vhdl_declaration (vhdl);
    3031    vhdl_body        (vhdl);
     32
     33    // Xilinx architecture
     34    vhdl->set_architecture("xilinx");
     35    vhdl_xilinx_declaration (vhdl);
     36    vhdl_xilinx_body        (vhdl);
    3137
    3238    vhdl->generate_file();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters.cpp

    r112 r113  
    77
    88#include "Behavioural/Generic/Comparator/include/Parameters.h"
     9#include "Common/include/BitManipulation.h"
    910
    1011namespace morpheo {
     
    1213namespace generic {
    1314namespace comparator {
    14 
    1515
    1616#undef  FUNCTION
     
    2828
    2929    test();
     30
     31    _extends   = gen_mask_not<int64_t>(_size_data);
     32    _mask_sign = (1<<(_size_data-1));
    3033
    3134    if (is_toplevel)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters_msg_error.cpp

    r112 r113  
    2424    Parameters_test test ("Comparator");
    2525
     26    if (_size_data > 64)
     27      test.error(_("Max size is 64 bits.\n"));
     28
    2629    log_end(Comparator,FUNCTION);
    2730
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Counter
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/top.h

    r112 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "Counter"
    77 */
    88
     
    1111#endif
    1212
    13 #include <string>
    14 #include <iostream>
     13#define NB_ITERATION  1024
     14#define CYCLE_MAX     (1024*NB_ITERATION)
    1515
     16#include "Common/include/Test.h"
    1617#include "Common/include/Time.h"
    1718#include "Behavioural/Generic/Counter/include/Counter.h"
     
    2122using namespace morpheo::behavioural;
    2223using namespace morpheo::behavioural::generic;
    23 
    2424using namespace morpheo::behavioural::generic::counter;
    2525
    26 void test   (string name,
    27              morpheo::behavioural::generic::counter::Parameters param);
     26SC_MODULE(top)
     27{
     28#ifdef SYSTEMC
     29 private: sc_clock               *  in_CLOCK ;
     30 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     31 private: sc_signal<Tdata_t>    **  in_COUNTER_DATA  ;// [param->_nb_port]
     32 private: sc_signal<Tcontrol_t> **  in_COUNTER_ADDSUB;// [param->_nb_port]
     33 private: sc_signal<Tdata_t>    ** out_COUNTER_DATA  ;// [param->_nb_port]
     34#endif
     35
     36 private: std::string                                          name ;
     37 private: morpheo::behavioural::generic::counter::Parameters * param;
     38#ifdef STATISTICS
     39 private: morpheo::behavioural::Parameters_Statistics        * param_stat;
     40#endif
     41 private: Counter                                            * component;
     42
     43 private: void usage        (string exec);
     44 private: void allocation   (void);
     45 private: void deallocation (void);
     46 public : void test         (void);
     47
     48#ifdef MTI_SYSTEMC
     49  SC_CTOR(top::top);
     50#else
     51 public : top (sc_module_name module_name,int argc, char * argv[]);
     52#endif
     53 public : ~top(void);
     54};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp

    r81 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Generic/Counter/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 2
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void usage (string exec)
    13 {
    14   cerr << "<Usage> " << exec << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16        << " - size_data     (unsigned int)" << endl
    17        << " - nb_port       (unsigned int)" << endl;
     19  try
     20    {
     21      top * my_top = new top ("my_top",argc,argv);
    1822
    19   exit (1);
     23      my_top->test();
     24
     25      delete my_top;
     26    }
     27  catch (morpheo::ErrorMorpheo & error)
     28    {
     29      msg (_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
     31    }
     32 
     33  try
     34    {
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Counter : no error");
     37      else
     38        TEST_KO("Counter : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
     44    }
     45
     46  return _return;
    2047}
    21 
    22 #ifndef SYSTEMC
    23 int main    (int argc, char * argv[])
    24 #else
    25 int sc_main (int argc, char * argv[])
    2648#endif
    27 {
    28   if (argc != 2+NB_PARAMS)
    29     usage (argv[0]);
    30 
    31   cout << "<test0> : Classic usage" << endl;
    32   cout << "<test0> : Typical parameters" << endl;
    33   const string   name      = argv[1];
    34   const uint32_t size_data = atoi(argv[2]);
    35   const uint32_t nb_port   = atoi(argv[3]);
    36 
    37   morpheo::behavioural::generic::counter::Parameters param (size_data,
    38                                                             nb_port  );
    39 
    40   test (name,param);
    41 
    42   return (EXIT_SUCCESS);
    43 }
    44 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_test.cpp

    r112 r113  
    77 */
    88
    9 #define NB_ITERATION 1024
    10 #define CYCLE_MAX    1024*NB_ITERATION
     9#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
    1110
    12 #include "Behavioural/Generic/Counter/SelfTest/include/test.h"
    13 #include "Common/include/Test.h"
    14 
    15 void test (string name,
    16            morpheo::behavioural::generic::counter::Parameters param)
     11void top::test (void)
    1712{
    18   cout << "<" << name << "> : Simulation SystemC" << endl;
    19 
    20   try
    21     {
    22       cout << param.print(1);
    23       param.test();
    24     }
    25   catch (morpheo::ErrorMorpheo & error)
    26     {
    27       cout << "<" << name << "> : " <<  error.what ();
    28       return;
    29     }
    30   catch (...)
    31     {
    32       cerr << "<" << name << "> : This test must generate a error" << endl;
    33       exit (EXIT_FAILURE);
    34     }
    35 #ifdef STATISTICS
    36   morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
    37 #endif
    38 
    39   Tusage_t _usage = USE_ALL;
    40 
    41 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    42 //   _usage = usage_unset(_usage,USE_VHDL                 );
    43 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    44 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    45 //   _usage = usage_unset(_usage,USE_POSITION             );
    46 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    47 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    48 
    49   Counter * _Counter = new Counter (name.c_str(),
    50 #ifdef STATISTICS
    51                                     param_stat,
    52 #endif
    53                                     param,
    54                                     _usage);
    55  
    5613#ifdef SYSTEMC
    57   /*********************************************************************
    58    * Déclarations des signaux
    59    *********************************************************************/
    60   sc_clock                                 CLOCK ("clock", 1.0, 0.5);
    61   sc_signal<Tcontrol_t>                    RESET;
    62   sc_signal<Tdata_t>                       DATA_IN  [param._nb_port];
    63   sc_signal<Tcontrol_t>                    ADDSUB   [param._nb_port];
    64   sc_signal<Tdata_t>                       DATA_OUT [param._nb_port];
    65 
    66   /********************************************************
    67    * Instanciation
    68    ********************************************************/
    69  
    70   cout << "<" << name << "> Instanciation of _Counter" << endl;
    71  
    72   (*(_Counter->in_CLOCK))        (CLOCK);
    73   (*(_Counter->in_NRESET))       (RESET);
    74 
    75   for (uint32_t i=0; i<param._nb_port; i++)
    76     {
    77       (*(_Counter-> in_COUNTER_DATA  [i]))        (DATA_IN  [i]);
    78       (*(_Counter-> in_COUNTER_ADDSUB[i]))        (ADDSUB   [i]);
    79       (*(_Counter->out_COUNTER_DATA  [i]))        (DATA_OUT [i]);
    80     }
    81 
    8214  Time * _time = new Time();
    8315
     
    9224  //srand(TIME(NULL));
    9325
    94   Tdata_t    data_in  [param._nb_port];
    95   Tdata_t    data_out [param._nb_port];
    96   Tcontrol_t addsub   [param._nb_port];
     26  Tdata_t    data_in  [param->_nb_port];
     27  Tdata_t    data_out [param->_nb_port];
     28  Tcontrol_t addsub   [param->_nb_port];
    9729
    98   sc_start(0);
     30  SC_CYCLE(0);
    9931
    100   RESET.write(1);
     32  in_NRESET->write(1);
    10133
    102   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
     34  LABEL("Initialisation");
    10335
    104   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
     36  LABEL("Loop of Test");
    10537
    10638  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    10739    {
    108       cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Itération " << iteration << endl;
    109       for (uint32_t i=0; i<param._nb_port; i++)
     40      LABEL("Iteration %d",iteration);
     41
     42      for (uint32_t i=0; i<param->_nb_port; i++)
    11043        {
    111           Tdata_t data = rand()%param._data_max;
     44          Tdata_t data = rand()%param->_data_max;
    11245          data_in  [i] = data;
    11346          addsub   [i] = (rand()%2)==1;
    11447         
    115           DATA_IN  [i].write(data      );
    116           ADDSUB   [i].write(addsub [i]);
     48          LABEL("in_COUNTER_DATA   [%d] = %d",i,data      );
     49          LABEL("in_COUNTER_ADDSUB [%d] = %d"  ,i,addsub [i]);
    11750
    118           data_out [i] = (addsub[i]==1)?((data<param._data_max)?data+1:data):((data>0)?data-1:data);
     51          in_COUNTER_DATA   [i]->write(data      );
     52          in_COUNTER_ADDSUB [i]->write(addsub [i]);
     53
     54          data_out [i] = (addsub[i]==1)?((data<param->_data_max)?data+1:data):((data>0)?data-1:data);
    11955        }
    12056
    121       sc_start(0);
    122      
    123       for (uint32_t i=0; i<param._nb_port; i++)
     57      SC_CYCLE(0);
     58
     59      for (uint32_t i=0; i<param->_nb_port; i++)
    12460        {
    125           cout << hex
    126                << "    [" << i << "] "
    127                << data_in [i];
     61          string op = (addsub[i] == 1)?"++":"--";
     62          LABEL("0x%d %s = 0x%d",i,op.c_str(),out_COUNTER_DATA [i]->read());
    12863
    129           if (addsub[i] == 1)
    130             cout << " ++";
    131           else
    132             cout << " --";
    133 
    134           cout << " = "
    135                << DATA_OUT [i].read();
    136 
    137           TEST(Tdata_t,DATA_OUT [i].read(),data_out [i]);
    138            
    139           cout << std::dec << endl;
     64          TEST(Tdata_t,out_COUNTER_DATA [i]->read(),data_out [i]);
    14065        }
    14166     
    142       sc_start(1);
     67      SC_CYCLE(1);
    14368    }
    14469
    145   sc_start(1);
     70  SC_CYCLE(1);
    14671
    14772  /********************************************************
     
    14974   ********************************************************/
    15075
     76  sc_stop();
     77
    15178  delete _time;
    15279
    15380  cout << "<" << name << "> ............ Stop Simulation" << endl;
    154 
    15581#endif
    156 
    157   delete _Counter;
    158 #ifdef STATISTICS
    159   delete param_stat;
    160 #endif
    161 
    16282}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r88 r113  
    4040    // -----[ fields ]----------------------------------------------------
    4141    // Parameters
    42   protected : const std::string _name;
    43   protected : const Parameters  _param;
    44   private   : const Tusage_t    _usage;
     42  protected : const std::string   _name;
     43  protected : const Parameters  * _param;
     44  private   : const Tusage_t      _usage;
    4545
    4646#ifdef STATISTICS
     
    7979                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8080#endif
    81                                            Parameters param,
    82                                            Tusage_t   usage);
     81                                           Parameters * param,
     82                                           Tusage_t     usage);
    8383                                               
    84   public  :          Counter              (Parameters param );
     84// public  :          Counter              (Parameters param );
    8585  public  :          ~Counter             (void);
    8686                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r88 r113  
    1313namespace counter {
    1414
    15 
     15#undef FUNCTION
     16#define FUNCTION "Counter::Counter"
    1617  Counter::Counter
    1718  (
     
    2425  morpheo::behavioural::Parameters_Statistics * param_statistics,
    2526#endif
    26   morpheo::behavioural::generic::counter::Parameters param,
     27  morpheo::behavioural::generic::counter::Parameters * param,
    2728   Tusage_t usage):
    2829    _name  (name),
     
    3031    _usage (usage)
    3132  {
    32     log_printf(FUNC,Counter,"Counter","Begin");
     33    log_begin(Counter,FUNCTION);
    3334
    34 #if DEBUG_Counter == true
    35     log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
     35// #if DEBUG_Counter == true
     36//     log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3637
    37     std::cout << param << std::endl;
    38 #endif   
     38//     std::cout << *param << std::endl;
     39// #endif   
    3940
    4041    log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str());
     
    7677        SC_METHOD (genMealy);
    7778        dont_initialize ();
    78         for (uint32_t i=0; i<_param._nb_port; i++)
     79        for (uint32_t i=0; i<_param->_nb_port; i++)
    7980          sensitive << *(in_COUNTER_DATA   [i])
    8081                    << *(in_COUNTER_ADDSUB [i]);
     
    8283#ifdef SYSTEMCASS_SPECIFIC
    8384        // List dependency information
    84         for (uint32_t i=0; i<_param._nb_port; i++)
     85        for (uint32_t i=0; i<_param->_nb_port; i++)
    8586          {
    8687            (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA   [i]));
     
    9192
    9293#endif
    93     log_printf(FUNC,Counter,"Counter","End");
     94    log_end(Counter,FUNCTION);
    9495  };
    9596 
     97#undef FUNCTION
     98#define FUNCTION "Counter::~Counter"
    9699  Counter::~Counter (void)
    97100  {
    98     log_printf(FUNC,Counter,"~Counter","Begin");
     101    log_begin(Counter,FUNCTION);
    99102
    100103#ifdef STATISTICS
     
    108111    deallocation ();
    109112
    110     log_printf(FUNC,Counter,"~Counter","End");
     113    log_end(Counter,FUNCTION);
    111114  };
    112115
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r112 r113  
    2121
    2222    Entity * entity = _component->set_entity (_name     
    23                                              ,"Counter" 
     23                                             ,_param->_type
    2424#ifdef POSITION
    2525                                             ,COMBINATORY
     
    4545    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4646    {
    47       ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param._nb_port);
     47      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param->_nb_port);
    4848           
    49       ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
     49      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
    5050      ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1                );
    51       ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
     51      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
    5252
    53       ALLOC1_INTERFACE_END(_param._nb_port);
     53      ALLOC1_INTERFACE_END(_param->_nb_port);
    5454    }
    5555   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp

    r112 r113  
    2424        delete     in_NRESET;
    2525       
    26         DELETE1_SIGNAL( in_COUNTER_DATA  , _param._nb_port,_param._size_data);
    27         DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param._nb_port,1                );
    28         DELETE1_SIGNAL(out_COUNTER_DATA  , _param._nb_port,_param._size_data);
     26        DELETE1_SIGNAL( in_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
     27        DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param->_nb_port,1                );
     28        DELETE1_SIGNAL(out_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
    2929      }
    3030
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp

    r81 r113  
    1818    log_printf(FUNC,Counter,"genMealy","Begin");
    1919
    20     for (uint32_t i=0; i<_param._nb_port; i++)
     20    for (uint32_t i=0; i<_param->_nb_port; i++)
    2121      {
    2222        Tcontrol_t addsub  = PORT_READ(in_COUNTER_ADDSUB [i]);
     
    2828        if (addsub == 1)
    2929          {
    30             if (data_out < _param._data_max)
     30            if (data_out < _param->_data_max)
    3131              data_out++;
    3232          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp

    r81 r113  
    2121
    2222    _stat = new Stat (static_cast<std::string>(_name),
    23                       "Counter",
     23                      _param->_type,
    2424                      param_statistics);
    2525   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp

    r81 r113  
    1919    vhdl->set_body ("");
    2020   
    21     for (uint32_t i=0; i<_param._nb_port; i++)
     21    for (uint32_t i=0; i<_param->_nb_port; i++)
    2222      {
    2323        std::string counter_inc, counter_dec;
    2424
    25         if (_param._size_data > 1)
     25        if (_param->_size_data > 1)
    2626          {
    2727            counter_inc = "in_COUNTER_"+toString(i)+"_DATA+1";
     
    3535
    3636        vhdl->set_body ("out_COUNTER_"+toString(i)+"_DATA <=");
    37         if (_param._size_data > 1)
     37        if (_param->_size_data > 1)
    3838          {
    3939            vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA+1 when in_COUNTER_"+toString(i)+"_ADDSUB = '1' and in_COUNTER_"+toString(i)+"_DATA < cst_max else");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp

    r81 r113  
    1919    log_printf(FUNC,Counter,"vhdl_declaration","Begin");
    2020   
    21     if (_param._size_data > 1)
     21    if (_param->_size_data > 1)
    2222      {
    23         vhdl->set_constant ("cst_min",_param._size_data,std_logic_others(_param._size_data,0));
    24         vhdl->set_constant ("cst_max",_param._size_data,std_logic_others(_param._size_data,1));
     23        vhdl->set_constant ("cst_min",_param->_size_data,std_logic_others(_param->_size_data,0));
     24        vhdl->set_constant ("cst_max",_param->_size_data,std_logic_others(_param->_size_data,1));
    2525      }
    2626
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp

    r88 r113  
    1616  Parameters::Parameters (uint32_t size_data,
    1717                          uint32_t nb_port  ):
     18    behavioural::Parameters("Counter"),
    1819    _size_data(size_data),
    1920    _nb_port  (nb_port  ),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Divider/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Divider
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Multiplier
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Priority/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Priority
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Queue
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp

    r101 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 5
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void usage (int argc, char * argv[])
    13 {
    14   cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16        << " - size_queue      (uint32_t)" << endl
    17        << " - size_data       (uint32_t)" << endl
    18        << " - nb_port_slot    (uint32_t)" << endl
    19        << " - have_port_write (bool    )" << endl
    20        << " - have_port_read  (bool    )" << endl
    21        << "" << endl;
    22 
    23   for (int i=0; i<argc; i++)
    24     cerr << argv[i] << " ";
    25   cerr << endl;
    26 
    27   exit (1);
    28 }
    29 
    30 #ifndef SYSTEMC
    31 int main    (int argc, char * argv[])
    32 #else
    33 int sc_main (int argc, char * argv[])
    34 #endif
    35 {
    36   if (argc != 2+NB_PARAMS)
    37     usage (argc, argv);
    38 
    39   uint32_t       x = 1;
    40  
    41   const string   name            =      argv[x++];
    42   const uint32_t size_queue      = fromString<uint32_t>(argv[x++]);
    43   const uint32_t size_data       = fromString<uint32_t>(argv[x++]);
    44   const uint32_t nb_port_slot    = fromString<uint32_t>(argv[x++]);
    45   const bool     have_port_write = fromString<bool>(argv[x++]);
    46   const bool     have_port_read  = fromString<bool>(argv[x++]);
    4719  try
    4820    {
    49       morpheo::behavioural::generic::queue::Parameters * param = new morpheo::behavioural::generic::queue::Parameters
    50         (size_queue,
    51          size_data ,
    52          nb_port_slot,
    53          have_port_write,
    54          have_port_read
    55         );
    56      
    57       cout << param->print(1);
    58      
    59       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    6026    }
    6127  catch (morpheo::ErrorMorpheo & error)
    6228    {
    63       cout << "<" << name << "> : " <<  error.what ();
    64       exit (EXIT_FAILURE);
     29      msgError(_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
    6531    }
    66   catch (...)
     32 
     33  try
    6734    {
    68       cerr << "<" << name << "> : This test must generate a error" << endl;
    69       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Queue : no error");
     37      else
     38        TEST_KO("Queue : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    7044    }
    7145
    72   return (EXIT_SUCCESS);
     46  return _return;
    7347}
    74 
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_test.cpp

    r111 r113  
    77 */
    88
    9 #define NB_ITERATION  1
    10 #define CYCLE_MAX     (2048*NB_ITERATION)
     9#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
     10#include "Behavioural/include/Allocation.h"
    1111
    12 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
    13 #include "Behavioural/include/Allocation.h"
    14 #include "Common/include/Test.h"
    15 
    16 void test (string name,
    17            morpheo::behavioural::generic::queue::Parameters * _param)
     12void top::test (void)
    1813{
    19   cout << "<" << name << "> : Simulation SystemC" << endl;
    20 
    21 #ifdef STATISTICS
    22   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    23 #endif
    24 
    25   Tusage_t _usage = USE_ALL;
    26 
    27 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    28 //   _usage = usage_unset(_usage,USE_VHDL                 );
    29 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    30 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    31 //   _usage = usage_unset(_usage,USE_POSITION             );
    32 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    33 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    34 
    35   Queue * _Queue = new Queue
    36     (name.c_str(),
    37 #ifdef STATISTICS
    38      _parameters_statistics,
    39 #endif
    40      _param,
    41      _usage);
    42  
    4314#ifdef SYSTEMC
    44   /*********************************************************************
    45    * Déclarations des signaux
    46    *********************************************************************/
    47   string rename;
    48 
    49   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    50   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    51 
    52   ALLOC0_SC_SIGNAL( in_INSERT_VAL , "in_INSERT_VAL" ,Tcontrol_t);
    53   ALLOC0_SC_SIGNAL(out_INSERT_ACK ,"out_INSERT_ACK" ,Tcontrol_t);
    54   ALLOC0_SC_SIGNAL( in_INSERT_DATA, "in_INSERT_DATA",Tdata_t   );
    55   ALLOC0_SC_SIGNAL(out_RETIRE_VAL ,"out_RETIRE_VAL" ,Tcontrol_t);
    56   ALLOC0_SC_SIGNAL( in_RETIRE_ACK , "in_RETIRE_ACK" ,Tcontrol_t);
    57   ALLOC0_SC_SIGNAL(out_RETIRE_DATA,"out_RETIRE_DATA",Tdata_t   );
    58   ALLOC1_SC_SIGNAL(out_SLOT_VAL   ,"out_SLOT_VAL"   ,Tcontrol_t,_param->_nb_port_slot);
    59   ALLOC1_SC_SIGNAL(out_SLOT_DATA  ,"out_SLOT_DATA"  ,Tdata_t   ,_param->_nb_port_slot);
    60   ALLOC0_SC_SIGNAL(out_PTR_WRITE  ,"out_PTR_WRITE"  ,Tptr_t    );
    61   ALLOC0_SC_SIGNAL(out_PTR_READ   ,"out_PTR_READ"   ,Tptr_t    );
    62  
    63   /********************************************************
    64    * Instanciation
    65    ********************************************************/
    66  
    67   cout << "<" << name << "> Instanciation of _Queue" << endl;
    68  
    69   (*(_Queue->in_CLOCK))        (*(in_CLOCK));
    70   (*(_Queue->in_NRESET))       (*(in_NRESET));
    71 
    72   INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_VAL );
    73   INSTANCE0_SC_SIGNAL(_Queue,out_INSERT_ACK );
    74   INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_DATA);
    75   INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_VAL );
    76   INSTANCE0_SC_SIGNAL(_Queue, in_RETIRE_ACK );
    77   INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_DATA);
    78   INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_VAL   ,_param->_nb_port_slot);
    79   INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_DATA  ,_param->_nb_port_slot);
    80   if (_param->_have_port_ptr_write)
    81   INSTANCE0_SC_SIGNAL(_Queue,out_PTR_WRITE  );
    82   if (_param->_have_port_ptr_read )
    83   INSTANCE0_SC_SIGNAL(_Queue,out_PTR_READ   );
    84 
    85   cout << "<" << name << "> Start Simulation ............" << endl;
    86   Time * _time = new Time();
    87 
    88   /********************************************************
    89    * Simulation - Begin
    90    ********************************************************/
    91 
    92   // Initialisation
    93   const  int32_t percent_insert_transaction = 75;
    94   const  int32_t percent_retire_transaction = 75;
    95   const uint32_t nb_request = 3*_param->_size_queue;
    96 
    97   const uint32_t seed = 0;
    98 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    99 
    100   srand(seed);
    101 
    102   SC_START(0);
    103   LABEL("Initialisation");
    104 
    105   in_INSERT_VAL -> write(0);
    106   in_RETIRE_ACK -> write(0);
    107 
    108   LABEL("Reset");
    109   in_NRESET->write(0);
    110   SC_START(5);
    111   in_NRESET->write(1); 
    112 
    113   LABEL("Loop of Test");
    114 
    115   uint32_t data_in  = 0;
    116   uint32_t data_out = 0;
    117   uint32_t nb_elt   = 0;
    118 
    119   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     15  if (usage_is_set(_usage,USE_SYSTEMC))
    12016    {
    121       LABEL("Iteration %d",iteration);
    122 
    123       while (data_out <= nb_request)
    124         {
    125           in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
    126           in_INSERT_DATA -> write(data_in);
    127           in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
    128 
    129           SC_START(0); // genMoore
    130 
    131           for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
     17      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
     18     
     19      Time * _time = new Time();
     20     
     21      /********************************************************
     22       * Simulation - Begin
     23       ********************************************************/
     24     
     25      // Initialisation
     26      const  int32_t percent_insert_transaction = 75;
     27      const  int32_t percent_retire_transaction = 75;
     28      const uint32_t nb_request = 3*_param->_size_queue;
     29     
     30      const uint32_t seed = 0;
     31      //const uint32_t seed = static_cast<uint32_t>(time(NULL));
     32     
     33      srand(seed);
     34     
     35      SC_CYCLE(0);
     36      LABEL("Initialisation");
     37     
     38      in_INSERT_VAL -> write(0);
     39      in_RETIRE_ACK -> write(0);
     40     
     41      LABEL("Reset");
     42      in_NRESET->write(0);
     43      SC_CYCLE(5);
     44      in_NRESET->write(1); 
     45     
     46      LABEL("Loop of Test");
     47     
     48      uint32_t data_in  = 0;
     49      uint32_t data_out = 0;
     50      uint32_t nb_elt   = 0;
     51     
     52      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     53        {
     54          LABEL("Iteration %d",iteration);
     55         
     56          while (data_out <= nb_request)
    13257            {
    133               TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
    134               if (i<nb_elt)
    135               TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
    136                
     58              in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
     59              in_INSERT_DATA -> write(data_in);
     60              in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
     61             
     62              SC_CYCLE(0); // genMoore
     63             
     64              for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
     65                {
     66                  TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
     67                  if (i<nb_elt)
     68                    TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
     69                 
     70                }
     71             
     72              if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
     73                {
     74                  LABEL ("Transaction with interface : INSERT");
     75                  data_in ++;
     76                  nb_elt ++;
     77                }
     78              if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
     79                {
     80                  LABEL ("Transaction with interface : RETIRE");
     81                  TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
     82                  data_out++;
     83                  nb_elt --;
     84                }
     85             
     86              SC_CYCLE(1);
    13787            }
    138 
    139           if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
    140             {
    141               LABEL ("Transaction with interface : INSERT");
    142               data_in ++;
    143               nb_elt ++;
    144             }
    145           if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
    146             {
    147               LABEL ("Transaction with interface : RETIRE");
    148               TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
    149               data_out++;
    150               nb_elt --;
    151             }
    152 
    153           SC_START(1);
    154         }
     88        }
     89     
     90      /********************************************************
     91       * Simulation - End
     92       ********************************************************/
     93     
     94      TEST_OK ("");
     95     
     96      sc_stop();
     97      delete _time;
     98     
     99      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    155100    }
    156 
    157   /********************************************************
    158    * Simulation - End
    159    ********************************************************/
    160 
    161   TEST_OK ("End of Simulation");
    162   delete _time;
    163   cout << "<" << name << "> ............ Stop Simulation" << endl;
    164 
    165   delete in_CLOCK;
    166   delete in_NRESET;
    167 
    168   DELETE0_SC_SIGNAL( in_INSERT_VAL );
    169   DELETE0_SC_SIGNAL(out_INSERT_ACK );
    170   DELETE0_SC_SIGNAL( in_INSERT_DATA);
    171   DELETE0_SC_SIGNAL(out_RETIRE_VAL );
    172   DELETE0_SC_SIGNAL( in_RETIRE_ACK );
    173   DELETE0_SC_SIGNAL(out_RETIRE_DATA);
    174   DELETE1_SC_SIGNAL(out_SLOT_VAL   ,_param->_nb_port_slot);
    175   DELETE1_SC_SIGNAL(out_SLOT_DATA  ,_param->_nb_port_slot);
    176   DELETE0_SC_SIGNAL(out_PTR_WRITE  );
    177   DELETE0_SC_SIGNAL(out_PTR_READ   );
    178 #endif
    179 
    180   delete _Queue;
    181 #ifdef STATISTICS
    182   delete _parameters_statistics;
    183101#endif
    184102}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp

    r101 r113  
    2121                          bool     have_port_ptr_write,
    2222                          bool     have_port_ptr_read ):
     23    behavioural::Parameters("Queue"),
    2324    _size_queue          (size_queue),
    2425    _size_data           (size_data ),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp

    r88 r113  
    3333    ,_usage            (usage)
    3434  {
    35     log_printf(FUNC,Queue,FUNCTION,"Begin");
     35    log_begin(Queue,FUNCTION);
     36   
     37// #if DEBUG_Core == true
     38//     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3639
    37 #if DEBUG_Core == true
    38     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40//     std::cout << *param << std::endl;
     41// #endif   
    3942
    40     std::cout << *param << std::endl;
    41 #endif   
    42 
    43     log_printf(INFO,Queue,FUNCTION,"Allocation");
     43    log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4444    allocation ();
    4545
     
    4747    if (usage_is_set(_usage,USE_STATISTICS))
    4848      {
    49         log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
     49        log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
    5050       
    5151        statistics_declaration(param_statistics);
     
    5757      {
    5858        // generate the vhdl
    59         log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
     59        log_printf(INFO,Queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6060       
    6161        vhdl();
     
    6666    if (usage_is_set(_usage,USE_SYSTEMC))
    6767      {
    68         log_printf(INFO,Queue,FUNCTION,"Method - transition");
     68        log_printf(INFO,Queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    6969       
    7070        SC_METHOD (transition);
     
    7676# endif   
    7777       
    78         log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
     78        log_printf(INFO,Queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
    7979       
    8080        SC_METHOD (genMoore);
     
    8888#endif
    8989      }
    90     log_printf(FUNC,Queue,FUNCTION,"End");
     90    log_end(Queue,FUNCTION);
    9191  };
    9292 
     
    9595  Queue::~Queue (void)
    9696  {
    97     log_printf(FUNC,Queue,FUNCTION,"Begin");
     97    log_begin(Queue,FUNCTION);
    9898
    9999#ifdef STATISTICS
    100100    if (usage_is_set(_usage,USE_STATISTICS))
    101101      {
    102         log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
     102        log_printf(INFO,Queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
    103103       
    104104        delete _stat;
     
    106106#endif
    107107
    108     log_printf(INFO,Queue,FUNCTION,"Deallocation");
     108    log_printf(INFO,Queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    109109    deallocation ();
    110110
    111     log_printf(FUNC,Queue,FUNCTION,"End");
     111    log_end(Queue,FUNCTION);
    112112  };
    113113
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp

    r112 r113  
    99#include "Behavioural/include/Allocation.h"
    1010
    11 namespace morpheo                    {
     11namespace morpheo {
    1212namespace behavioural {
    1313namespace generic {
    1414namespace queue {
    15 
    16 
    1715
    1816#undef  FUNCTION
     
    2523
    2624    Entity * entity = _component->set_entity (_name       
    27                                               ,"Queue"
     25                                              ,_param->_type
    2826#ifdef POSITION
    2927                                              ,COMBINATORY
     
    111109}; // end namespace queue
    112110}; // end namespace generic
    113 
    114111}; // end namespace behavioural
    115112}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp

    r101 r113  
    2121    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2222
    23     if (usage_is_set(_usage,USE_SYSTEMC))
     23//     if (usage_is_set(_usage,USE_SYSTEMC))
    2424      {
    25         delete    in_CLOCK ;
    26         delete    in_NRESET;
     25        DELETE0_SIGNAL( in_CLOCK ,1);
     26        DELETE0_SIGNAL( in_NRESET,1);
    2727
    2828        DELETE0_SIGNAL( in_INSERT_VAL                        ,1);
     
    4141        if (_param->_have_port_ptr_read )
    4242        DELETE0_SIGNAL(out_PTR_READ    ,_param->_size_ptr);
     43      }
    4344       
    44         // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     45      if (usage_is_set(_usage,USE_SYSTEMC))
     46      {
     47        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    4548        delete _queue_control;
    4649        delete _queue_data;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp

    r81 r113  
    2121
    2222    _stat = new Stat (static_cast<std::string>(_name),
    23                       "Queue",
     23                      _param->_type,
    2424                      param_statistics);
    2525   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile

    r81 r113  
    88
    99#-----[ Directory ]----------------------------------------
    10 DIR_MORPHEO                     = ../../..
     10DIR_COMPONENT                   = ./
     11include                         $(DIR_COMPONENT)/Makefile.defs
    1112
    1213#-----[ Library ]------------------------------------------
    1314LIBRARY                         = $(DIR_LIB)/libQueue_Control.a
    1415
     16
    1517#-----[ include ]------------------------------------------
    1618
    17 all                             : $(LIBRARY_NEED)
     19all                             :
    1820                                @$(MAKE) all_component
    1921
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.deps

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
     
    88# DIR_MORPHEO must be defined
    99
    10 Queue_Control                   = yes
     10Queue_Control                   = yes
    1111
    12 #-----[ Library ]------------------------------------------
    13 Queue_Control_LIBRARY           = -lQueue_Control
     12ifndef Behavioural
     13include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
     14endif
    1415
    15 Queue_Control_DIR_LIBRARY       = -L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib
     16#-----[ Library ]------------------------------------------
     17Queue_Control_LIBRARY           =       -lQueue_Control \
     18                                $(Behavioural_LIBRARY) 
    1619
    17 #-----[ Rules ]--------------------------------------------
     20Queue_Control_DIR_LIBRARY       =       -L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib  \
     21                                $(Behavioural_DIR_LIBRARY)
     22
     23#-----[ Rules ]--------------------------------------------
     24
     25#.NOTPARALLEL                   : Queue_Control_library Queue_Control_library_clean
    1826
    1927Queue_Control_library           :
    2028                                @\
    21                                 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile ;
    22        
     29                                $(MAKE) Behavioural_library;\
     30                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile;
     31
    2332Queue_Control_library_clean     :
    2433                                @\
     34                                $(MAKE) Behavioural_library_clean;\
    2535                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile_Monolithic
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r94 r113  
    159159      while (nb_ack < _param->_nb_word)
    160160        {
    161           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     161          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    162162
    163163          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    232232      while (nb_ack < _param->_nb_word)
    233233        {
    234           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     234          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    235235         
    236236          for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile_Multi_Banked
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r88 r113  
    136136      while (nb_ack < nb_request)
    137137        {
    138           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     138          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    139139
    140140          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    183183        while (nb_ack < nb_request)
    184184          {
    185             cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     185            cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    186186           
    187187            for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r88 r113  
    136136      while (nb_ack < nb_request)
    137137        {
    138           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     138          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    139139
    140140          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    184184          while (nb_ack < nb_request)
    185185            {
    186               cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     186              cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    187187             
    188188              for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Select_Priority_Fixed
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r97 r113  
    108108 
    109109  sc_start(0);
    110 //cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
     110//cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Initialisation" << endl;
    111111
    112   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
     112  cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Loop of Test" << endl;
    113113
    114114  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Shifter
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r112 r113  
    147147          if (param._have_shift_logic_left)
    148148            {
    149               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Logic" << endl;
     149              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Logic" << endl;
    150150              direction = _left ;
    151151              type      = _shift;
     
    156156          else
    157157            {
    158               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Logic" << endl;
     158              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Logic" << endl;
    159159              continue;
    160160            }
     
    162162          if (param._have_shift_logic_right)
    163163            {
    164               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Logic" << endl;
     164              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Logic" << endl;
    165165              direction = _right;
    166166              type      = _shift;
     
    171171          else
    172172            {
    173               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Logic" << endl;
     173              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Logic" << endl;
    174174              continue;
    175175            }
     
    177177          if (param._have_shift_arithmetic_left)
    178178            {
    179               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Arithmetic" << endl;
     179              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Arithmetic" << endl;
    180180              direction = _left      ;
    181181              type      = _shift     ;
     
    186186          else
    187187            {
    188               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Arithmetic" << endl;
     188              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Arithmetic" << endl;
    189189              continue;
    190190            }
     
    192192          if (param._have_shift_arithmetic_right)
    193193            {
    194               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Arithmetic" << endl;
     194              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Arithmetic" << endl;
    195195              direction = _right;
    196196              type      = _shift;
     
    201201          else
    202202            {
    203               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Arithmetic" << endl;
     203              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Arithmetic" << endl;
    204204              continue;
    205205            }
     
    207207          if ( param._have_rotate_left)
    208208            {
    209               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Left" << endl;
     209              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Left" << endl;
    210210              direction = _left  ;
    211211              type      = _rotate;
     
    216216          else
    217217            {
    218               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Left" << endl;
     218              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Left" << endl;
    219219              continue;
    220220            }
     
    222222          if (param._have_rotate_right)
    223223            {
    224               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Right" << endl;
     224              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Right" << endl;
    225225              direction = _right;
    226226              type      = _rotate;
     
    231231          else
    232232            {
    233               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Right" << endl;
     233              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Right" << endl;
    234234              continue;
    235235            }
     
    283283              sc_start(0);
    284284             
    285               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "}" << endl;
     285              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "}" << endl;
    286286             
    287287              for (uint32_t i=0; i<param._nb_port; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Sort
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Victim
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Victim_Pseudo_LRU
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r95 r113  
    119119    for (uint32_t k=0; k<param._nb_entity; k++)
    120120      {
    121         cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
     121        cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
    122122        for (uint32_t i=0; i<param._nb_access; i++)
    123123          {
     
    165165        {
    166166         
    167           cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
     167          cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
    168168          for (uint32_t i=0; i<param._nb_access; i++)
    169169            {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common

    r103 r113  
    2222endif
    2323
     24##-----[ Entity ]-------------------------------------------
     25#ENTITY                         = $$($(BASENAME) $$PWD)
     26
    2427#-----[ Directory ]----------------------------------------
    2528#DIR_TMP                         = .
     
    2730DIR_INC                         = include
    2831DIR_SRC                         = src
    29 DIR_OBJ                         = obj
     32DIR_OBJ                         = $(DIR_TMP)/obj
     33DIR_LIB                         = $(DIR_TMP)/lib
    3034DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
    3135
     
    3539                                  -I$(DIR_MORPHEO)
    3640
    37 LIBDIR                          = $(DIR_LIBRARY)                        \
     41LIBDIR                          = -L$(DIR_LIB) \
    3842                                  $(SYSTEMC_LIBDIR_$(SIMULATOR))       
    3943#                                 $(OR1K_LIBDIR)                               
    40 
    41 LIBS                            = $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
    42 
    43 #                                 $(OR1K_LIBNAME) -lbfd 
    4444
    4545FLAGS_COMMON                    = $(SYSTEMC_CFLAGS_$(SIMULATOR))        \
     
    5050
    5151#-----[ Variable ]-----------------------------------------
    52 ENTITY                          = $$($(BASENAME) $$PWD)
    53 
    54 OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
     52#OBJECTS_COMMON                 = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
     53SOURCES                         = $(wildcard $(DIR_SRC)/*.cpp)
     54OBJECTS_COMMON                  = $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES)))))
    5555
    5656HEADERS                         = $(wildcard $(DIR_INC)/*.h)
    5757
    5858#-----[ Rules ]--------------------------------------------
    59 .PRECIOUS                       : $(DIR_OBJ)/%.o
     59.PRECIOUS                       : $(DIR_OBJ)/$(ENTITY)_%.o
    6060
    6161test_env                        :
    6262                                @$(ECHO) "-------------------| $(ENTITY)"
    6363
     64test                            :
     65                                @echo $(DIR_LIBRARY);
    6466
    65 $(DIR_OBJ)/%.o                  : $(DIR_SRC)/%.cpp $(HEADERS)
     67$(DIR_OBJ)/$(ENTITY)_%.o        : $(DIR_SRC)/%.cpp $(HEADERS)
    6668                                @\
    6769                                $(ECHO) "Compilation        : $*";\
    68                                 $(CXX) $(CFLAGS) -c -o $@ $<;
     70                                $(SYSTEMC_CXX_$(SIMULATOR)) $(CFLAGS) -c -o $@ $<;
    6971
    7072$(DIR_OBJ)                      :
     
    7678                                @\
    7779                                $(ECHO) "Delete     temporary files in directory $(PWD)";\
    78                                 $(RM)   $(DIR_OBJ)      \
    79                                         $(DIR_BIN)      \
    80                                         *~              \
    81                                         $(DIR_SRC)/*~   \
     80                                $(RM)   $(OBJECTS_COMMON)     \
     81                                        *~                    \
     82                                        $(DIR_SRC)/*~         \
    8283                                        $(DIR_INC)/*~;
    8384
    8485common_clean_all                : common_clean
     86                                @\
     87                                $(RM)   $(DIR_OBJ)
    8588
    8689common_help                     :
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Component

    r88 r113  
    22DIR_DOC                         = doc
    33DIR_TEST                        = SelfTest
    4 DIR_LIB                         = lib
    54
    65#-----[ Variable ]-----------------------------------------
     
    1110#.NOTPARALLEL                   : clean help
    1211
    13 all_component                   : test_env $(DIR_OBJ) $(DIR_LIB) $(OBJECTS) $(HEADERS)
    14                                 @$(MAKE) $(LIBRARY)
     12all_component                   : test_env $(DIR_OBJ) $(DIR_LIB)
     13                                @\
     14                                $(MAKE) $(LIBRARY);
    1515
    16 $(DIR_LIB)/%.a                  : $(OBJECTS) $(HEADERS)
     16# if simulator is modelsim, libComponent.a is a directory, else is normal library generated by g++
     17
     18$(DIR_LIB)/%.a                  : $(SOURCES) $(HEADERS)
    1719                                @\
    18                                 $(ECHO) "Archive            : $*";\
    19                                 $(AR)  -r $@ $(OBJECTS);\
    20                                 $(RANLIB) $@;
     20                                case "${SIMULATOR}" in                                                          \
     21                                    "modelsim")                                                                 \
     22                                        $(MODELTECH_VLIB) $@;                                                   \
     23                                        $(MODELTECH_SCCOM) $(CFLAGS) $(SOURCES) -work $@;                       \
     24                                        ;;                                                                      \
     25                                    *)                                                                          \
     26                                        $(MAKE) $(OBJECTS);                                                     \
     27                                        $(ECHO) "Archive            : $*";                                      \
     28                                        $(AR)  -r $@ $(OBJECTS);                                                \
     29                                        $(RANLIB) $@;                                                           \
     30                                        ;;                                                                      \
     31                                esac;
    2132
    2233$(DIR_LIB)                      :
     
    2940
    3041component_clean                 :
    31                                 @$(RM) $(DIR_LIB)
    32 
     42                                @$(RM) $(LIBRARY)
    3343#                               if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean; fi;
    3444
    3545component_clean_all             : component_clean
    36 
     46                                @$(RM) $(DIR_LIB)
    3747#                               if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean_all; fi;
    3848                               
     
    4656                                $(ECHO) " * help                 : print this text";\
    4757                                $(ECHO) "";
    48                                
    4958
    5059help                            :
     
    5867                                $(MAKE) component_clean;
    5968
    60 clean_all                               :
     69clean_all                       :
    6170                                @\
    6271                                $(MAKE) common_clean_all ;\
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r94 r113  
    99#-----[ Directory ]----------------------------------------
    1010DIR_BIN                         = $(DIR_TMP)/bin
    11 DIR_LIB                         = ../lib
    1211DIR_CFG_GEN                     = $(DIR_TMP)/configuration_generated
    1312DIR_CFG_USER                    = configuration
     
    1918
    2019OBJECTS                         = $(OBJECTS_COMMON)
     20
     21LIBS                            = -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
     22#                                 $(OR1K_LIBNAME) -lbfd 
     23
     24MODELTECH_LIBRARY               = $(addprefix -lib ,$(addsuffix .a, $(subst -l,$(DIR_LIB)/lib,$(LIBRARY))))
     25#MODELTECH_LIBRARY               = $(LIBRARY)
    2126
    2227EXEC_PREFIX                     =
     
    152157                                                x=$$i;                                                                                  \
    153158                                                for j in $${ENUM_PARAM[*]}; do                                                          \
    154                                                         declare -a RANGE_LOCAL=($${RANGE[$$j]});                                                        \
     159                                                        declare -a RANGE_LOCAL=($${RANGE[$$j]});                                        \
    155160                                                        DATA[$$j]="$${RANGE_LOCAL[$$((($$x % $${SIZE[$$j]})))]} ";                      \
    156161                                                        x=$$(($$x/$${SIZE[$$j]}));                                                      \
     
    195200                                fi;
    196201
    197 $(DIR_BIN)/%.x                  : $(OBJECTS) $(HEADERS) $(DIR_LIB)
     202$(DIR_BIN)/%.x                  : $(SOURCES) $(HEADERS) $(DIR_OBJ) $(DIR_BIN)
    198203                                @\
    199204                                $(ECHO) "Linkage            : $*";\
    200                                 $(CXX) $(LFLAGS) -o $@ $(OBJECTS) $(LIBS);
    201 
    202 $(DIR_LIB)                      :
    203                                 @\
    204                                 $(ECHO) "Create directory   : $@";\
    205                                 $(MKDIR) $@;
    206 
    207 $(DIR_BIN)                      :
    208                                 @\
    209                                 $(ECHO) "Create directory   : $@";\
    210                                 $(MKDIR) $@;
    211 
    212 $(DIR_LOG)                      :
    213                                 @\
    214                                 $(ECHO) "Create directory   : $@";\
    215                                 $(MKDIR) $@;
    216 
    217 $(DIR_CFG_GEN)                  :
     205                                case "${SIMULATOR}" in                                                          \
     206                                    "modelsim")                                                                 \
     207                                        $(MAKE) vhdl_package;                                                   \
     208                                        $(MAKE) vhdl_entity;                                                    \
     209                                        $(MODELTECH_SCCOM) -work $(DIR_WORK) $(CFLAGS) $(SOURCES);              \
     210                                        $(MODELTECH_SCCOM) -work $(DIR_WORK) $(MODELTECH_LIBRARY) $(LFLAGS) $(LIBS) -link;\
     211                                        $(ECHO) "#!$(SHELL)"                                              > $@; \
     212                                        $(ECHO) "cd $${PWD};"                                            >> $@; \
     213                                        $(ECHO) 'declare args;'                                          >> $@; \
     214                                        $(ECHO) 'for i in $${*}; do'                                     >> $@; \
     215                                        $(ECHO) '    args=$${args}" -sc_arg $${i}";'                     >> $@; \
     216                                        $(ECHO) 'done;'                                                  >> $@; \
     217                                        $(ECHO) "$(MODELTECH_VSIM) -novopt "'$${args}'" $(MODELTECH_LIBRARY) $(DIR_WORK).top;" >> $@; \
     218                                        $(ECHO) "cd -;"                                                  >> $@; \
     219                                        $(CHMOD) +x $@;                                                         \
     220                                        ;;                                                                      \
     221                                    *)                                                                          \
     222                                        $(MAKE) $(OBJECTS);                                                     \
     223                                        $(SYSTEMC_CXX_$(SIMULATOR)) $(LFLAGS) -o $@ $(OBJECTS) $(LIBRARY) $(LIBS);\
     224                                        ;;                                                                      \
     225                                esac;
     226
     227$(DIR_BIN) $(DIR_LOG) $(DIR_CFG_GEN) :
    218228                                @\
    219229                                $(ECHO) "Create directory   : $@";\
     
    223233                                @$(RM)  $(DIR_LOG)              \
    224234                                        $(DIR_CFG_USER)/*~      \
     235                                        $(DIR_BIN)/$(EXEC).x    \
    225236                                        *.vhdl                  \
    226237                                        *.pos                   \
     
    234245
    235246selftest_clean_all              : library_clean
    236                                
     247                                @\
     248                                $(RM) $(DIR_BIN)
    237249
    238250selftest_help                   :
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis

    r112 r113  
    1010
    1111DIR_VHDL                        = .
    12 DIR_WORK                        = work
     12WORK_NAME                       = work
     13DIR_WORK                        = $(MORPHEO_TMP)/$(WORK_NAME)
    1314
    1415FPGA_CFG_FILE_LOCAL             = mkf.info
     
    2122FPGA_LOG_FILES                  = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))       \
    2223                                  $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_USER)/*.cfg))
     24
     25
    2326#-----[ Rules ]--------------------------------------------
    2427.PRECIOUS                       : $(DIR_LOG)/%.vhdl.log $(DIR_LOG)/%.sim.log
    2528
    26 vhdl                            : execute $(DIR_WORK)
     29vhdl                            : $(EXEC_LOG)
     30                                @\
     31                                $(MAKE) vhdl_package; \
     32                                $(MAKE) vhdl_entity; \
     33                                $(MAKE) vhdl_testbench
     34
     35vhdl_package                    : $(DIR_WORK)
    2736                                @\
    2837                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Pack.vhdl));                                              \
    2938                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
    30                                 if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;          \
     39                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
     40
     41vhdl_testbench                  : $(DIR_WORK)
     42                                @\
     43                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));                                         \
     44                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
     45                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
     46
     47vhdl_entity                     : $(DIR_WORK)
     48                                @\
    3149                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*.vhdl|$(GREP_NOT) "(_Pack\.|_Testbench\.)"));              \
    3250                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
    33                                 if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;          \
    34                                 declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));                                         \
    35                                 declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
    36                                 if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
     51                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;       \
    3752
     53#list                           :
     54#                               @\
     55#                               declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*.vhdl|$(GREP_NOT) "(_Pack\.|_Testbench\.)"));              \
     56#                               for file1 in $${vhdl_files[*]}; do \
     57#                                   declare    x=$$(basename $${file1} .vhdl); \
     58#                                   declare -i count_x=$($(ECHO) $${x} | ${WC} -m); \
     59#                                    for file2 in $${vhdl_files[*]}; do \
     60#                                       if $(TEST) "$${file1}" != "$${file2}"; then\
     61#                                          declare    y=$$(basename $${file2} .vhdl); \
     62#                                          declare -i count_y=$($(ECHO) $${y} | ${WC} -m); \
     63#                                          if $(TEST) $${count_x} -gt $${count_y}; then \
     64#                                             break; \
     65#                                          fi; \
     66#                                          $(ECHO) $${x}; \
     67#                                       fi; \
     68#                                   done; \
     69#                               done;
    3870
    3971sim                             : vhdl
     
    4173                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));                                         \
    4274                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.sim.log});                                               \
    43                                 if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
     75                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
    4476
    4577fpga                            : sim
     
    5688                                done;                                   \
    5789                                ($(XILINX_ENV); cd $(FPGA_CFG_FILE_GLOBAL_DIR); ./$(FPGA_CFG_FILE_GLOBAL));                             \
    58                                 $(MAKE) $(FPGA_LOG_FILES);
     90                                $(MAKE) -k $(FPGA_LOG_FILES);
    5991
    6092$(DIR_LOG)/%.fpga.log           :
     
    6597$(DIR_WORK)                     :
    6698                                @\
    67                                 $(ECHO) "Create work-space  : $@"; \
    68                                 $(MODELTECH_VLIB) $@; \
    69                                 $(MODELTECH_VMAP) $(XILINX_CORELIB);
     99                                $(ECHO) "Create work-space  : $@";                                                      \
     100                                $(MODELTECH_VLIB) $@;                                                                   \
     101                                $(MODELTECH_VMAP) $(XILINX_LIBNAME) $(XILINX_LIBDIR);                                   \
     102                                if $(TEST) $${?} -ne 0; then                                                            \
     103                                   $(ECHO) "Xilinx corelib must be compiled to simulation tools";                       \
     104                                   $(ECHO) "Run manualy \"$(XILINX_COMPXLIB)\" with $(XILINX_CORELIB) directory";       \
     105                                fi;                                 
    70106
    71107$(DIR_LOG)/%.sim.log            : $(DIR_VHDL)/%.vhdl $(DIR_LOG)/%.vhdl.log
     
    82118                                @\
    83119                                $(ECHO) "VHDL's Compilation : $*"; \
    84                                 $(MODELTECH_VCOM) $< &> $@;
     120                                $(MODELTECH_VCOM) -work $(DIR_WORK) $< &> $@;
    85121
    86122synthesis_clean                 :
    87123                                @\
    88124                                if $(TEST) -f Makefile.mkf; then $(MAKE) -f Makefile.mkf clean; fi; \
    89                                 $(RM) $(DIR_WORK) transcript Makefile.mkf *.wlf;
     125                                $(RM) $(DIR_WORK) transcript Makefile.mkf *wlf* modelsim.ini;
    90126
    91127synthesis_clean_all             : synthesis_clean
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66
    7 #-----[ Directory ]----------------------------------------
     7ENTITY                          = Behavioural
     8
     9#-----[ Directory ]----------------------------------------
    810DIR_COMPONENT_MORPHEO           = ..
    911DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh

    r81 r113  
    1616{
    1717    echo "";
    18     echo "usage : $0 <directory> <name>";
     18    echo "usage : $0 <directory> <name> <type>";
    1919    echo " - <directory> : localisation of component";
    2020    echo " - <name>      : name of component";
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs

    r82 r113  
    77#
    88
     9ENTITY                          = @COMPONENT
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = @DIR_MORPHEO
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/top.h

    r111 r113  
    44 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "@COMPONENT"
    77 */
    88
     
    2424using namespace morpheo::behavioural::@NAMESPACE_USE;
    2525
    26 void test    (string name,
    27               morpheo::behavioural::@NAMESPACE_USE::Parameters * param);
     26SC_MODULE(top)
     27{
     28#ifdef SYSTEMC
     29 private: sc_clock               *  in_CLOCK ;
     30 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     31#endif
     32
     33 private: std::string name;
     34 private: Tusage_t _usage;
     35 private: morpheo::behavioural::@NAMESPACE_USE::Parameters * _param;
     36#ifdef STATISTICS
     37 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
     38#endif
     39 private: @COMPONENT * component;
     40
     41 private: void usage
     42    (
     43#ifdef MTI_SYSTEMC
     44     int argc, const char * const * argv
     45#else
     46     int argc, char * argv[]
     47#endif
     48     );
     49 private: void allocation   (void);
     50 private: void deallocation (void);
     51 public : void test         (void);
     52
     53#ifdef MTI_SYSTEMC
     54  SC_CTOR(top::top);
     55#else
     56 public : top (sc_module_name module_name,int argc, char * argv[]);
     57#endif
     58 public : ~top(void);
     59};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp

    r88 r113  
    66 */
    77
    8 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
     8#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 0
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void 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 (_(" *  ()\n"));
    17 
    18   exit (1);
    19 }
    20 
    21 #ifndef SYSTEMC
    22 int main    (int argc, char * argv[])
    23 #else
    24 int sc_main (int argc, char * argv[])
    25 #endif
    26 {
    27   if (argc != static_cast<int>(2+NB_PARAMS))
    28     usage (argc, argv);
    29 
    30   uint32_t x = 1;
    31 
    32   string name = argv[x++];
    33 
    34   int _return = EXIT_SUCCESS;
    3519  try
    3620    {
    37       morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
    38         (
    39          true //is_toplevel
    40         );
    41      
    42       msg(_("%s"),param->print(0).c_str());
    43      
    44       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    4526    }
    4627  catch (morpheo::ErrorMorpheo & error)
    4728    {
    48       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     29      msgError(_("%s\n"),error.what ());
    4930      _return = EXIT_FAILURE;
    5031    }
     
    5940  catch (morpheo::ErrorMorpheo & error)
    6041    {
    61 //       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
    6243      _return = EXIT_FAILURE;
    6344    }
    6445
    65   return (_return);
     46  return _return;
    6647}
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_test.cpp

    r111 r113  
    77 */
    88
    9 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
     9#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
    1010#include "Behavioural/include/Allocation.h"
    1111
    12 void test (string name,
    13            morpheo::behavioural::@NAMESPACE_USE::Parameters * _param)
     12void top::test (void)
    1413{
    15   msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
    16 
    17   if (setlocale (LC_ALL, "") == NULL)
    18     msg(_("setlocale ko.\n"));
    19 
    20 #ifdef STATISTICS
    21   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    22 #endif
    23 
    24   Tusage_t _usage = USE_ALL;
    25 
    26 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    27 //   _usage = usage_unset(_usage,USE_VHDL                 );
    28 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    29 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    30 //   _usage = usage_unset(_usage,USE_POSITION             );
    31 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    32 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    33 
    34   @COMPONENT * _@COMPONENT = new @COMPONENT
    35     (name.c_str(),
    36 #ifdef STATISTICS
    37      _parameters_statistics,
    38 #endif
    39      _param,
    40      _usage);
    41  
    4214#ifdef SYSTEMC
    4315  if (usage_is_set(_usage,USE_SYSTEMC))
    4416    {
    45   /*********************************************************************
    46    * Déclarations des signaux
    47    *********************************************************************/
    48   string rename;
    49 
    50   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    51   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    52  
    53   /********************************************************
    54    * Instanciation
    55    ********************************************************/
    56  
    57   msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
    58 
    59   (*(_@COMPONENT->in_CLOCK))        (*(in_CLOCK));
    60   (*(_@COMPONENT->in_NRESET))       (*(in_NRESET));
    61 
    62 
    63   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    64    
    65   Time * _time = new Time();
    66 
    67   /********************************************************
    68    * Simulation - Begin
    69    ********************************************************/
    70 
    71   // Initialisation
    72 
    73   const uint32_t seed = 0;
    74 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    75 
    76   srand(seed);
    77 
    78   SC_START(0);
    79   LABEL("Initialisation");
    80 
    81   LABEL("Reset");
    82   in_NRESET->write(0);
    83   SC_START(5);
    84   in_NRESET->write(1); 
    85 
    86   LABEL("Loop of Test");
    87 
    88   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    89     {
    90       LABEL("Iteration %d",iteration);
    91 
    92       SC_START(1);
    93     }
    94 
    95   /********************************************************
    96    * Simulation - End
    97    ********************************************************/
    98 
    99   TEST_OK ("End of Simulation");
    100   delete _time;
    101 
    102   msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    103 
    104   delete in_CLOCK;
    105   delete in_NRESET;
     17      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
     18     
     19      Time * _time = new Time();
     20     
     21      /********************************************************
     22       * Simulation - Begin
     23       ********************************************************/
     24     
     25      // Initialisation
     26     
     27      const uint32_t seed = 0;
     28    //const uint32_t seed = static_cast<uint32_t>(time(NULL));
     29     
     30      srand(seed);
     31     
     32      SC_CYCLE(0);
     33      LABEL("Initialisation");
     34     
     35      LABEL("Reset");
     36      in_NRESET->write(0);
     37      SC_CYCLE(5);
     38      in_NRESET->write(1); 
     39     
     40      LABEL("Loop of Test");
     41     
     42      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     43        {
     44          LABEL("Iteration %d",iteration);
     45         
     46          SC_CYCLE(1);
     47        }
     48     
     49      /********************************************************
     50       * Simulation - End
     51       ********************************************************/
     52     
     53      TEST_OK ("");
     54     
     55      sc_stop();
     56      delete _time;
     57     
     58      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    10659    }
    10760#endif
    108 
    109   delete _@COMPONENT;
    110 #ifdef STATISTICS
    111   delete _parameters_statistics;
    112 #endif
    11361}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h

    r82 r113  
    1313#endif
    1414
    15 
     15#include "Behavioural/@DIRECTORY/include/Wrapper_@COMPONENT.h"
    1616#include "Behavioural/@DIRECTORY/include/Parameters.h"
    1717#include "Behavioural/@DIRECTORY/include/Types.h"
     
    2424#endif
    2525#include "Behavioural/include/Usage.h"
     26#include "Behavioural/include/Simulation.h"
    2627
    2728#include "Common/include/ToString.h"
     
    4445  protected : const std::string  _name;
    4546  protected : const Parameters * _param;
    46   private   : const Tusage_t     _usage;
     47  public    :      Tusage_t     _usage;
    4748
    4849#ifdef STATISTICS
     
    5960  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
    6061
    61     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     62    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6263
    63     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     64    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6465
    6566    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     67#endif
     68
     69#ifdef MODELSIM_COSIMULATION
     70    // ~~~~~[ Wrapper ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     71  private : Wrapper_@COMPONENT * _wrapper;
    6672#endif
    6773
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h

    r88 r113  
    2929  public :        Parameters_test msg_error  (void);
    3030
     31  public :        std::string     id         (void);
     32
    3133  public :        std::string     print      (uint32_t depth);
    3234  public : friend std::ostream&   operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp

    r88 r113  
    2929    _name              (name)
    3030    ,_param            (param)
    31     ,_usage            (usage)
    3231  {
    3332    log_begin(@COMPONENT,FUNCTION);
    3433
    35     usage_environment(_usage);
     34    _usage = usage_environment(usage);
     35
     36#ifdef MODELSIM_COSIMULATION
     37    if (_model.get_type(_param->_type) == MODEL_VHDL)
     38      {
     39        _usage = usage_cosimulation(_usage);
     40      }
     41#endif
    3642
    3743    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str());
     
    6369
    6470#ifdef SYSTEMC
    65     if (usage_is_set(_usage,USE_SYSTEMC))
     71    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
    6672      {
    6773        log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
     
    8591// # endif   
    8692       
     93      }
    8794#endif
    88       }
     95
    8996    log_end(@COMPONENT,FUNCTION);
    9097  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp

    r82 r113  
    1010#include "Common/include/Max.h"
    1111
    12 namespace morpheo                    {
     12namespace morpheo {
    1313namespace behavioural {
    1414@NAMESPACE_BEGIN
     
    3030
    3131    Entity * entity = _component->set_entity (_name       
    32                                               ,"@COMPONENT"
     32                                              ,_param->_type
    3333#ifdef POSITION
    3434                                              ,COMBINATORY
     
    5858#endif
    5959
     60#ifdef MODELSIM_COSIMULATION
     61    if (usage_is_set(_usage,USE_COSIMULATION))
     62      {
     63        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Create Wrapper"),_name.c_str());
     64
     65        _wrapper = new Wrapper_@COMPONENT (_name.c_str(),"morpheo_behavioural","work");
     66      }
     67#endif
     68
    6069    log_end(@COMPONENT,FUNCTION);
    6170  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp

    r82 r113  
    1919    log_begin(@COMPONENT,FUNCTION);
    2020
    21     if (usage_is_set(_usage,USE_SYSTEMC))
    22       {
    23         delete    in_CLOCK ;
    24         delete    in_NRESET;
     21//    if (usage_is_set(_usage,USE_SYSTEMC_INTERFACE))
     22      { 
     23        DELETE0_SIGNAL( in_CLOCK ,1);
     24        DELETE0_SIGNAL( in_NRESET,1);
    2525      }
    2626    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    2727
    2828    delete _component;
     29
     30#ifdef MODELSIM_COSIMULATION
     31    if (usage_is_set(_usage,USE_COSIMULATION))
     32      {
     33        delete _wrapper;
     34      }
     35#endif
    2936
    3037    log_end(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp

    r82 r113  
    2020
    2121    _stat = new Stat (static_cast<std::string>(_name),
    22                       "@COMPONENT",
     22                      _param->_type,
    2323                      param_statistics);
    2424   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp

    r88 r113  
    1414#undef  FUNCTION
    1515#define FUNCTION "@COMPONENT::Parameters"
    16   Parameters::Parameters (bool is_toplevel)
     16  Parameters::Parameters (bool is_toplevel):
     17    behavioural::Parameters ("@COMPONENT")
    1718  {
    1819    log_begin(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp

    r82 r113  
    2020    log_begin(@COMPONENT,FUNCTION);
    2121
    22     Parameters_test test ("@COMPONENT");
     22    Parameters_test test (_type);
    2323
    2424    log_end(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs

    r82 r113  
    77#
    88
     9ENTITY                          = @COMPONENT
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = @DIR_MORPHEO
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/top.h

    r111 r113  
    44 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "@COMPONENT"
    77 */
    88
     
    1818#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
    1919
    20 #include <string>
    21 #include <iostream>
    22 #include <sys/time.h>
    23 
    2420using namespace std;
    2521using namespace morpheo;
     
    2824using namespace morpheo::behavioural::@NAMESPACE_USE;
    2925
    30 void test    (string name,
    31               morpheo::behavioural::@NAMESPACE_USE::Parameters * param);
     26SC_MODULE(top)
     27{
     28#ifdef SYSTEMC
     29 private: sc_clock               *  in_CLOCK ;
     30 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     31#endif
     32
     33 private: std::string name;
     34 private: Tusage_t _usage;
     35 private: morpheo::behavioural::@NAMESPACE_USE::Parameters * _param;
     36#ifdef STATISTICS
     37 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
     38#endif
     39 private: @COMPONENT * component;
     40
     41 private: void usage
     42    (
     43#ifdef MTI_SYSTEMC
     44     int argc, const char * const * argv
     45#else
     46     int argc, char * argv[]
     47#endif
     48     );
     49 private: void allocation   (void);
     50 private: void deallocation (void);
     51 public : void test         (void);
     52
     53#ifdef MTI_SYSTEMC
     54  SC_CTOR(top::top);
     55#else
     56 public : top (sc_module_name module_name,int argc, char * argv[]);
     57#endif
     58 public : ~top(void);
     59};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp

    r88 r113  
    66 */
    77
    8 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
     8#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 0
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void 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 (_(" *  ()\n"));
    17 
    18   exit (1);
    19 }
    20 
    21 #ifndef SYSTEMC
    22 int main    (int argc, char * argv[])
    23 #else
    24 int sc_main (int argc, char * argv[])
    25 #endif
    26 {
    27   if (argc != static_cast<int>(2+NB_PARAMS))
    28     usage (argc, argv);
    29 
    30   uint32_t x = 1;
    31 
    32   string name = argv[x++];
    33 
    34   int _return = EXIT_SUCCESS;
    3519  try
    3620    {
    37       morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
    38         (
    39          true // is_toplevel
    40         );
    41      
    42       msg(_("%s"),param->print(0).c_str());
    43      
    44       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    4526    }
    4627  catch (morpheo::ErrorMorpheo & error)
    4728    {
    48       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     29      msgError(_("%s\n"),error.what ());
    4930      _return = EXIT_FAILURE;
    5031    }
    51 
     32 
    5233  try
    5334    {
     
    5940  catch (morpheo::ErrorMorpheo & error)
    6041    {
    61 //       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
    6243      _return = EXIT_FAILURE;
    6344    }
    6445
    65   return (_return);
     46  return _return;
    6647}
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_test.cpp

    r111 r113  
    77 */
    88
    9 #include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
     9#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
    1010#include "Behavioural/include/Allocation.h"
    1111
    12 void test (string name,
    13            morpheo::behavioural::@NAMESPACE_USE::Parameters * _param)
     12void top::test (void)
    1413{
    15   msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
    16  
    17   if (setlocale (LC_ALL, "") == NULL)
    18     msg(_("setlocale ko.\n"));
    19 
    20 #ifdef STATISTICS
    21   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    22 #endif
    23 
    24   Tusage_t _usage = USE_ALL;
    25 
    26 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    27 //   _usage = usage_unset(_usage,USE_VHDL                 );
    28 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    29 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    30 //   _usage = usage_unset(_usage,USE_POSITION             );
    31 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    32 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    33 
    34   @COMPONENT * _@COMPONENT = new @COMPONENT
    35     (name.c_str(),
    36 #ifdef STATISTICS
    37      _parameters_statistics,
    38 #endif
    39      _param,
    40      _usage);
    41  
    4214#ifdef SYSTEMC
    4315  if (usage_is_set(_usage,USE_SYSTEMC))
    4416    {
    45   /*********************************************************************
    46    * Déclarations des signaux
    47    *********************************************************************/
    48   string rename;
    49 
    50   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    51   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    52  
    53   /********************************************************
    54    * Instanciation
    55    ********************************************************/
    56  
    57   msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
    58 
    59   (*(_@COMPONENT->in_CLOCK))        (*(in_CLOCK));
    60   (*(_@COMPONENT->in_NRESET))       (*(in_NRESET));
    61 
    62 
    63   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    64    
    65   Time * _time = new Time();
    66 
    67   /********************************************************
    68    * Simulation - Begin
    69    ********************************************************/
    70 
    71   // Initialisation
    72 
    73   const uint32_t seed = 0;
    74 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    75 
    76   srand(seed);
    77 
    78   SC_START(0);
    79   LABEL("Initialisation");
    80 
    81   LABEL("Reset");
    82   in_NRESET->write(0);
    83   SC_START(5);
    84   in_NRESET->write(1); 
    85 
    86   LABEL("Loop of Test");
    87 
    88   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    89     {
    90       LABEL("Iteration %d",iteration);
    91 
    92       SC_START(1);
    93     }
    94 
    95   /********************************************************
    96    * Simulation - End
    97    ********************************************************/
    98 
    99   TEST_OK ("End of Simulation");
    100   delete _time;
    101 
    102   msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    103 
    104   delete in_CLOCK;
    105   delete in_NRESET;
     17      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
     18     
     19      Time * _time = new Time();
     20     
     21      /********************************************************
     22       * Simulation - Begin
     23       ********************************************************/
     24     
     25      // Initialisation
     26     
     27      const uint32_t seed = 0;
     28    //const uint32_t seed = static_cast<uint32_t>(time(NULL));
     29     
     30      srand(seed);
     31     
     32      SC_CYCLE(0);
     33      LABEL("Initialisation");
     34     
     35      LABEL("Reset");
     36      in_NRESET->write(0);
     37      SC_CYCLE(5);
     38      in_NRESET->write(1); 
     39     
     40      LABEL("Loop of Test");
     41     
     42      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     43        {
     44          LABEL("Iteration %d",iteration);
     45         
     46          SC_CYCLE(1);
     47        }
     48     
     49      /********************************************************
     50       * Simulation - End
     51       ********************************************************/
     52     
     53      TEST_OK ("");
     54     
     55      sc_stop();
     56      delete _time;
     57     
     58      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    10659    }
    10760#endif
    108 
    109   delete _@COMPONENT;
    110 #ifdef STATISTICS
    111   delete _parameters_statistics;
    112 #endif
    11361}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp

    r83 r113  
    3030
    3131    Entity * entity = _component->set_entity (_name       
    32                                               ,"@COMPONENT"
     32                                              ,_param->_type
    3333#ifdef POSITION
    3434                                              ,COMBINATORY
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp

    r82 r113  
    2020
    2121    _stat = new Stat (static_cast<std::string>(_name),
    22                       "@COMPONENT",
     22                      _param->_type,
    2323                      param_statistics);
    2424   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp

    r88 r113  
    1414#undef  FUNCTION
    1515#define FUNCTION "@COMPONENT::Parameters"
    16   Parameters::Parameters (bool is_toplevel)
     16  Parameters::Parameters (bool is_toplevel):
     17    behavioural::Parameters ("@COMPONENT")
    1718  {
    1819    log_begin(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r112 r113  
    101101#define PRINT_SIZE_NUL(component,interface,signal) log_printf(TRACE,Allocation,FUNCTION,_("<%s> %s.%s.%s : size is nul."),_name.c_str(),component->get_name().c_str(),interface->get_name().c_str(),signal);
    102102#define TEST_SIGNAL(name,address) PRINT_SIGNAL_ADDRESS(name,address); TEST_PTR(address)
     103#define INSTANCE_FOREIGN_PRINT(name) log_printf(TRACE,Allocation,FUNCTION,"<%s> : %s (%s, %d)",_name.c_str(),name,__FILE__,__LINE__);
    103104
    104105// ----------------------------------------------------------------------
     
    106107// ----------------------------------------------------------------------
    107108
    108 
    109 #define __ALLOC0_SIGNAL(sig, name, type)         \
     109#define __ALLOC0_SIGNAL(sig, name, type)        \
    110110  {                                             \
    111111    sig = new type (name);                      \
     
    113113
    114114#ifdef POSITION
    115 #define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
     115#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
    116116  INTERFACE_PRINT(name);                                                \
    117117  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
    118118#else
    119 #define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
     119#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
    120120  INTERFACE_PRINT(name);                                                \
    121121  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name);
     
    124124#define ALLOC0_INTERFACE_END()
    125125
    126 #define ALLOC0_VAL_ACK_IN(  sig, name, type)                             \
     126#define ALLOC0_VAL_ACK_IN(  sig, name, type)                            \
    127127  {                                                                     \
    128128    sig = interface->set_signal_valack_in (name, type);                 \
    129129  }                                                                     
    130 #define ALLOC0_VAL_ACK_OUT( sig, name, type)                             \
     130#define ALLOC0_VAL_ACK_OUT( sig, name, type)                            \
    131131  {                                                                     \
    132132    sig = interface->set_signal_valack_out(name, type);                 \
    133133  }                                                                     
    134 #define ALLOC0_VALACK_IN(     sig, type)                                 \
     134#define ALLOC0_VALACK_IN(     sig, type)                                \
    135135  {                                                                     \
    136136    sig = interface->set_signal_valack_in (type);                       \
     
    160160    }
    161161
    162 #define DELETE0_SIGNAL( sig, size)                                       \
     162#define DELETE0_SIGNAL( sig, size)                                      \
    163163  if (size > 0)                                                         \
    164164    {                                                                   \
     
    166166    }
    167167
    168 #define ALLOC0_SC_SIGNAL(  sig, name, type)                              \
    169   sc_signal<type> * sig = new sc_signal<type> (name);                   \
     168#define ALLOC0_FOREIGN_SIGNAL_IN(  sig, interface, name, type, size)    \
     169  if (size > 0)                                                         \
     170    {                                                                   \
     171      std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
     172      sig = new SC_IN    (type) (str.c_str());                          \
     173    }
     174
     175#define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size)    \
     176  if (size > 0)                                                         \
     177    {                                                                   \
     178      std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
     179      sig = new SC_OUT   (type) (str.c_str());                          \
     180    }
     181
     182#define DELETE0_FOREIGN_SIGNAL( sig, size) \
     183  {                                        \
     184    DELETE0_SIGNAL(sig,size);              \
     185  }
     186
     187#define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size)      \
     188  if (size > 0)                                                         \
     189    {                                                                   \
     190      INSTANCE_FOREIGN_PRINT(name);                                     \
     191      _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \
     192    }
     193
     194#define ALLOC0_SC_SIGNAL(  sig, name, type)                             \
     195  sig = new sc_signal<type> (name);                                     \
    170196  PRINT_SIGNAL_ADDRESS(name,sig);
    171197
    172 #define INSTANCE0_SC_SIGNAL(component, sig)                     \
     198#define INSTANCE0_SC_SIGNAL(component, sig)                    \
    173199  {                                                            \
    174200    TEST_SIGNAL(component->sig->name(),component->sig);        \
     
    177203  }
    178204
    179 #define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                       \
     205#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                      \
    180206  {                                                                     \
    181207    TEST_SIGNAL(component->sig1->name(),component->sig1);               \
     
    185211
    186212#define DELETE0_SC_SIGNAL( sig)                  \
    187   {                                             \
    188     delete sig;                                 \
     213  {                                              \
     214    PRINT_SIGNAL_ADDRESS("",sig);                \
     215    delete sig;                                  \
    189216  }
    190217
     
    326353  }
    327354
     355#define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
     356  {                                                                     \
     357    sig = new SC_IN (type) * [x1];                                   \
     358    for (uint32_t it1=0; it1<x1; it1++)                                 \
     359      if (size > 0)                                                     \
     360        {                                                               \
     361          std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
     362          sig [it1] = new SC_IN (type) (str.c_str());                   \
     363        }                                                               \
     364  }
     365
     366#define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1)  \
     367  {                                                                     \
     368    sig = new SC_OUT (type) * [x1];                                     \
     369    for (uint32_t it1=0; it1<x1; it1++)                                 \
     370      if (size > 0)                                                     \
     371        {                                                               \
     372          std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
     373          sig [it1] = new SC_OUT (type) (str.c_str());                  \
     374        }                                                               \
     375  }
     376
     377#define DELETE1_FOREIGN_SIGNAL( sig, size,x1)            \
     378  {                                                      \
     379    DELETE1_SIGNAL(sig,x1,size);                         \
     380  }
     381
    328382#define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
    329   sc_signal<type> ** sig = new sc_signal<type> * [x1];                  \
     383  sig = new sc_signal<type> * [x1];                                     \
    330384  {                                                                     \
    331385    std::string separator="_";                                          \
     
    359413    for (uint32_t it1=0; it1<x1; it1++)                                 \
    360414      {                                                                 \
     415        PRINT_SIGNAL_ADDRESS("",sig[it1]);                         \
    361416        delete sig[it1];                                                \
    362417      }                                                                 \
     
    530585  }
    531586
     587
     588#define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
     589  {                                                                     \
     590    sig = new SC_IN (type) ** [x1];                                     \
     591    for (uint32_t it1=0; it1<x1; it1++)                                 \
     592      {                                                                 \
     593        sig [it1] = new SC_IN (type) * [x2];                            \
     594        for (uint32_t it2=0; it2<x2; it2++)                             \
     595          if (size > 0)                                                 \
     596            {                                                           \
     597              std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
     598              sig [it1][it2] = new SC_IN    (type) (str.c_str()); \
     599            }                                                           \
     600      }                                                                 \
     601  }
     602
     603#define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \
     604  {                                                                     \
     605    sig = new SC_OUT (type) ** [x1];                                    \
     606    for (uint32_t it1=0; it1<x1; it1++)                                 \
     607      {                                                                 \
     608        sig [it1] = new SC_OUT (type) * [x2];                           \
     609        for (uint32_t it2=0; it2<x2; it2++)                             \
     610          if (size > 0)                                                 \
     611            {                                                           \
     612              std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
     613              sig [it1][it2] = new SC_IN    (type) (str.c_str());       \
     614            }                                                           \
     615      }                                                                 \
     616  }
     617
     618#define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2)            \
     619  {                                                         \
     620    DELETE2_SIGNAL(sig,x1,x2,size);                         \
     621  }
     622
    532623#define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
    533   sc_signal<type> *** sig = new sc_signal<type> ** [x1];                \
     624  sig = new sc_signal<type> ** [x1];                                    \
    534625  {                                                                     \
    535626    std::string separator="_";                                          \
     
    571662        for (uint32_t it2=0; it2<x2; it2++)                             \
    572663          {                                                             \
     664            PRINT_SIGNAL_ADDRESS("",sig[it1][it2]);                     \
    573665            delete sig[it1][it2];                                       \
    574666          }                                                             \
     
    758850  }
    759851
     852#define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3)     \
     853  {                                                                     \
     854    sig = new SC_IN (type) *** [x1];                                    \
     855    for (uint32_t it1=0; it1<x1; it1++)                                 \
     856      {                                                                 \
     857        sig [it1] = new SC_IN (type) ** [x2];                           \
     858        for (uint32_t it2=0; it2<x2; it2++)                             \
     859          {                                                             \
     860            sig [it1][it2] = new SC_IN (type) * [x3];                   \
     861            for (uint32_t it3=0; it3<x3; it3++)                         \
     862              if (size > 0)                                             \
     863                {                                                       \
     864                  std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
     865                  sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \
     866                }                                                       \
     867          }                                                             \
     868      }                                                                 \
     869  }
     870
     871#define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3)    \
     872  {                                                                     \
     873    sig = new SC_OUT (type) *** [x1];                                   \
     874    for (uint32_t it1=0; it1<x1; it1++)                                 \
     875      {                                                                 \
     876        sig [it1] = new SC_OUT (type) ** [x2];                          \
     877        for (uint32_t it2=0; it2<x2; it2++)                             \
     878          {                                                             \
     879            sig [it1][it2] = new SC_OUT (type) * [x3];                  \
     880            for (uint32_t it3=0; it3<x3; it3++)                         \
     881              if (size > 0)                                             \
     882                {                                                       \
     883                  std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
     884                  sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \
     885                }                                                       \
     886          }                                                             \
     887      }                                                                 \
     888  }
     889
     890#define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)            \
     891  {                                                            \
     892    DELETE3_SIGNAL(sig,x1,x2,x3,size);                         \
     893  }
     894
    760895#define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
    761   sc_signal<type> **** sig = new sc_signal<type> *** [x1];              \
     896  sig = new sc_signal<type> *** [x1];                                   \
    762897  {                                                                     \
    763898    std::string separator="_";                                          \
     
    807942            for (uint32_t it3=0; it3<x3; it3++)                         \
    808943              {                                                         \
     944                PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]);            \
    809945                delete sig[it1][it2][it3];                              \
    810946              }                                                         \
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h

    r82 r113  
    7272    public : Entity    * _entity   ;
    7373    public : Tinstance_t _instance ;
     74    public : std::string _architecture;
    7475    } Tcomponent_t;   
    7576 
     
    102103#endif
    103104                                                       ,Tinstance_t instance=INSTANCE_ALL
     105                                                       ,std::string architecture=""
    104106                                                       );
    105107
     
    116118
    117119  private   : Signal *              signal_internal   (Entity * entity_productor,
    118                                                        Signal * signal_productor);
     120                                                       Signal * signal_productor,
     121                                                       Entity * entity_consumer,
     122                                                       Signal * signal_consumer);
    119123
    120124  public    : void                  port_map          (std::string component_src ,
     
    125129  public    : bool                  test_map          (bool recursive=true);
    126130  private   : bool                  test_map          (uint32_t depth, bool recursive);
     131
     132  public    : void *                get_sc_signal     (std::string component,
     133                                                       std::string port     );
     134//   public    : void                  set_sc_signal     (std::string component,
     135//                                                     std::string port     ,
     136//                                                        void *      sc_signal);
    127137
    128138//   public    : bool                  test_equi         (bool recursive=true);
     
    141151  public    : friend std::ostream&  operator<<        (std::ostream& output_stream,
    142152                                                       morpheo::behavioural::Component & x);
     153
     154
     155#undef  FUNCTION
     156#define FUNCTION "Component::set_sc_signal"
     157  public    : template <typename T>
     158  void set_sc_signal (std::string component,
     159                      std::string port     ,
     160                      void *      sc_signal)
     161    {
     162      log_begin(Behavioural,FUNCTION);
     163     
     164      std::string name_entity = _entity->get_name();
     165     
     166      Entity * entity = find_entity(component);
     167     
     168      if (entity == NULL)
     169        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n"));
     170     
     171      Signal * signal = entity->find_signal (port);
     172     
     173      if (signal == NULL)
     174        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n"));
     175     
     176      signal->alloc<T>(sc_signal);
     177     
     178      log_end(Behavioural,FUNCTION);
     179    };
    143180  };
    144181
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h

    r82 r113  
    5858  public    : std::string           get_name          (void);
    5959  public    : std::string           get_type          (void);
     60  public    : Tusage_t              get_usage         (void);
    6061
    6162#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r88 r113  
    9191
    9292#ifdef SYSTEMC
     93
     94#undef  FUNCTION
     95#define FUNCTION "Interface::set_signal_clk"
    9396  public    : sc_in_clk *           set_signal_clk       (std::string     name     ,
    9497                                                          uint32_t        size     ,
    9598                                                          presence_port_t presence_port=CLOCK_VHDL_YES)
    9699    {
    97       log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
     100      log_begin(Behavioural,FUNCTION);
    98101
    99102      if ((presence_port != CLOCK_VHDL_YES) and
     
    101104        throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port.");
    102105
     106      LowerCase(name);
     107
    103108      Signal    * sig  = set_signal (name, IN , size, presence_port);
    104109      sc_in_clk * port;
    105110
    106       if (_usage & USE_SYSTEMC)
     111      if (_usage & USE_SYSTEMC_INTERFACE)
    107112        {
    108113          port = new sc_in_clk (sig->_name.c_str());
     
    114119        }
    115120
    116       log_printf(FUNC,Behavioural,"set_signal_clk","End");
    117 
    118       return port;
    119     };
    120 
     121      log_end(Behavioural,FUNCTION);
     122
     123      return port;
     124    };
     125
     126#undef  FUNCTION
     127#define FUNCTION "Interface::set_signal_in"
    121128  public    : template <typename T>
    122129              sc_in <T> *           set_signal_in       (std::string     name     ,
     
    124131                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
    125132    {
    126       log_printf(FUNC,Behavioural,"set_signal_in","Begin");
     133      log_begin(Behavioural,FUNCTION);
    127134
    128135      if ((presence_port == CLOCK_VHDL_YES) or
     
    130137        throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
    131138
     139      LowerCase(name);
     140
    132141      Signal    * sig  = set_signal (name, IN , size, presence_port);
    133142      sc_in <T> * port;
    134143
    135       if (_usage & USE_SYSTEMC)
     144      if (_usage & USE_SYSTEMC_INTERFACE)
    136145        {
    137146          port = new sc_in <T> (sig->_name.c_str());
     
    143152        }
    144153
    145       log_printf(FUNC,Behavioural,"set_signal_in","End");
    146 
    147       return port;
    148     };
    149 
     154      log_end(Behavioural,FUNCTION);
     155
     156      return port;
     157    };
     158
     159#undef  FUNCTION
     160#define FUNCTION "Interface::set_signal_out"
    150161  public    : template <typename T>
    151162              sc_out <T> *          set_signal_out      (std::string     name     ,
     
    153164                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
    154165    {
    155       log_printf(FUNC,Behavioural,"set_signal_out","Begin");
     166      log_begin(Behavioural,FUNCTION);
     167
     168      LowerCase(name);
    156169
    157170      if ((presence_port == CLOCK_VHDL_YES) or
     
    162175      sc_out <T> * port;
    163176
    164       if (_usage & USE_SYSTEMC)
     177      if (_usage & USE_SYSTEMC_INTERFACE)
    165178        {
    166179          port = new sc_out <T> (sig->_name.c_str());
     
    172185        }
    173186
    174       log_printf(FUNC,Behavioural,"set_signal_out","End");
    175 
    176       return port;
    177     };
    178 
     187      log_end(Behavioural,FUNCTION);
     188
     189      return port;
     190    };
     191
     192#undef  FUNCTION
     193#define FUNCTION "Interface::set_signal_internal"
    179194  public    : template <typename T>
    180195              sc_signal <T> *       set_signal_internal (std::string   name,
    181196                                                         uint32_t size)
    182197    {
    183       log_printf(FUNC,Behavioural,"set_signal_internal","Begin");
     198      log_begin(Behavioural,FUNCTION);
     199
     200      LowerCase(name);
    184201
    185202      Signal * sig = set_signal (name, INTERNAL , size, PORT_VHDL_NO_TESTBENCH_NO);
    186203      sc_signal <T> * port;
    187204
    188       if (_usage & USE_SYSTEMC)
     205      if (_usage & USE_SYSTEMC_INTERFACE)
    189206        {
    190207          port = new sc_signal <T> (sig->_name.c_str());
     
    196213        }
    197214
    198       log_printf(FUNC,Behavioural,"set_signal_internal","End");
     215      log_end(Behavioural,FUNCTION);
    199216
    200217      return port;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h

    r112 r113  
    4040  public  : model_type_t      get_type  (std::string component);
    4141  public  : debug_verbosity_t get_debug (std::string component);
     42  public  : void              print     (void);
    4243  };
    4344 
    4445}; // end namespace behavioural         
     46
     47  template<> inline std::string toString<morpheo::behavioural::model_type_t>(const morpheo::behavioural::model_type_t& x)
     48  {
     49    switch (x)
     50      {
     51      case morpheo::behavioural::MODEL_SYSTEMC : return "systemc" ; break;
     52      case morpheo::behavioural::MODEL_VHDL    : return "vhdl"    ; break;
     53      default : return ""; break;
     54      }
     55  };
    4556
    4657  template<> inline morpheo::behavioural::model_type_t fromString<morpheo::behavioural::model_type_t>(const std::string& x)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h

    r88 r113  
    3333  class Parameters
    3434  {
     35  public   :        const std::string _type;
     36
    3537    // -----[ fields ]----------------------------------------------------
    3638  public   : static const uint32_t   _size_instruction              = 32;
     
    127129    // -----[ methods ]---------------------------------------------------
    128130  public   :                            Parameters (void);
     131  public   :                            Parameters (std::string type);
    129132  public   : virtual                   ~Parameters ();
    130133       
     
    132135  public   : virtual std::string        print       (uint32_t depth) = 0;
    133136  public   : virtual Parameters_test    msg_error   (void) = 0;
     137  public   : virtual std::string        id          (void) const {return "";}
    134138
    135139    // methods to copy depends parameters
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r88 r113  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    9090  public    : type_info_t       get_type_info           (void);
    9191
     92  public    : void *            get_sc_signal           (void);
     93
    9294  public    : bool              presence_vhdl           (void);
    9395  public    : bool              presence_testbench      (void);
     
    174176      else
    175177        _type_info = UNKNOW;
    176 
     178     
    177179      log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s (%s, 0x%.8x)", _name.c_str(),toString(_type_info).c_str(), static_cast<uint32_t>(reinterpret_cast<uint64_t>(_sc_signal_map)));
    178180
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h

    r88 r113  
    22#define morpheo_behavioural_Usage_h
    33
     4#include "Common/include/Environment.h"
    45#include <stdint.h>
    56
     
    78namespace behavioural {
    89
    9   typedef uint8_t Tusage_t;
     10  typedef uint16_t Tusage_t;
    1011
    11 #  define USE_SYSTEMC               0x01
    12 #  define USE_VHDL                  0x02
    13 #  define USE_VHDL_TESTBENCH        0x04
    14 #  define USE_VHDL_TESTBENCH_ASSERT 0x08
    15 #  define USE_POSITION              0x10
    16 #  define USE_STATISTICS            0x20
    17 #  define USE_INFORMATION           0x40
    18 #  define USE_HEADER                0x80
    19 //#define USE_                      0x80
     12#  define USE_SYSTEMC               0x003
     13#  define USE_SYSTEMC_INTERFACE     0x001
     14#  define USE_SYSTEMC_BODY          0x002
     15#  define USE_VHDL                  0x004
     16#  define USE_VHDL_TESTBENCH        0x008
     17#  define USE_VHDL_TESTBENCH_ASSERT 0x010
     18#  define USE_POSITION              0x020
     19#  define USE_STATISTICS            0x040
     20//#define USE_INFORMATION           0x080
     21#  define USE_HEADER                0x100
     22#  define USE_COSIMULATION          0x200
     23//#define USE_                      0x400
    2024
    2125#  define USE_NONE                  0x00
    22 //#define USE_ALL                   0xff
    2326#  define USE_ALL                   usage_all()
    2427
    25 
     28#ifdef MODELSIM_COSIMULATION
     29  Tusage_t usage_cosimulation(Tusage_t usage);
     30#endif
    2631  Tusage_t usage_set         (Tusage_t usage, Tusage_t flag);
    2732  Tusage_t usage_unset       (Tusage_t usage, Tusage_t flag);
    2833  bool     usage_is_set      (Tusage_t usage, Tusage_t flag);
    29   void    usage_environment (Tusage_t usage);
     34  Tusage_t usage_environment (Tusage_t usage);
    3035  Tusage_t usage_all         (void);
    3136
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r112 r113  
    1010#define MORPHEO_MAJOR_VERSION "0"
    1111#define MORPHEO_MINOR_VERSION "2"
    12 #define MORPHEO_REVISION      "112"
     12#define MORPHEO_REVISION      "113"
    1313#define MORPHEO_CODENAME      "Castor"
    1414
    15 #define MORPHEO_DATE_DAY      "18
    16 #define MORPHEO_DATE_MONTH    "03"
     15#define MORPHEO_DATE_DAY      "14
     16#define MORPHEO_DATE_MONTH    "04"
    1717#define MORPHEO_DATE_YEAR     "2009"
    1818
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h

    r98 r113  
    77 * $Id$
    88 *
    9  * [ Description ]
     9 * [ Description ]
    1010 *
    1111 */
     
    1414#include <iostream>
    1515#include <list>
     16#include <map>
    1617#include "Common/include/Environment.h"
    1718#include "Behavioural/include/Direction.h"
     
    2324  namespace behavioural          {
    2425
     26#define VHDL_EXTENSION ".vhdl"
     27
     28    typedef enum
     29      {
     30        VHDL_SEVERITY_NOTE   ,
     31        VHDL_SEVERITY_WARNING,
     32        VHDL_SEVERITY_ERROR  ,
     33        VHDL_SEVERITY_FAILURE
     34      } vhdl_severity_t;
     35   
    2536    std::string  std_logic        (uint32_t size);
    2637    std::string  std_logic_conv   (uint32_t size, std::string   value);
     
    3748    class Vhdl
    3849    {
    39       // -----[ fields ]----------------------------------------------------
    40     private   : const std::string     _name                         ;
    41 
    42     private   : std::list<std::string>     _list_library_work            ;
    43     private   : std::list<std::string>     _list_signal                  ;
    44     private   : std::list<std::string>     _list_type                    ;
    45     private   : std::list<std::string>     _list_alias                   ;
    46     private   : std::list<std::string>     _list_port                    ;
    47     private   : std::list<std::string>     _list_body                    ;
    48 
    49       // -----[ methods ]---------------------------------------------------
    50     public    :                  Vhdl                        (std::string name);
     50      typedef struct
     51      {
     52        std::list<std::string> _list_signal;
     53        std::list<std::string> _list_type  ;
     54        std::list<std::string> _list_alias ;
     55        std::list<std::string> _list_body  ;
     56        std::list<std::string> _list_debug ;
     57      } vhdl_architecture_t;
     58
     59      // -----[ fields ]----------------------------------------------------
     60    private   : const std::string                         _name;
     61    private   : const std::string                         _id;
     62
     63    private   : std::list<std::string>                    _list_library;
     64      // Entity
     65//  private   : std::string                               _port_clock;
     66    private   : std::list<std::string>                    _list_port;
     67      // Architecture
     68    public    : const std::string                         _name_architecture_default;
     69    private   :       std::string                         _name_architecture;
     70    private   : std::map<std::string,vhdl_architecture_t> _architecture;
     71
     72      // -----[ methods ]---------------------------------------------------
     73    public    :                  Vhdl                        (std::string name,
     74                                                              std::string id="");
    5175    public    :                  ~Vhdl                       ();
    5276
     
    6488    private   : std::string      get_model                   (uint32_t    depth                 ,
    6589                                                              std::string filename              ,
    66                                                               std::string entity_name           ,
    67                                                               std::string architecture_name     );
     90                                                              std::string entity_name           );
    6891    private   : std::string      get_header                  (uint32_t    depth                 ,
    6992                                                              std::string filename              );
    7093    private   : std::string      get_entity                  (uint32_t    depth                 ,
    7194                                                              std::string name                  );
     95    private   : void             test_architecture           (void);
     96    private   : std::string      test_architecture           (std::string name                  );
     97    public    : std::string      set_architecture            (std::string name                  );
    7298    private   : std::string      get_architecture            (uint32_t    depth                 ,
    73                                                               std::string name                  ,
    7499                                                              std::string entity_name           );
     100    private   : std::string      get_configuration           (uint32_t    depth                 ,
     101                                                              std::string entity_name           ,
     102                                                              std::string configuration_name    );
    75103    private   : std::string      get_component               (uint32_t    depth                 ,
    76104                                                              std::string name                  );
     
    83111                                                              direction_t direction             ,
    84112                                                              uint32_t    size                  );
     113//  public    : void             set_port_clock              (std::string name                  );
    85114    private   : std::string      get_signal                  (uint32_t    depth                 );
    86115    public    : void             set_signal                  (std::string name                  ,
     
    136165    public    : void             set_body_component          (std::string  name_instance        ,
    137166                                                              std::string  name_component       ,
     167                                                              std::string  name_architecture    ,
     168                                                              std::string  name_package         ,
    138169                                                              std::list<std::string>   list_port_map);
    139170    public    : void             set_body_component_port_map (std::list<std::string> & list_port_map,
     
    147178                                                              std::string  text                 );
    148179
    149     private   : std::string      get_library_ieee            (uint32_t     depth                );
    150     private   : std::string      get_library_work            (uint32_t     depth                );
     180    public    : void             set_debug                   (std::string  condition            ,
     181                                                              std::string  text                 ,
     182                                                              vhdl_severity_t severity = VHDL_SEVERITY_NOTE);
     183    private   : std::string      get_debug                   (uint32_t     depth                );
     184
     185    private   : std::string      get_library                 (uint32_t     depth                );
     186    private   : std::string      get_library_default         (uint32_t     depth                );
     187    private   : void             set_library_default         (void                              );
     188    public    : void             set_library                 (std::string  library_name         ,
     189                                                              std::string  package_name         ,
     190                                                              std::string  declarative_unit="all");
    151191    public    : void             set_library_work            (std::string  package_name         );
    152192
     
    154194    };
    155195
     196    std::string vhdl_get_id (std::string model_name);
     197
    156198  }; // end namespace behavioural         
     199
     200  template<> inline std::string toString<morpheo::behavioural::vhdl_severity_t>(const morpheo::behavioural::vhdl_severity_t& x)
     201  {
     202    switch (x)
     203      {
     204      case morpheo::behavioural::VHDL_SEVERITY_NOTE    : return "note"   ; break;
     205      case morpheo::behavioural::VHDL_SEVERITY_WARNING : return "warning"; break;
     206      case morpheo::behavioural::VHDL_SEVERITY_ERROR   : return "error"  ; break;
     207      case morpheo::behavioural::VHDL_SEVERITY_FAILURE : return "failure"; break;
     208      default : return ""; break;
     209      }
     210  };
     211
    157212}; // end namespace morpheo             
    158213
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp

    r81 r113  
    1515  {
    1616    log_printf(FUNC,Behavioural,"Component::Component","Begin");
     17    _entity = NULL;
    1718    _list_component = new std::list<Tcomponent_t *>;
    1819    log_printf(FUNC,Behavioural,"Component::Component","End");
     
    3132  {
    3233    log_printf(FUNC,Behavioural,"Component::~Component","Begin");
    33     delete _entity;
     34    if (_entity != NULL)
     35      delete _entity;
     36    while (not _list_component->empty())
     37      {
     38        delete _list_component->front();
     39        _list_component->pop_front();
     40      }
    3441    delete _list_component;
    3542    log_printf(FUNC,Behavioural,"Component::~Component","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp

    r88 r113  
    8080        Signal * signal_productor;
    8181        Entity * entity_productor;
     82        Signal * signal_consumer ;
     83        Entity * entity_consumer ;
    8284
    8385        bool     src_is_productor = (signal_src->get_direction() == OUT);
     
    8587        if (src_is_productor == true)
    8688          {
    87             signal_productor = signal_src;
    88             entity_productor = entity_src;
     89            signal_productor = signal_src ;
     90            entity_productor = entity_src ;
     91            signal_consumer  = signal_dest;
     92            entity_consumer  = entity_dest;
    8993          }
    9094        else
     
    9296            signal_productor = signal_dest;
    9397            entity_productor = entity_dest;
     98            signal_consumer  = signal_src ;
     99            entity_consumer  = entity_src ;
    94100          }
    95101
    96102        // Create internal signal
    97         signal_dest= signal_internal (entity_productor, signal_productor);
     103        signal_dest= signal_internal (entity_productor,
     104                                      signal_productor,
     105                                      entity_consumer ,
     106                                      signal_consumer );
    98107        signal_dest->set_size_max(signal_src->get_size());
    99108      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp

    r82 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    2121#endif
    2222                                 ,Tinstance_t instance
     23                                 ,std::string architecture
    2324                                 )
    2425  {
     
    2930    Tcomponent_t * entry = new Tcomponent_t;
    3031   
    31     entry->_component= component;
    32     entry->_instance = instance;
    33     entry->_entity   = entity;
     32    entry->_component    = component;
     33    entry->_instance     = instance;
     34    entry->_architecture = architecture;
     35    entry->_entity       = entity;
    3436
    3537    _list_component->push_back(entry);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp

    r81 r113  
    1313#undef  FUNCTION
    1414#define FUNCTION "Component::set_entity"
    15   Entity * Component::set_entity (std::string        name   
    16                                   ,std::string        type   
     15  Entity * Component::set_entity (std::string  name
     16                                  ,std::string type
    1717#ifdef POSITION
    18                                   ,schema_t      schema
     18                                  ,schema_t    schema
    1919#endif
    2020                                  )
    2121  {
    2222    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     23
     24    if (_entity != NULL)
     25      throw ERRORMORPHEO(FUNCTION,_("Entity is already allocated.\n"));
    2326   
    2427    Entity * entity = new Entity (name   
     
    2932                                  ,_usage
    3033                                  );
     34
    3135    _entity = entity;
    3236   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp

    r81 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    1414#define FUNCTION "Component::signal_internal"
    1515  Signal * Component::signal_internal (Entity * entity_productor,
    16                                        Signal * signal_productor)
     16                                       Signal * signal_productor,
     17                                       Entity * entity_consumer,
     18                                       Signal * signal_consumer)
    1719  {
    1820    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1921
     22    bool productor_is_cosimulation = usage_is_set(entity_productor->get_usage(),USE_COSIMULATION);
     23    bool consumer_is_cosimulation  = usage_is_set(entity_consumer ->get_usage(),USE_COSIMULATION);
     24    bool is_cosimulation           = consumer_is_cosimulation or productor_is_cosimulation;
     25    if (productor_is_cosimulation and consumer_is_cosimulation)
     26      throw ERRORMORPHEO (FUNCTION,toString(_("Entity \"%s\" and Entity \"%s\" use both cosimulation. It's not supported.\n"),entity_productor->get_name().c_str(),entity_consumer->get_name().c_str()));
     27   
    2028    // create name of internal's signal
    21     std::string str_entity = entity_productor->get_name();
    22     std::string str_signal = signal_productor->get_name();
     29    Entity * entity = (consumer_is_cosimulation)?entity_consumer:entity_productor;
     30    Signal * signal = (consumer_is_cosimulation)?signal_consumer:signal_productor;
     31
     32    std::string str_entity = entity->get_name();
     33    std::string str_signal = signal->get_name();
    2334   
    24     UpperCase (str_entity);
    25     UpperCase (str_signal);
     35//     UpperCase (str_entity);
     36//     UpperCase (str_signal);
    2637   
    27     std::string name_internal = "internal_"+str_entity+"_"+str_signal;
     38    std::string name_internal = (is_cosimulation)?str_signal:("internal_"+str_entity+"_"+str_signal);
    2839   
    2940    // test if internal's signal exist ... else, create
     
    3849       
    3950        if (interface == NULL)
    40           throw (ErrorMorpheo ("<Component::port_map> Component \""+_entity->get_name()+"\", doesn't have an interface \"\"."));
    41        
    42         std::string signame = entity_productor->get_name()+"_"+signal_productor->get_name();
    43        
     51          throw ERRORMORPHEO (FUNCTION,toString(_("Component \"%s\", doesn't have an interface \"\".\n"),_entity->get_name().c_str()));
     52
     53//      std::string signame   = entity->get_name()+"_"+signal->get_name();
     54        std::string signame   = name_internal;
     55        type_info_t type_info = signal->get_type_info();
     56
    4457        // Signal's creation
    45         switch (signal_productor->get_type_info())
     58        switch (type_info)
    4659          {
    47           case BOOL     :
    48             {
    49               interface->set_signal_internal<bool    >(signame, signal_productor->get_size());
    50               break;
    51             }
    52           case UINT8_T  :
    53             {
    54               interface->set_signal_internal<uint8_t >(signame, signal_productor->get_size());
    55               break;
    56             }
    57           case UINT16_T :
    58             {
    59               interface->set_signal_internal<uint16_t>(signame, signal_productor->get_size());
    60               break;
    61             }
    62           case UINT32_T :
    63             {
    64               interface->set_signal_internal<uint32_t>(signame, signal_productor->get_size());
    65               break;
    66             }
    67           case UINT64_T :
    68             {
    69               interface->set_signal_internal<uint64_t>(signame, signal_productor->get_size());
    70               break;
    71             }
    72           default       :
    73             throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
     60          case BOOL     : interface->set_signal_internal<bool    >(signame, signal->get_size()); break;
     61          case UINT8_T  : interface->set_signal_internal<uint8_t >(signame, signal->get_size()); break;
     62          case UINT16_T : interface->set_signal_internal<uint16_t>(signame, signal->get_size()); break;
     63          case UINT32_T : interface->set_signal_internal<uint32_t>(signame, signal->get_size()); break;
     64          case UINT64_T : interface->set_signal_internal<uint64_t>(signame, signal->get_size()); break;
     65          default       :throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
    7466          }
    7567       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp

    r95 r113  
    9292        while (i != list_component->end())
    9393          {
    94             Entity *    entity   = (*i)->_entity;
    95             Tinstance_t instance = (*i)->_instance;
     94            Entity *    entity       = (*i)->_entity;
     95            Tinstance_t instance     = (*i)->_instance;
     96            std::string architecture = (*i)->_architecture;
     97            std::string package      = "work";
    9698           
    9799            if (instance & INSTANCE_LIBRARY)
     
    176178                    }
    177179                }
    178               vhdl->set_body_component ("instance_"+entity->get_name(),entity->get_name(),list_port_map);
     180              vhdl->set_body_component ("instance_"+entity->get_name(),
     181                                        entity->get_name(),
     182                                        architecture,
     183                                        package,
     184                                        list_port_map);
    179185             
    180186            }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp

    r112 r113  
    7373         it != _list_signal->end();
    7474         ++it)
    75       delete (*it);
     75      {
     76        if ((_usage & USE_SYSTEMC) and
     77            ((*it)->get_direction() == INTERNAL))
     78          delete (*it)->get_sc_signal();
     79        delete (*it);
     80      }
    7681   
    7782    delete _list_signal;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp

    r94 r113  
    3434          while (i != _list_cycle->end())
    3535            {
    36               vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity NOTE;");
    37               vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;");
     36              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
     37              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
    3838              j++;
    3939              ++i;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp

    r81 r113  
    99#include "Behavioural/include/Interface_fifo.h"
    1010#include "Behavioural/include/Entity.h"
     11#include "Common/include/Systemc.h"
    1112
    1213namespace morpheo              {
     
    1819
    1920    // note : if defined(VHDL_TESTBENCH) then defined(SYSTEMC)
    20     _list_cycle->push_back(static_cast<uint32_t>(sc_simulation_time()));
     21    _list_cycle->push_back(static_cast<uint32_t>(simulation_cycle()));
    2122
    2223    log_printf(FUNC,Behavioural,"testbench_cycle","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp

    r81 r113  
    1515  {
    1616    log_printf(FUNC,Behavioural,"find_signal","Begin");
     17
     18    LowerCase(name);
    1719
    1820    std::list<Signal*>::iterator i   = _list_signal->begin();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp

    r81 r113  
    2626          }
    2727      }
     28
    2829    log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
    2930  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp

    r112 r113  
    1111namespace behavioural          {
    1212
     13#undef  FUNCTION
     14#define FUNCTION "Interface::set_signal"
    1315  Signal * Interface::set_signal (std::string     name     ,
    1416                                  direction_t     direction,
     
    1618                                  presence_port_t presence_port)
    1719  {
    18     log_printf(FUNC,Behavioural,"set_signal","Begin");
     20    log_begin(Behavioural,FUNCTION);
    1921
    2022    std::string signame = signal_name(_name, name, direction);
     
    2426    _list_signal->push_back (sig);
    2527
    26     log_printf(FUNC,Behavioural,"set_signal","End");
     28    log_end(Behavioural,FUNCTION);
    2729
    2830    return sig;
     
    3638  void Interface::set_signal (Vhdl * & vhdl)
    3739  {
    38     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     40    log_begin(Behavioural,FUNCTION);
    3941    if (not _list_signal->empty())
    4042      {
     
    4749          }
    4850      }
    49     log_printf(FUNC,Behavioural,FUNCTION,"End");
     51    log_end(Behavioural,FUNCTION);
    5052  };
    5153#  endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp

    r81 r113  
    1717    log_printf(FUNC,Behavioural,"signal_name","Begin");
    1818
    19     std::string str_direction = toString(direction);
     19    std::string str_direction = (direction==INTERNAL)?"":toString(direction);
    2020    std::string str_interface = name_interface;
    2121    std::string str_signal    = name_signal;
    2222
    23     LowerCase(str_direction);   
    24     UpperCase(str_interface);
    25     UpperCase(str_signal   );
     23//     LowerCase(str_direction);   
     24//     LowerCase(str_interface);
     25//     LowerCase(str_signal   );
    2626   
    27     std::string signame = str_direction;
     27    std::string signame = "";
     28    bool need_underscore = false;
     29
     30    if (str_direction != "")
     31      {
     32        signame +=                            str_direction;
     33        need_underscore = true;
     34      }
    2835    if (str_interface != "")
    29       signame += "_"+str_interface;
    30     if (str_signal    != "")
    31       signame += "_"+str_signal;
     36      {
     37        signame += ((need_underscore)?"_":"")+str_interface;
     38        need_underscore = true;
     39      }
     40    if (str_signal != "")
     41      {
     42        signame += ((need_underscore)?"_":"")+str_signal;
     43//      need_underscore = true;
     44      }
    3245
    3346    log_printf(FUNC,Behavioural,"signal_name","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp

    r112 r113  
    1111namespace behavioural          {
    1212
    13   Interfaces::Interfaces  (std::string   name,
     13  Interfaces::Interfaces  (std::string name,
    1414                           Tusage_t usage):
    1515    _name  (name),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp

    r81 r113  
    2727            ++i;
    2828          }
     29
     30//         Signal * clock = get_clock();
     31//         if (clock != NULL)
     32//           vhdl->set_port_clock (clock->get_name());
    2933      }
     34
    3035    log_printf(FUNC,Behavioural,FUNCTION,"End");
    3136  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp

    r94 r113  
    6666    vhdl->set_body("");
    6767    vhdl->set_body("-- if the systemC simulate have multiple reset, we make the last");
    68     vhdl->set_body(reset_name+" <= '1' after 150 ns;");   
     68    vhdl->set_body(reset_name+" <= '1' after "+toString(2.*VHDL_TIME_PERIOD)+" "+toString(VHDL_TIME_UNIT)+";");   
    6969
    7070    vhdl->set_body("");
     
    7373    vhdl->set_body("------------------------------------------------------");
    7474    vhdl->set_body("");
    75     vhdl->set_body(clock_name+" <= not "+clock_name+" after 50 ns;");
     75    vhdl->set_body(clock_name+" <= not "+clock_name+" after "+toString(VHDL_TIME_PERIOD/2.)+" "+toString(VHDL_TIME_UNIT)+";");
    7676    vhdl->set_body("");
    7777    vhdl->set_body("process ("+clock_name+")");
     
    8989#ifdef VHDL_TESTBENCH_ASSERT
    9090    for (uint32_t cpt=0; cpt<=cycle; cpt++)
    91       vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity NOTE;");
     91      vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
    9292
    9393    for (std::list<Interface_fifo*>::iterator it=_list_interface->begin();
     
    106106
    107107    vhdl->set_body("");
    108     vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
    109     vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");
     108    vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity "+toString(VHDL_SEVERITY_FAILURE)+";");
     109    vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity "+toString(VHDL_SEVERITY_FAILURE)+";");
    110110    vhdl->set_body("\t\tend if;");
    111111    vhdl->set_body("\tend if;");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp

    r112 r113  
    1212
    1313#undef  FUNCTION
    14 #define FUNCTION "Model::get_type"
     14#define FUNCTION "Model::set_model"
    1515  void Model::set_model (std::string component, model_type_t type, debug_verbosity_t debug)
    1616  {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp

    r81 r113  
    1313#undef  FUNCTION
    1414#define FUNCTION "Parameters::Parameters"
    15   Parameters::Parameters  (void)
     15  Parameters::Parameters  (void) :
     16    _type ("")
     17  {
     18    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     19    log_printf(FUNC,Behavioural,FUNCTION,"End");
     20  };
     21
     22#undef  FUNCTION
     23#define FUNCTION "Parameters::Parameters"
     24  Parameters::Parameters  (std::string type) :
     25    _type (type)
    1626  {
    1727    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp

    r88 r113  
    2020    Parameters_test x = msg_error();
    2121   
    22     std::cerr << x.print();
     22    msg("%s",x.print().c_str());
    2323
    2424    if (x.have_error())
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp

    r81 r113  
    1111namespace behavioural          {
    1212
    13   Signal::Signal  (std::string          name         ,
     13  Signal::Signal  (std::string     name         ,
    1414                   direction_t     direction    ,
    1515                   uint32_t        size         ,
     
    2020  {
    2121    log_printf(FUNC,Behavioural,"Signal","Begin");
    22     _size                     = size;
     22
    2323    _is_allocate              = false;
    2424    _is_map_as_component_src  = false;
     
    3333    _list_value          = new std::list<std::string>;
    3434#endif
     35    set_size(size);
    3536   
    3637    if (_size == 0)
    3738      throw ERRORMORPHEO(FUNCTION,"Size of signal '"+_name+"' is nul");
    38 
    3939
    4040    log_printf(FUNC,Behavioural,"Signal","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp

    r81 r113  
    77
    88#include "Behavioural/include/Signal.h"
    9 
     9#include "Common/include/Environment.h"
    1010
    1111namespace morpheo              {
     
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919    uint32_t _return = _size;
     20
     21#ifdef MODELSIM_COSIMULATION
     22    switch (_type_info)
     23      {
     24      case BOOL     : _return =  1; break;
     25      case UINT8_T  : _return =  8; break;
     26      case UINT16_T : _return = 16; break;
     27      case UINT32_T : _return = 32; break;
     28      case UINT64_T : _return = 64; break;
     29      default       : break;
     30      }
     31#endif
     32
    2033    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2134
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r88 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp

    r81 r113  
    1313
    1414#undef  FUNCTION
    15 #define FUNCTION "Signal::presence_vhdl"
    16   bool Signal::presence_vhdl (void)
     15#define FUNCTION "Signal::presence_testbench"
     16  bool Signal::presence_testbench (void)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp

    r81 r113  
    2121        (_presence_port == CLOCK_VHDL_YES)              or
    2222        (_presence_port == RESET_VHDL_YES))
    23       vhdl->set_port (_name,_direction,_size);
     23      vhdl->set_port (_name,_direction,get_size());
    2424
    2525    log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
     
    3838//      or (_presence_port == RESET_VHDL_NO )
    3939        )
    40       vhdl->set_signal (_name        ,_size);
     40      vhdl->set_signal (_name        ,get_size());
    4141
    4242    if (_direction == OUT)
    43       vhdl->set_signal (_name+"_test",_size);
     43      vhdl->set_signal (_name+"_test",get_size());
    4444
    4545    log_printf(FUNC,Behavioural,"set_signal (Vhdl)","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp

    r81 r113  
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919    _size = size;
     20
    2021    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2122  };
     
    2728    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2829    if (size > _size)
    29       _size = size;
     30      set_size(size);
    3031    log_printf(FUNC,Behavioural,FUNCTION,"End");
    3132  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp

    r81 r113  
    4444              switch (_direction)
    4545                {
    46                 case IN    : {str =             toBase2 (value,_size); break;}
    47                 case OUT   : {str =             toBase2 (value,_size); break;}
     46                case IN    : {str =             toBase2 (value,get_size()); break;}
     47                case OUT   : {str =             toBase2 (value,get_size()); break;}
    4848                default    : {break;}
    4949                }
     
    5656              switch (_direction)
    5757                {
    58                 case IN    : {str =             toBase2 (value,_size); break;}
    59                 case OUT   : {str =             toBase2 (value,_size); break;}
     58                case IN    : {str =             toBase2 (value,get_size()); break;}
     59                case OUT   : {str =             toBase2 (value,get_size()); break;}
    6060                default    : {break;}           
    6161                }
     
    6868              switch (_direction)
    6969                {
    70                 case IN    : {str =             toBase2 (value,_size); break;}
    71                 case OUT   : {str =             toBase2 (value,_size); break;}
     70                case IN    : {str =             toBase2 (value,get_size()); break;}
     71                case OUT   : {str =             toBase2 (value,get_size()); break;}
    7272                default    : {break;}
    7373                }
     
    8080              switch (_direction)
    8181                {
    82                 case IN    : {str =             toBase2 (value,_size); break;}
    83                 case OUT   : {str =             toBase2 (value,_size); break;}
     82                case IN    : {str =             toBase2 (value,get_size()); break;}
     83                case OUT   : {str =             toBase2 (value,get_size()); break;}
    8484                default    : {break;}
    8585                }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp

    r81 r113  
    2525        {
    2626          std::string separator;
    27           if (_size == 1)
     27          if (get_size() == 1)
    2828            separator = "\'";
    2929          else
     
    4848            }
    4949         
    50           if (_size == 1)
     50          if (get_size() == 1)
    5151            vhdl->set_body ("\t'0' when others;");
    5252          else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp

    r110 r113  
    88
    99#include "Behavioural/include/Simulation.h"
     10#include "Common/include/Systemc.h"
    1011
    1112namespace morpheo              {
     
    1415  bool simulation_test_end (void)
    1516  {
    16     msg("##########[ cycle %d ]\n",static_cast<uint32_t>(sc_simulation_time()));
     17    msg("##########[ cycle %d ]\n",static_cast<uint32_t>(simulation_cycle()));
    1718
    1819    // Test if a stop condition is activate
     
    2627
    2728    if (_simulation_nb_cycle != 0)
    28       end_cycle = (_simulation_nb_cycle <= sc_simulation_time());
     29      end_cycle = (_simulation_nb_cycle <= simulation_cycle());
    2930    else
    3031      end_cycle = true;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp

    r81 r113  
    11#ifdef STATISTICS
    22#include "Behavioural/include/Stat.h"
     3#include "Common/include/Systemc.h"
    34
    45namespace morpheo {
     
    67  void Stat::end_cycle (void)
    78  {
    8     cycle_t _cycle_sum = sc_simulation_time();
     9    cycle_t _cycle_sum = simulation_cycle();
    910
    1011    if (_cycle_sum >= _nb_cycle_before_begin)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp

    r88 r113  
    33#include "Behavioural/include/Version.h"
    44#include "Common/include/Environment.h"
     5#include "Common/include/Systemc.h"
    56
    67namespace morpheo {
     
    1314    std::string body = print(1);
    1415
    15     cycle_t _cycle_sum = sc_simulation_time();
     16    cycle_t _cycle_sum = simulation_cycle();
    1617
    1718    morpheo::behavioural::XML * xml = new morpheo::behavioural::XML (_name_instance);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp

    r88 r113  
    11#ifdef STATISTICS
    22#include "Behavioural/include/Stat.h"
     3#include "Common/include/Systemc.h"
    34
    45namespace morpheo {
     
    1213    end_simulation();
    1314
    14     cycle_t _cycle_sum = sc_simulation_time();
     15    cycle_t _cycle_sum = simulation_cycle();
    1516
    1617    morpheo::behavioural::XML xml (_name_instance);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp

    r88 r113  
    55namespace morpheo {
    66namespace behavioural {
     7
     8#ifdef MODELSIM_COSIMULATION
     9  Tusage_t usage_cosimulation(Tusage_t usage)
     10  {
     11    Tusage_t _return = usage;
     12//  _return = usage_unset(_return,USE_SYSTEMC              );
     13    _return = usage_unset(_return,USE_SYSTEMC_INTERFACE    );
     14    _return = usage_unset(_return,USE_SYSTEMC_BODY         );
     15    _return = usage_unset(_return,USE_VHDL                 );
     16    _return = usage_unset(_return,USE_VHDL_TESTBENCH       );
     17    _return = usage_unset(_return,USE_VHDL_TESTBENCH_ASSERT);
     18//  _return = usage_unset(_return,USE_POSITION             );
     19    _return = usage_unset(_return,USE_STATISTICS           );
     20//  _return = usage_unset(_return,USE_INFORMATION          );
     21//  _return = usage_unset(_return,USE_HEADER               );
     22    _return = usage_set  (_return,USE_COSIMULATION         );
     23   
     24    return _return;
     25  }
     26#endif
    727
    828  Tusage_t usage_set         (Tusage_t usage, Tusage_t flag)
     
    2242#undef  FUNCTION
    2343#define FUNCTION "usage_environment"
    24   void    usage_environment (Tusage_t usage)
     44  Tusage_t usage_environment (Tusage_t usage)
    2545  {
    2646#ifndef SYSTEMC
    27     if (usage_is_set(usage,USE_SYSTEMC))
    28       throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
     47    if (usage_is_set(usage,USE_SYSTEMC_INTERFACE))
     48      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_INTERFACE\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
     49    if (usage_is_set(usage,USE_SYSTEMC_BODY))
     50      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_BODY\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
    2951#endif
    3052#ifndef VHDL
     
    4870      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_STATISTICS\", but the macro's compiler \"STATISTICS\" is unset.\n"));
    4971#endif
    50 #ifndef INFORMATION
    51     if (usage_is_set(usage,USE_INFORMATION))
    52       throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));
    53 #endif
     72// #ifndef INFORMATION
     73//     if (usage_is_set(usage,USE_INFORMATION))
     74//       throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));
     75// #endif
    5476
    5577#ifndef DEBUG
    5678#endif
    5779
    58     if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC))
    59       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC\n"));
     80    if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC_BODY))
     81      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC_BODY\n"));
    6082   
    61     if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))
    62       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));
     83//     if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))
     84//       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));
    6385   
    64     if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC))
    65       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC\n"));
     86    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC_BODY))
     87      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC_BODY\n"));
    6688   
    6789    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_VHDL))
     
    7092    if (usage_is_set(usage,USE_VHDL_TESTBENCH_ASSERT) and not usage_is_set(usage,USE_VHDL_TESTBENCH))
    7193      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use an assert in vhdl's test bench, you must set flag USE_VHDL_TESTBENCH\n"));
     94
     95    return usage;
    7296  }
    7397
     
    77101
    78102#ifdef SYSTEMC
    79     usage = usage_set(usage,USE_SYSTEMC);
     103    usage = usage_set(usage,USE_SYSTEMC_INTERFACE);
     104    usage = usage_set(usage,USE_SYSTEMC_BODY);
    80105#endif
    81106#ifdef VHDL
     
    94119    usage = usage_set(usage,USE_STATISTICS);
    95120#endif
    96 #ifdef INFORMATION
    97     usage = usage_set(usage,USE_INFORMATION);
    98 #endif
     121// #ifdef INFORMATION
     122//     usage = usage_set(usage,USE_INFORMATION);
     123// #endif
    99124    usage = usage_set(usage,USE_HEADER);
    100125#ifdef DEBUG
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp

    r81 r113  
    1515#undef  FUNCTION
    1616#define FUNCTION "Vhdl::Vhdl"
    17   Vhdl::Vhdl  (std::string name):
    18     _name   (name)
     17  Vhdl::Vhdl  (std::string name,
     18               std::string id):
     19    _name                      (name),
     20    _id                        (id),
     21    _name_architecture_default ("morpheo_behavioural")
    1922  {
    2023    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     24
     25    _name_architecture = _name_architecture_default;
     26//  _port_clock        = "";
     27
     28    set_library_default();
     29
    2130    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2231  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp

    r98 r113  
    2222    directory();
    2323
    24     std::string filename = MORPHEO_VHDL + "/" + _name + ".vhdl";
     24    std::string filename = MORPHEO_VHDL + "/" + _name + VHDL_EXTENSION;
    2525   
    2626    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
     
    3030    file.open(filename.c_str(),std::ios::out | std::ios::trunc);
    3131
    32     file << get_model (0,filename,_name,"behavioural");
     32    file << get_model (0,filename,_name);
    3333    file.close();
    3434
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp

    r88 r113  
    44 * $Id$
    55 *
    6  * [ Description ]
     6 * [ Description ]
    77 *
    88 */
     
    2323
    2424    std::string name     = _name + "_Pack";
    25     std::string filename = MORPHEO_VHDL + "/" + name + ".vhdl";
     25    std::string filename = MORPHEO_VHDL + "/" + name + VHDL_EXTENSION;
    2626
    2727    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp

    r81 r113  
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    22     std::string _return = get_list(_list_alias, depth, ";", true);
     22
     23    test_architecture();
     24   
     25    std::string _return = get_list(_architecture[_name_architecture]._list_alias, depth, ";", true);
    2326    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2427
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp

    r94 r113  
    1111#include "Common/include/Tabulation.h"
    1212
    13 #include <sstream>
    14 
    1513namespace morpheo              {
    1614namespace behavioural          {
     
    1816#undef  FUNCTION
    1917#define FUNCTION "Vhdl::get_architecture"
    20   std::string Vhdl::get_architecture (uint32_t depth      ,
    21                                  std::string   name       ,
    22                                  std::string   entity_name)
     18  std::string Vhdl::get_architecture (uint32_t    depth      ,
     19                                      std::string entity_name)
    2320  {
    2421    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2522
    26     std::string        tab = morpheo::tab(depth);
    2723    std::ostringstream text;
     24    std::string name_architecture_old = _name_architecture;
     25    std::string tab=morpheo::tab(depth);
    2826
    29     text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl
    30          << tab << get_type     (depth+1)                                    << std::endl
    31          << tab << get_signal   (depth+1)                                    << std::endl
    32          << tab << get_alias    (depth+1)                                    << std::endl
    33          << tab << "begin"                                                   << std::endl
    34          << tab << get_body     (depth+1)                                    << std::endl
    35          << tab << "end " << name << ";"                                     << std::endl;
     27    for (std::map<std::string,vhdl_architecture_t>::iterator it = _architecture.begin();
     28         it!=_architecture.end();
     29         ++it)
     30      {
     31        std::string name = it->first;
     32        set_architecture(name);
     33
     34        text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl
     35             << tab << get_type     (depth+1)                                    << std::endl
     36             << tab << get_signal   (depth+1)                                    << std::endl
     37             << tab << get_alias    (depth+1)                                    << std::endl
     38             << tab << "begin"                                                   << std::endl
     39             << tab << get_body     (depth+1)                                    << std::endl
     40             << tab << "end " << name << ";"                                     << std::endl;
     41      }
     42
     43    set_architecture (name_architecture_old);
    3644
    3745    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp

    r81 r113  
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    22     std::string _return = get_list(_list_body,depth,"",true);
     22
     23    test_architecture();
     24    std::string _return = get_list(_architecture[_name_architecture]._list_body,depth,"",true);
     25
     26    _return = _return + get_debug(depth);
     27   
    2328    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2429
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp

    r98 r113  
    1212#include <time.h>
    1313#include <sstream>
     14#include <fstream>
    1415
    1516namespace morpheo              {
     
    2122                               std::string   filename)
    2223  {
    23     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     24    log_begin(Behavioural,FUNCTION);
    2425
    2526    std::string text;
     
    3233    text += "-- "+toString(_("Date    : ")) + ctime (&current_time );
    3334    text += "-- "+toString(_("Version : ")) + MORPHEO_HEADER +"\n";
     35    text += "-- "+toString(_("Id      : ")) + _id +"  \n";
    3436    text += "-- "+toString(_("Comment : ")) + _("it's a autogenerated file, don't modify") +"\n";
    3537    text += "-------------------------------------------------------------------------------\n";
    3638   
    37     log_printf(FUNC,Behavioural,FUNCTION,"End");
     39    log_end(Behavioural,FUNCTION);
    3840
    3941    return text;
     42  };
     43
     44#undef  FUNCTION
     45#define FUNCTION "vhdl_get_id"
     46  std::string vhdl_get_id(std::string model_name)
     47  {
     48    log_begin(Behavioural,FUNCTION);
     49
     50    std::string id="";
     51
     52    directory();
     53
     54    std::string filename = MORPHEO_VHDL + "/" + model_name + VHDL_EXTENSION;
     55    std::ifstream file;
     56
     57    file.open(filename.c_str(),std::ios::in);
     58
     59    // open file
     60    if (!file)
     61      {
     62        log_printf(INFO,Behavioural,FUNCTION,_("Can't open file : \"%s\""),filename.c_str());
     63      }
     64    else
     65      {
     66        // get line with Id
     67        do
     68          {
     69            std::getline(file,id,'\n'); // comment
     70          } while ((id.find("Id      :") == std::string::npos) and
     71                   (not file.eof()));
     72
     73        if (file.eof())
     74          log_printf(INFO,Behavioural,FUNCTION,_("\"Id\" not find in file : \"%s\""),filename.c_str());
     75        else
     76          {
     77            // get id
     78            id = id.substr(id.find_first_of(':',0)+1,std::string::npos);
     79
     80            // Erase all ' '
     81            size_t i=id.find_first_of(' ',0);
     82            while (i!=std::string::npos)
     83              {
     84                id.erase(i,i+1);
     85                i=id.find_first_of(' ',i);
     86              }
     87          }
     88      }
     89
     90    log_end(Behavioural,FUNCTION);
     91
     92    return id;
    4093  };
    4194 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library.cpp

    r111 r113  
    1616 
    1717#undef  FUNCTION
    18 #define FUNCTION "Vhdl::get_library_work"
    19   std::string Vhdl::get_library_work (uint32_t depth)
     18#define FUNCTION "Vhdl::get_library"
     19  std::string Vhdl::get_library (uint32_t depth)
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2222
    23     std::list<std::string>::iterator i   = _list_library_work.begin();
     23    std::list<std::string>::iterator i   = _list_library.begin();
    2424    std::string                 tab = morpheo::tab(depth);
    2525    std::ostringstream          text;
    2626
    27     if (i != _list_library_work.end())
    28       text << tab                    << std::endl
    29            << tab << "library work;" << std::endl
    30            << get_list(_list_library_work,depth,";",true);
     27    if (i != _list_library.end())
     28      text << get_list(_list_library,depth,";",true);
    3129
    3230    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp

    r81 r113  
    1717#undef  FUNCTION
    1818#define FUNCTION "Vhdl::get_list"
    19   std::string Vhdl::get_list (std::list<std::string> liste                ,
    20                               uint32_t     depth                ,
    21                               std::string       separator            ,
    22                               bool         last_separator       )
     19  std::string Vhdl::get_list (std::list<std::string> liste         ,
     20                              uint32_t               depth         ,
     21                              std::string            separator     ,
     22                              bool                   last_separator)
    2323  {
    2424    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp

    r94 r113  
    1515namespace behavioural          {
    1616 
    17   std::string Vhdl::get_model(uint32_t depth            ,
    18                          std::string   filename         ,
    19                          std::string   entity_name      ,
    20                          std::string   architecture_name)
     17  std::string Vhdl::get_model(uint32_t depth                 ,
     18                              std::string   filename         ,
     19                              std::string   entity_name      )
    2120  {
    2221    log_printf(FUNC,Behavioural,"get_model","Begin");
     
    2524    std::ostringstream text;
    2625
    27     text << tab << get_header       (depth,filename)                      << std::endl
    28          << tab << get_library_ieee (depth)                               << std::endl
    29          << tab << get_library_work (depth)                               << std::endl
    30          << tab << get_entity       (depth,entity_name)                   << std::endl
    31          << tab << get_architecture (depth,architecture_name,entity_name) << std::endl;
     26    std::string configuration_name = "configuration_"+entity_name;
     27
     28    text << tab << get_header       (depth,filename)    << std::endl
     29         << tab << get_library      (depth)             << std::endl
     30         << tab << get_entity       (depth,entity_name) << std::endl
     31         << tab << get_architecture (depth,entity_name) << std::endl
     32         << tab << get_configuration(depth,entity_name,configuration_name) << std::endl
     33      ;
    3234   
    3335    log_printf(FUNC,Behavioural,"get_model","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp

    r94 r113  
    2727    std::ostringstream text;
    2828
    29     text << tab << get_header       (depth,filename)                      << std::endl
    30          << tab << get_library_ieee (depth)                               << std::endl
    31          << tab << "package " << package_name << " is"                    << std::endl
    32          << tab << get_component    (depth+1,entity_name)                 << std::endl
    33          << tab << "end " << package_name << ";"                          << std::endl;
     29    text << tab << get_header          (depth,filename)     << std::endl
     30         << tab << get_library_default (depth)              << std::endl
     31         << tab << "package " << package_name << " is"      << std::endl
     32         << tab << get_component    (depth+1,entity_name)   << std::endl
     33         << tab << "end " << package_name << ";"            << std::endl;
    3434
    3535    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp

    r81 r113  
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    22     std::string _return = get_list (_list_signal, depth, ";", true);
     22
     23    test_architecture();
     24
     25    std::string _return = get_list (_architecture[_name_architecture]._list_signal, depth, ";", true);
     26
    2327    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2428
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp

    r81 r113  
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    22     std::string _return = get_list (_list_type, depth, ";", true);
     22
     23    test_architecture();
     24    std::string _return = get_list (_architecture[_name_architecture]._list_type, depth, ";", true);
     25
    2326    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2427
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp

    r81 r113  
    2323  {
    2424    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    25     set_list(_list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2);
     25   
     26    test_architecture();
     27   
     28    set_list(_architecture[_name_architecture]._list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2);
     29
    2630    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2731  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp

    r94 r113  
    3030  {
    3131    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    32     set_list(_list_body, morpheo::tab(depth)+text);
     32
     33    test_architecture();
     34
     35    set_list(_architecture[_name_architecture]._list_body, morpheo::tab(depth)+text);
    3336    log_printf(FUNC,Behavioural,FUNCTION,"End");
    3437  };
     
    4043  {
    4144    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     45
     46    test_architecture();
    4247   
    4348    std::string tab=morpheo::tab(depth);
    4449
    45     for (std::list<std::string>::iterator it=vhdl->_list_body.begin();
    46          it!=vhdl->_list_body.end();
     50    for (std::list<std::string>::iterator it=vhdl->_architecture[_name_architecture]._list_body.begin();
     51         it!=vhdl->_architecture[_name_architecture]._list_body.end();
    4752         ++it)
    48       set_list(_list_body,tab+*it);
     53      set_list(_architecture[_name_architecture]._list_body,tab+*it);
    4954
    5055    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp

    r81 r113  
    1717#undef  FUNCTION
    1818#define FUNCTION "Vhdl::set_body_component"
    19   void Vhdl::set_body_component (std::string         name_instance      ,
    20                                  std::string         name_component     ,
    21                                  std::list<std::string>   list_port_map      )
     19  void Vhdl::set_body_component (std::string            name_instance    ,
     20                                 std::string            name_component   ,
     21                                 std::string            name_architecture,
     22                                 std::string            name_package     ,
     23                                 std::list<std::string> list_port_map )
    2224  {
    2325    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2426
    25     set_body(name_instance + " : " + name_component);
     27    name_architecture = test_architecture(name_architecture);
     28
     29    set_body(name_instance + " : entity " + name_package + "." + name_component + " (" + name_architecture + ")");
     30//  set_body(name_instance + " : " + name_component);
    2631    set_body("port map (");
    27     set_list(_list_body, get_list(list_port_map, 1, ",", false));
     32    set_list(_architecture[name_architecture]._list_body, get_list(list_port_map, 1, ",", false));
    2833    set_body(");");
    2934
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp

    r95 r113  
    2222  {
    2323    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    24     set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
     24
     25    test_architecture();
     26   
     27    set_list(_architecture[_name_architecture]._list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
     28   
    2529    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2630  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_default.cpp

    r111 r113  
    44 * $Id$
    55 *
    6  * [ Description ]
     6 * [ Description ]
    77 *
    88 */
     
    1717 
    1818#undef  FUNCTION
    19 #define FUNCTION "Vhdl::get_library_ieee"
    20   std::string Vhdl::get_library_ieee (uint32_t depth)
     19#define FUNCTION "Vhdl::set_library_default"
     20  void Vhdl::set_library_default (void)
    2121  {
    22     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    23 
    24     std::string        tab = morpheo::tab(depth);
    25     std::ostringstream text;
    26 
    27     text << tab                                         << std::endl
    28          << tab << "library ieee;"                      << std::endl
    29          << tab << "  use ieee.numeric_bit.all;       " << std::endl
    30          << tab << "  use ieee.numeric_std.all;       " << std::endl
    31          << tab << "  use ieee.std_logic_1164.all;    " << std::endl
    32          << tab << "  use ieee.std_logic_arith.all;   " << std::endl
    33          << tab << "  use ieee.std_logic_misc.all;    " << std::endl
    34          << tab << "--use ieee.std_logic_signed.all;  " << std::endl
    35          << tab << "  use ieee.std_logic_unsigned.all;" << std::endl
    36          << tab << "--use ieee.std_logic_textio.all;  " << std::endl;
     22    log_begin(Behavioural,FUNCTION);
     23   
     24    set_library("ieee","numeric_bit"       ,"all");
     25    set_library("ieee","numeric_std"       ,"all");
     26    set_library("ieee","std_logic_1164"    ,"all");
     27    set_library("ieee","std_logic_arith"   ,"all");
     28    set_library("ieee","std_logic_misc"    ,"all");
     29//  set_library("ieee","std_logic_signed"  ,"all");
     30    set_library("ieee","std_logic_unsigned","all");
     31//  set_library("ieee","std_logic_textio"  ,"all");
    3732     
    38     log_printf(FUNC,Behavioural,FUNCTION,"End");
    39 
    40     return text.str();
     33    log_end(Behavioural,FUNCTION);
    4134  };
    4235 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp

    r81 r113  
    1919  void Vhdl::set_library_work (std::string      package_name)
    2020  {
    21     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    22     set_list(_list_library_work, "use work."+ package_name + ".all");
    23     log_printf(FUNC,Behavioural,FUNCTION,"End");
     21    log_begin(Behavioural,FUNCTION);
     22   
     23    set_library("work",package_name,"all");
     24
     25    log_end(Behavioural,FUNCTION);
    2426  };
    2527 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp

    r81 r113  
    3434    log_printf(FUNC,Behavioural,FUNCTION,"End");
    3535  };
     36
     37// #undef  FUNCTION
     38// #define FUNCTION "Vhdl::set_port_clock"
     39//   void Vhdl::set_port_clock (std::string name)
     40//   {
     41//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     42
     43//     _port_clock = name;
     44
     45//     log_printf(FUNC,Behavioural,FUNCTION,"End");
     46//   };
    3647   
    3748}; // end namespace behavioural         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp

    r95 r113  
    2222  {
    2323    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    24     set_list(_list_signal, "signal "+ name + "\t: " + type);
     24
     25    test_architecture();
     26
     27    set_list(_architecture[_name_architecture]._list_signal, "signal "+ name + "\t: " + type);
     28   
    2529    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2630  };
     
    3943  {
    4044    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    41     _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
     45
     46    test_architecture();
     47   
     48    _architecture[_name_architecture]._list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
     49
    4250    log_printf(FUNC,Behavioural,FUNCTION,"End");
    4351  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp

    r81 r113  
    2121  {
    2222    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    23     set_list(_list_type, "type "+ name + "\tis " + type);
     23
     24    test_architecture();
     25
     26    set_list(_architecture[_name_architecture]._list_type, "type "+ name + "\tis " + type);
     27
    2428    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2529  };
  • trunk/IPs/systemC/processor/Morpheo/Common/Makefile.defs

    r81 r113  
    55#
    66
     7ENTITY                          = Common
     8
    79#-----[ Directory ]----------------------------------------
    810DIR_COMPONENT_MORPHEO           = ..
  • trunk/IPs/systemC/processor/Morpheo/Common/Makefile.deps

    r81 r113  
    1616#-----[ Library ]------------------------------------------
    1717
     18Common_SOURCES          =       $(Common_DIR)/src/*.cpp
     19
    1820Common_LIBRARY          =       -lCommon
    1921
  • trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h

    r88 r113  
    4242  };
    4343
     44  template <typename T>
     45  T gen_mask_not   (uint32_t size)
     46  {
     47    return gen_mask_not<T>(size-1,0);
     48  };
     49
    4450  //............................................................................
    4551  // mask, mask_not ............................................................
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r112 r113  
    2424 */
    2525
     26#include "Common/include/Systemc.h"
    2627#include "Common/include/Message.h"
    2728#include "Common/include/FromString.h"
     
    6465#define debug_test_simulation_time                                      \
    6566  (not debug_cycle_test or                                              \
    66    ( (sc_simulation_time() >= debug_cycle_start) and                    \
    67     ((sc_simulation_time() <= debug_cycle_stop) or                      \
     67   ( (simulation_cycle() >= debug_cycle_start) and                    \
     68    ((simulation_cycle() <= debug_cycle_stop) or                      \
    6869      (debug_cycle_stop == -1))))
    6970#else
     
    149150  do                                                                    \
    150151    {                                                                   \
    151       log_printf(TRACE,component,func,_("[%d] %s.%s"),static_cast<uint32_t>(sc_simulation_time()),name,func); \
     152      log_printf(TRACE,component,func,_("[%d] %s.%s"),static_cast<uint32_t>(simulation_cycle()),name,func); \
    152153    } while(0)
    153154
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h

    r88 r113  
    1414
    1515#if (defined(STATISTICS) and not defined(SYSTEMC))
    16 #  error "To have the statistics, you must set flags SYSTEMC"
     16# error "To have the statistics, you must set flags SYSTEMC"
    1717#endif
    1818
    1919#if (defined(INFORMATION) and not defined(STATISTICS))
    20 #  error "To have the information, you must set flags STATISTICS"
     20# error "To have the information, you must set flags STATISTICS"
    2121#endif
    2222
    2323#if (defined(VHDL_TESTBENCH) and not defined(SYSTEMC))
    24 #  error "To have the vhdl's test bench, you must set flags SYSTEMC"
     24# error "To have the vhdl's test bench, you must set flags SYSTEMC"
    2525#endif
    2626
    2727#if (defined(VHDL_TESTBENCH) and not defined(VHDL))
    28 #  error "To have the vhdl's test bench, you must set flags VHDL"
     28# error "To have the vhdl's test bench, you must set flags VHDL"
    2929#endif
    3030
    3131#if (defined(VHDL_TESTBENCH_ASSERT) and not defined(VHDL_TESTBENCH))
    32 #  error "To have an assert in vhdl's test bench, you must set flags VHDL_TESTBENCH"
     32# error "To have an assert in vhdl's test bench, you must set flags VHDL_TESTBENCH"
    3333#endif
    3434
    3535#if (defined(VHDL_TESTBENCH) and defined(SYSTEMC))
    36 #  define SYSTEMC_VHDL_COMPATIBILITY
     36# define SYSTEMC_VHDL_COMPATIBILITY
    3737#endif
    3838
    3939#if (defined(DEBUG))
    40 #  define DEBUG_TEST
     40# define DEBUG_TEST
     41#endif
     42
     43#if defined(MTI_SYSTEMC) and defined(SYSTEMC) and defined(VHDL)
     44# define MODELSIM_COSIMULATION
    4145#endif
    4246
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h

    r97 r113  
    3333#  define MSG_INFORMATION   _("[1;32m[INFORMATION][0m")
    3434#  define MSG_BREAKPOINT    _("[1;38m[   BREAK   ][0m")
     35#  define MSG_VHDL          _("[1;34m[   VHDL    ][0m")
    3536#else
    3637#  define MSG_DEBUG         _("[   DEBUG   ]")
     
    3940#  define MSG_INFORMATION   _("[INFORMATION]")
    4041#  define MSG_BREAKPOINT    _("[   BREAK   ]")
     42#  define MSG_VHDL          _("[   VHDL    ]")
    4143#endif
    4244
     
    8486
    8587#define msg(arg...)             fmsg(stdout,arg)
     88#define err(arg...)             fmsgError(stderr,arg)
     89
    8690#define msgDebug(arg...)        fmsgDebug(stdout,arg)
    8791#define msgError(arg...)        fmsgError(stdout,arg)
    8892#define msgWarning(arg...)      fmsgWarning(stdout,arg)
    8993#define msgInformation(arg...)  fmsgInformation(stdout,arg)
    90 #define err(arg...)             fmsgError(stderr,arg)
    9194
    9295}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h

    r88 r113  
    1616#include "Common/include/ErrorMorpheo.h"
    1717#include "Common/include/ToString.h"
    18 
     18#include "Common/include/Systemc.h"
    1919namespace morpheo {
    2020
     
    2626inline void test_ko_error (void)
    2727{
    28   std::string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
     28  std::string msg = morpheo::toString(_("Test ko : error in test \"%d\""),num_test);
    2929  throw (morpheo::ErrorMorpheo (msg));
    3030}
     
    3333inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
    3434{
    35   fflush (stdout);
    36   fflush (stderr);
    37 
    38   std::cerr << "[" << num_test << "] : " << STR_KO
    39        << "\tline " << line                      << std::endl
    40        << " * Localisation"                      << std::endl
    41        << "   - File : " << file                 << std::endl
    42        << "   - Line : " << line                 << std::endl
    43        << " * Expression is different"           << std::endl
    44        << "   - exp1 : "+morpheo::toString(exp1) << std::endl
    45        << "   - exp2 : "+morpheo::toString(exp2) << std::endl;
     35  msgError(_("[%d] : %s\n"),num_test,STR_KO);
     36  msgError(_(" * Localisation\n"));
     37  msgError(_("   - File  : %s\n"),file);
     38  msgError(_("   - Line  : %d\n"),line);
     39  msgError(_(" * Expression is different\n"));
     40  msgError(_("   - exp1  : %s\n"),morpheo::toString(exp1).c_str());
     41  msgError(_("   - exp2  : %s\n"),morpheo::toString(exp2).c_str());
    4642
    4743  test_ko_error ();
     
    5046inline void test_ko (char * file, uint32_t line)
    5147{
    52   fflush (stdout);
    53   fflush (stderr);
    54 
    55   std::cerr << "[" << num_test << "] : " << STR_KO
    56        << "\tline " << line                           << std::endl
    57        << " * Localisation"                           << std::endl
    58        << "   - File : " << file                      << std::endl
    59        << "   - Line : " << line                      << std::endl;
     48  msgError(_("[%d] : %s\n"),num_test,STR_KO);
     49  msgError(_(" * Localisation\n"));
     50  msgError(_("   - File  : %s\n"),file);
     51  msgError(_("   - Line  : %d\n"),line);
    6052 
    6153  test_ko_error ();
     
    6456inline void test_ok ()
    6557{
    66   fflush (stdout);
    67   fflush (stderr);
    68 
    69   msg (_("[%d] : %s\n"), num_test,STR_OK);
     58  msgInformation (_("[%d] : %s\n"), num_test,STR_OK);
    7059
    7160  num_test ++;
     
    7463inline void test_ok (char * file, uint32_t line)
    7564{
    76   fflush (stdout);
    77   fflush (stderr);
    78 
    79   msg (_("[%d] : %s\n"), num_test,STR_OK);
    80   msg (_("\tline %d\n"), line);
     65  msgInformation (_("[%d] : %s (line %d)\n"), num_test,STR_OK,line);
     66  msgInformation (_("   - Line  : %d\n"), line);
    8167
    8268  num_test ++;
     
    8672inline void test_ok (char * file, uint32_t line, T exp)
    8773{
    88   fflush (stdout);
    89   fflush (stderr);
    90 
    91   msg (_("[%d] : %s\n"), num_test, STR_OK);
    92   msg (_("\tline %d\n"), line);
    93   msg (_("\tvalue %s\n"), (morpheo::toString(exp)).c_str());
     74  msgInformation (_("[%d] : %s\n"), num_test, STR_OK);
     75  msgInformation (_("   - Line  : %d\n"), line);
     76  msgInformation (_("   - Value : %s\n"), (morpheo::toString(exp)).c_str());
    9477
    9578  num_test ++;
     
    11295#define LABEL(str...)                                                   \
    11396  {                                                                     \
    114     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    115     msg (str);                                                          \
    116     msg (_("\n"));                                                      \
    117     fflush (stdout);                                                    \
     97    msgInformation (_("{%.0f} "),simulation_cycle());                \
     98    msg            (str);                                               \
     99    msg            (_("\n"));                                           \
    118100  } while(0)
    119101
     
    122104#endif
    123105
    124 #define SC_START(cycle_offset)                                          \
     106#define SC_CYCLE(cycle_offset)                                          \
    125107  do                                                                    \
    126108    {                                                                   \
    127       /*cout << "SC_START (begin)" << endl;*/                           \
     109      /*cout << "SC_CYCLE (begin)" << endl;*/                           \
    128110                                                                        \
    129       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
     111      double cycle_current = simulation_cycle();                        \
    130112      if (cycle_offset != 0)                                            \
    131113        {                                                               \
    132           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ] (" << __LINE__ << ")" << endl; \
     114          msgInformation(_("##########[ cycle %.0f ] (%d)\n"),cycle_current+cycle_offset,__LINE__); \
    133115        }                                                               \
    134116                                                                        \
     
    138120        }                                                               \
    139121                                                                        \
    140       sc_start(cycle_offset);                                           \
     122      simulation_run(cycle_offset);                                     \
    141123                                                                        \
    142       /*cout << "SC_START (end  )" << endl;*/                           \
     124      /*cout << "SC_CYCLE (end  )" << endl;*/                           \
    143125    } while(0)
    144126
    145 
     127// old support
     128#ifndef MTI_SYSTEMC
     129# define SC_START(x) SC_CYCLE(x)
     130#endif
    146131
    147132};
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h

    r97 r113  
    99#include <iostream>
    1010#include <sys/time.h>
     11#include "Common/include/Systemc.h"
    1112
    1213namespace morpheo {
     
    2829  {
    2930#ifdef SYSTEMC
    30     nb_cycles_begin = sc_simulation_time();
     31    nb_cycles_begin = simulation_cycle();
    3132#endif
    3233    gettimeofday(&time_begin,NULL);
     
    4849    if (x.systemc)
    4950      {
    50         double nb_cycles_end = sc_simulation_time();
     51        double nb_cycles_end = simulation_cycle();
    5152        double average       = static_cast<double>(nb_cycles_end-x.nb_cycles_begin+1) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
    5253       
  • trunk/IPs/systemC/processor/Morpheo/Common/src/MemCheck.cpp

    r112 r113  
    1010// Global flags set by macros in MemCheck.h
    1111bool traceFlag  = false;
    12 bool activeFlag = true;
     12bool activeFlag = false;
    1313
    1414namespace {
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Makefile.Documentation

    r91 r113  
    273273                        $(RM) $(DIR_SCHEMA_EPS);                        \
    274274                        $(RM) $(DVI_FILES) $(PS_FILES) $(PDF_FILES);    \
    275                         $(MAKE) clean_rec DIR_CLEAN=.;
     275                        $(MAKE) clean_rec DIR_CLEAN=$(PWD);
    276276
    277277clean_all               : clean
  • trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-03_vhdl_body.tex

    r100 r113  
    44
    55\Section{VHDL : comportement}\label{vhdl_body}
     6
     7\subSection{Description du fichier {\it Component\_vhdl\_body.cpp}}
    68
    79Le comportement du composant est défini dans le fichier  {\it Component\_vhdl\_body.cpp}.
     
    2325void set_comment (std::string text );
    2426\end{lstlisting}
     27
     28\subSection{Description du fichier {\it Component\_vhdl.cpp}}
     29Nous allons décrire ici le fichier {\it Component\_vhdl.cpp}.
     30
     31\lstparam{C++}
     32\begin{lstlisting}[caption={Component\_vhdl.cpp}, label=component_vhdl.cpp]
     33  void component::vhdl (void)
     34  {
     35    Vhdl * vhdl = new Vhdl (_name);
     36
     37    _interfaces->set_port(vhdl);
     38    _component->vhdl_instance(vhdl);
     39
     40    vhdl_declaration (vhdl);
     41    vhdl_body        (vhdl);
     42
     43    vhdl->generate_file();
     44
     45    delete vhdl;
     46  };
     47\end{lstlisting}
     48
     49
     50La première étape est d'éditer le fichier {\it Component\_vhdl.cpp}. Le listing \ref{component_vhdl.cpp} représente le contenu de ce fichier.
     51\begin{itemize}
     52\item Ligne 3 : Déclaration et construction de la variable {\it vhdl} qui est du  type {\it Vhdl}.
     53\item Ligne 5 : Ajout dans le modèle VHDL des interfaces présentes dans le modèle SystemC. (cf fichiers Component.h).
     54\item Ligne 6 : Ajout dans le modèle VHDL des composants internes  dans le modèle SystemC. (cf fichiers Component.h et Component\_allocation.cpp).
     55\item Ligne 8 : Ajout dans le modèle VHDL des déclarations définit dans le fichiers Component\_vhdl\_declaration.cpp (cf section \ref{vhdl_declaration}).
     56\item Ligne 9 : Ajout dans le modèle VHDL de la description comportemental définit dans le fichiers Component\_vhdl\_body.cpp (cf section \ref{vhdl_body}).
     57\item Ligne 11 : Génération des fichiers VHDL. Le nom du fichier est construit à partir du nom fourni lors de la construction de la variable {\it vhdl}.
     58\item Ligne 13 : Destruction de l'objet.
     59\end{itemize}
  • trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-04_vhdl_structural.tex

    r100 r113  
    55\Section{VHDL : structurelle}\label{vhdl_structural}
    66
    7 \subSection{Description du fichier {\it Component\_vhdl.cpp}}
     7%\subSection{Description du fichier {\it Component\_vhdl.cpp}}
    88Les modèles systemC structurels sont des modèles qui instancient d'autres modèles. Il n'y a pas de description comportementale. Ces modèles sont générés automatiquement.
    99Par contre, les modèles systemC comportementaux peuvent être décrit par un modèle VHDL mixte (incluant une description comportementale et des instances d'autre composant).
     
    1111Les modèles génériques sont dans le répertoire {\it IPs/systemC/processor/Morpheo/Behavioural/Generic}.
    1212
    13 \lstparam{C++}
    14 \begin{lstlisting}[caption={Component\_vhdl.cpp}, label=component_vhdl.cpp]
    15   void component::vhdl (void)
    16   {
    17     Vhdl * vhdl = new Vhdl (_name);
    18 
    19     _interfaces->set_port(vhdl);
    20     _component->vhdl_instance(vhdl);
    21 
    22     vhdl_declaration (vhdl);
    23     vhdl_body        (vhdl);
    24 
    25     vhdl->generate_file();
    26 
    27     delete vhdl;
    28   };
    29 \end{lstlisting}
    30 
    31 
    32 La première étape est d'éditer le fichier {\it Component\_vhdl.cpp}. Le listing \ref{component_vhdl.cpp} représente le contenu de ce fichier.
    33 \begin{itemize}
    34 \item Ligne 3 : Déclaration et construction de la variable {\it vhdl} qui est du  type {\it Vhdl}.
    35 \item Ligne 5 : Ajout dans le modèle VHDL des interfaces présentes dans le modèle SystemC. (cf fichiers Component.h).
    36 \item Ligne 6 : Ajout dans le modèle VHDL des composants internes  dans le modèle SystemC. (cf fichiers Component.h et Component\_allocation.cpp).
    37 \item Ligne 8 : Ajout dans le modèle VHDL des déclarations définit dans le fichiers Component\_vhdl\_declaration.cpp (cf section \ref{vhdl_declaration}).
    38 \item Ligne 9 : Ajout dans le modèle VHDL de la description comportemental définit dans le fichiers Component\_vhdl\_body.cpp (cf section \ref{vhdl_body}).
    39 \item Ligne 11 : Génération des fichiers VHDL. Le nom du fichier est construit à partir du nom fourni lors de la construction de la variable {\it vhdl}.
    40 \item Ligne 13 : Destruction de l'objet.
    41 \end{itemize}
    42 
    4313Pour la suite, nous allons supposer l'instanciation d'une FIFO.
    4414
    4515\subSection{Ajout d'une instance}
    4616
    47 Dans le fichier Component\_vhdl.cpp :
    4817\begin{enumerate}
    49 \item Inclure la définition de la classe désirée.
     18\item Dans le fichier Component.h : inclure la définition de la classe désirée.
    5019\lstparam{C++}
    5120\begin{lstlisting}
    5221#include "Behavioural/Generic/Queue/include/Queue.h"
    5322\end{lstlisting}
    54 \item Creer les paramètres du modèle.
     23
     24\item Dans le fichier Component.h : déclaré les paramètres et le component
    5525\lstparam{C++}
    5626\begin{lstlisting}
    57     morpheo::behavioural::generic::queue::Parameters * param_queue;
    58     param_queue = new morpheo::behavioural::generic::queue::Parameters
     27  morpheo::behavioural::generic::queue::Parameters * _param_queue;
     28  morpheo::behavioural::generic::queue::Queue      * _component_queue;
     29\end{lstlisting}
     30
     31\item Dans le fichier Component\_allocation.cpp : creer les paramètres du modèle.
     32\lstparam{C++}
     33\begin{lstlisting}
     34  _param_queue = new morpheo::behavioural::generic::queue::Parameters
    5935      (16, //size_queue
    6036       32);//size_data
    6137\end{lstlisting}
    62 \item Creer le modèle
     38\item Dans le fichier Component\_allocation.cpp : creer le modèle
    6339\lstparam{C++}
    6440\begin{lstlisting}
    65     morpheo::behavioural::generic::queue::Queue      * queue;
    6641    std::string queue_name = _name + "_queue";
    6742
    68     queue = new morpheo::behavioural::generic::queue::Queue
     43    _component_queue = new morpheo::behavioural::generic::queue::Queue
    6944      (queue_name.c_str() // nom du modèle
    7045#ifdef STATISTICS
    7146       ,NULL              // Pas paramètres pour les statistiques
    7247#endif
    73        ,param_queue       // Paramètres de la file
     48       ,_param_queue      // Paramètres de la file
    7449       ,USE_VHDL);        // Utilisation du modèle VHDL
    7550\end{lstlisting}
    76 \item Inclure le modèle dans la liste des composants internes
     51\item Dans le fichier Component\_allocation.cpp : inclure le modèle dans la liste des composants internes
    7752\lstparam{C++}
    7853\begin{lstlisting}
    79     _component->set_component(queue->_component
     54    _component->set_component(_component_queue->_component
    8055#ifdef POSITION
    8156                              , 20, 20, 20, 20   
     
    8661                              );
    8762\end{lstlisting}
    88 \item indiquer dans le fichier Makefile.deps que le composant dépend de ce modèle.
     63\item Dans le fichier Makefile.deps : ajouter les dépendances du modèle.
    8964\lstparam{make}
    9065\begin{lstlisting}
     
    11489                        $(MAKE) --directory=$(Component_DIR) --makefile=Makefile clean;
    11590\end{lstlisting}
     91\item Dans le fichier Component\_deallocation.cpp : détruire les modèles et leurs paramètres.
     92\lstparam{C++}
     93\begin{lstlisting}
     94  delete _component_queue;
     95  delete _param_queue;
     96\end{lstlisting}
    11697\end{enumerate}
    11798
     
    138119    vhdl->set_body   (0,");");
    139120\end{lstlisting}
     121
  • trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim

    r112 r113  
    3030  <parameter  name="debug_idle_time"                        value="5"       />
    3131
     32  <component  name="Comparator"                             model="systemc" debug="0" />
    3233  <component  name="Counter"                                model="systemc" debug="0" />
     34  <component  name="Divider"                                model="systemc" debug="0" />
     35  <component  name="Multiplier"                             model="systemc" debug="0" />
    3336  <component  name="Priority"                               model="systemc" debug="0" />
    3437  <component  name="Queue_Control"                          model="systemc" debug="0" />         
  • trunk/IPs/systemC/processor/Morpheo/TopLevel/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = TopLevel
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ..
Note: See TracChangeset for help on using the changeset viewer.