Ignore:
Timestamp:
Oct 13, 2010, 8:15:51 PM (14 years ago)
Author:
rosiere
Message:

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic
Files:
9 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/Makefile

    r88 r145  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
    10 DIR_MORPHEO                     = ../../../../..
     9#-----[ Directory ]----------------------------------------
     10DIR_COMPONENT                   = ../
     11include                         $(DIR_COMPONENT)/Makefile.defs
    1112
    1213LIBRARY                         = $(RegisterFile_Monolithic_LIBRARY)
     
    1415DIR_LIBRARY                     = $(RegisterFile_Monolithic_DIR_LIBRARY)
    1516
    16 #-----[ include ]------------------------------------------
     17#-----[ include ]------------------------------------------
    1718
    18 all                             : library
     19all                             :
    1920                                @$(MAKE) all_selftest
    2021
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/mkf.info

    r139 r145  
    11
    2 # RegisterFile_Monolithic_0
    3 target_dep      all     RegisterFile_Monolithic_0.ngc
    4 target_dep      RegisterFile_Monolithic_0.ngc   RegisterFile_Monolithic_0.prj
    5 target_dep      RegisterFile_Monolithic_0.prj   RegisterFile_Monolithic_0_Pack.vhdl RegisterFile_Monolithic_0.vhdl
     2# debug_0
     3target_dep      all     debug_0.ngc
     4target_dep      debug_0.ngc     debug_0.prj
     5target_dep      debug_0.prj     debug_0_Pack.vhdl debug_0.vhdl
    66
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r138 r145  
    2222#include "Behavioural/include/Stat.h"
    2323#endif
    24 #include "Behavioural/include/Component.h"
     24// #include "Behavioural/include/Component.h"
    2525#ifdef VHDL
    2626#include "Behavioural/include/Vhdl.h"
     
    2828#include "Behavioural/include/Usage.h"
    2929
     30
     31
    3032namespace morpheo                    {
    3133namespace behavioural                {
     34
     35  class Component;
     36  class Interfaces;
     37
    3238namespace generic                    {
    3339namespace registerfile               {
    3440namespace registerfile_monolithic    {
     41
     42// #define VHDL_GAISLER
    3543
    3644  typedef enum {RW_READ, RW_WRITE} rw_t;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h

    r128 r145  
    1717namespace registerfile_monolithic    {
    1818
    19 //   typedef uint32_t Taddress_t;
     19//typedef uint32_t Taddress_t;
     20//typedef uint64_t Tdata_t;
    2021  typedef Tgeneral_data_t Tdata_t;
    2122 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r112 r145  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Behavioural/include/Component.h"
    1011
    1112namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp

    r112 r145  
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Behavioural/include/Component.h"
    1011
    1112namespace morpheo                    {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp

    r81 r145  
    1010#include "Behavioural/include/Vhdl.h"
    1111#include "Common/include/ToString.h"
     12#include "Behavioural/include/Component.h"
     13
    1214namespace morpheo                    {
    1315namespace behavioural                {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp

    r101 r145  
    1717  void RegisterFile_Monolithic::vhdl_body (Vhdl * & vhdl)
    1818  {
     19#ifndef VHDL_GAISLER
     20
    1921    vhdl->set_body   (0,"");
    2022    vhdl->set_comment(0,"---------------------------------------------------------------------------");
     
    107109    if (_param->_have_init_value)
    108110      vhdl->set_body   (1,"end if;");
    109 
    110111    vhdl->set_body   (0,"end process RegisterFile_write;");
     112
     113#else
     114    // vhdl->set_body   (0,"");
     115    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     116    // vhdl->set_comment(0," Ackitement");
     117    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     118    // vhdl->set_body   (0,"");
     119
     120    // for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     121    //   vhdl->set_body   (0,"out_READ_"+toString(i)+"_ACK  <= '1';");
     122    // for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     123    //   vhdl->set_body   (0,"out_WRITE_"+toString(i)+"_ACK <= '1';");
     124    // for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
     125    //   vhdl->set_body   (0,"out_READ_WRITE_"+toString(i)+"_ACK  <= '1';");
     126
     127    // vhdl->set_body   (0,"");
     128    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     129    // vhdl->set_comment(0," Read RegisterFile");
     130    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     131    // vhdl->set_body   (0,"");
     132
     133    // for (uint32_t num_read=0; num_read<_param->_nb_port_read; ++num_read)
     134    //   {
     135    //     vhdl->set_body   (0,"with in_READ_"+toString(num_read)+"_ADDRESS select");
     136    //       vhdl->set_body   (1,"out_READ_"+toString(num_read)+"_DATA <=");
     137    //       for (uint32_t num_word=0; num_word<_param->_nb_word-1; ++num_word)
     138    //         vhdl->set_body   (1,"reg_DATA_"+toString(num_word)+" when "+std_logic_cst(_param->_size_address,num_word)+",");
     139    //       vhdl->set_body   (1,"reg_DATA_"+toString(_param->_nb_word-1)+" when others;");
     140    //   }
     141
     142    // vhdl->set_body   (0,"");
     143    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     144    // vhdl->set_comment(0," Write RegisterFile");
     145    // vhdl->set_comment(0,"---------------------------------------------------------------------------");
     146    // vhdl->set_body   (0,"");
     147
     148    // vhdl->set_body   (0,"RegisterFile_write: process (in_CLOCK)");
     149    // vhdl->set_body   (0,"begin  -- process RegisterFile_write");
     150    // vhdl->set_body   (1,"if in_CLOCK'event and in_CLOCK = '1' then");
     151
     152    // for (uint32_t num_write = 0; num_write < _param->_nb_port_write; num_write++)
     153    //   {
     154    //     vhdl->set_body   (2,"if (in_WRITE_"+toString(num_write)+"_VAL = '1') then");
     155    //     for (uint32_t num_word=0; num_word<_param->_nb_word; ++num_word)
     156    //       {
     157    //         vhdl->set_body   (3,"if (in_WRITE_"+toString(num_write)+"_ADDRESS = "+std_logic_cst(_param->_size_address,num_word)+") then");
     158    //         vhdl->set_body   (4,"reg_DATA_"+toString(num_word)+" <= in_WRITE_"+toString(num_write)+"_DATA;");
     159    //         vhdl->set_body   (3,"end if;");
     160    //       }
     161    //     vhdl->set_body   (2,"end if;");
     162    //   }
     163   
     164    // vhdl->set_body   (1,"end if;");
     165    // vhdl->set_body   (0,"end process RegisterFile_write;");
     166
     167    vhdl->set_body   (0,"combinatory : process (");
     168    for (uint32_t num_read=0; num_read<_param->_nb_port_read; ++num_read)
     169      {
     170        vhdl->set_body   (1,"in_READ_"+toString(num_read)+"_VAL,");
     171        if (_param->_have_port_address)
     172        vhdl->set_body   (1,"in_READ_"+toString(num_read)+"_ADDRESS,");
     173      }
     174    for (uint32_t num_write=0; num_write<_param->_nb_port_write; ++num_write)
     175      {
     176        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_VAL,");
     177        if (_param->_have_port_address)
     178        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_ADDRESS,");
     179        vhdl->set_body   (1,"in_WRITE_"+toString(num_write)+"_DATA,");
     180      }
     181    for (uint32_t num_write = 0; num_write < _param->_nb_port_write; num_write++)
     182    vhdl->set_body   (1,"in_NRESET,");
     183    vhdl->set_body   (1,"reg_DATA)");
     184    vhdl->set_body   (1,"variable sig_DATA : Treg;");
     185    vhdl->set_body   (0,"begin");
     186    vhdl->set_body   (1,"");
     187    vhdl->set_body   (1,"sig_DATA := reg_DATA;");
     188
     189    vhdl->set_body   (1,"");
     190    vhdl->set_body   (1," -- ack");
     191    vhdl->set_body   (1,"");
     192   
     193    for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     194      vhdl->set_body   (1,"out_READ_"+toString(i)+"_ACK  <= '1';");
     195    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     196      vhdl->set_body   (1,"out_WRITE_"+toString(i)+"_ACK <= '1';");
     197    for (uint32_t i = 0; i < _param->_nb_port_read_write; i++)
     198      vhdl->set_body   (1,"out_READ_WRITE_"+toString(i)+"_ACK  <= '1';");
     199    vhdl->set_body   (1,"");
     200    vhdl->set_body   (1," -- Read");
     201    vhdl->set_body   (1,"");
     202
     203    for (uint32_t i = 0; i < _param->_nb_port_read; i++)
     204      {
     205        std::string str_address;
     206        if (_param->_have_port_address)
     207          str_address = "conv_integer(in_READ_"+toString(i)+"_ADDRESS)";
     208        else
     209          str_address = "0";
     210
     211        vhdl->set_body   (1,"if (in_READ_"+toString(i)+"_VAL = '1') then"),
     212        vhdl->set_body   (2,"out_READ_"+toString(i)+"_DATA <= sig_DATA.reg ("+str_address+");");
     213        vhdl->set_body   (1,"else"),
     214        vhdl->set_body   (2,"out_READ_"+toString(i)+"_DATA <= "+std_logic_others(_param->_size_word,0)+";");
     215        vhdl->set_body   (1,"end if;");
     216      }
     217    vhdl->set_body   (1,"");
     218    vhdl->set_body   (1," -- write");
     219    vhdl->set_body   (1,"");
     220
     221    for (uint32_t i = 0; i < _param->_nb_port_write; i++)
     222      {
     223        std::string str_address;
     224        if (_param->_have_port_address)
     225          str_address = "conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)";
     226        else
     227          str_address = "0";
     228
     229        vhdl->set_body   (1,"if (in_WRITE_"+toString(i)+"_VAL = '1') then");
     230        vhdl->set_body   (2,"sig_DATA.reg("+str_address+") := in_WRITE_"+toString(i)+"_DATA;");
     231        vhdl->set_body   (1,"end if;");
     232      }
     233
     234    vhdl->set_body   (1,"");
     235    vhdl->set_body   (1,"reg_DATA_next <= sig_DATA;");
     236    vhdl->set_body   (1,"");
     237    vhdl->set_body   (0,"end process combinatory;");
     238
     239
     240    vhdl->set_body   (0,"sequential: process (in_CLOCK)");
     241    vhdl->set_body   (0,"begin");
     242    vhdl->set_body   (1,"if rising_edge(in_CLOCK) then");
     243    vhdl->set_body   (2,"reg_DATA <= reg_DATA_NEXT;");
     244    vhdl->set_body   (1,"end if;");
     245    vhdl->set_body   (0,"end process sequential;");
     246
     247#endif
     248
    111249  };
    112250
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_declaration.cpp

    r97 r145  
    1818  void RegisterFile_Monolithic::vhdl_declaration (Vhdl * & vhdl)
    1919  {
     20#ifndef VHDL_GAISLER
    2021    vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word));
    2122
    2223    vhdl->set_signal ("reg_DATA", "Tregfile");
     24#else
     25    // for (uint32_t i=0; i<_param->_nb_word; ++i)
     26    //   vhdl->set_signal ("reg_DATA_"+toString(i), _param->_size_word);
     27
     28    vhdl->set_type ("Tregfile", "array " + _std_logic_range(_param->_nb_word) + " of " + std_logic(_param->_size_word));
     29    vhdl->set_type ("Treg", "record reg : Tregfile; end record");
     30
     31    vhdl->set_signal ("reg_DATA"     , "Treg");
     32    vhdl->set_signal ("reg_DATA_next", "Treg");
     33#endif
    2334  };
    2435
Note: See TracChangeset for help on using the changeset viewer.