Ignore:
Timestamp:
Dec 16, 2008, 5:24:26 PM (16 years ago)
Author:
rosiere
Message:

1) Update Prediction Table - New architecture (systemC) done (and tested) -> need change interface in top level
2) Change documentation on VHDL generation
3) Change VHDL constant (case std_logic and std_logic_vector)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp

    r81 r95  
    2727      std::list<Interface_fifo *>         * list_interface = (_entity)->get_interfaces_list()->get_interface_list();
    2828      std::list<Interface_fifo *>::iterator j              = list_interface->begin();
     29      bool print_comment = false;
    2930      if (not list_interface->empty())
    3031        {
    31           vhdl->set_body ("------------------------------------------------------");
    32           vhdl->set_body ("-- Output's Buffer");
    33           vhdl->set_body ("------------------------------------------------------");
    34          
    3532          while (j != list_interface->end())
    3633            {
     
    4845                           (signal->get_connect_from_signal () != NULL) )
    4946                        {
     47                          if (not print_comment)
     48                            {
     49                              vhdl->set_body ("------------------------------------------------------");
     50                              vhdl->set_body ("-- Output's Buffer");
     51                              vhdl->set_body ("------------------------------------------------------");
     52                             
     53                              print_comment = true;
     54                            }
     55
    5056                          // Create name
    5157                          std::string signal_name = "signal_"+toString(cpt++);
     
    6773              ++j;
    6874            }
    69           vhdl->set_body ("");
    70           vhdl->set_body ("------------------------------------------------------");
    71           vhdl->set_body ("");
     75
     76          if (print_comment)
     77            {
     78              vhdl->set_body ("");
     79              vhdl->set_body ("------------------------------------------------------");
     80              vhdl->set_body ("");
     81            }
    7282        }
    7383    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test.cpp

    r81 r95  
    2424
    2525    std::string test_name    = testbench_test_name(vhdl);
    26     std::string test_name_ok = testbench_test_ok     (vhdl);
     26    std::string test_name_ok = testbench_test_ok  (vhdl);
    2727
    2828    vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_ok+";");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_ok.cpp

    r81 r95  
    2424    if (_list_signal->empty()== false)
    2525      {
    26         std::list<Signal*>::iterator i     = _list_signal->begin();
     26        std::list<Signal*>::iterator i = _list_signal->begin();
    2727
    2828        while (i != _list_signal->end())
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_test_ok.cpp

    r81 r95  
    1919    if (_direction == OUT)
    2020      vhdl->set_body ("\tand "+_name+" = "+_name+"_test");
    21 
     21   
    2222    log_printf(FUNC,Behavioural,"testbench_test_ok","End");
    2323  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp

    r81 r95  
    2727
    2828  void Vhdl::set_constant (std::string      name     ,
    29                            uint32_t    size     ,
     29                           uint32_t         size     ,
    3030                           std::string      init)
    3131  {
     
    3535  };
    3636
    37   void Vhdl::set_constant (std::string      name     ,
     37  void Vhdl::set_constant (std::string name     ,
    3838                           uint32_t    size     ,
    3939                           uint32_t    init)
    4040  {
    4141    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    42     set_constant(name,std_logic(size),std_logic_conv(size,init));
     42    set_constant(name,std_logic(size),std_logic_cst(size,init));
    4343    log_printf(FUNC,Behavioural,FUNCTION,"End");
    4444  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp

    r93 r95  
    99
    1010#include "Behavioural/include/Vhdl.h"
    11 
     11#include "Common/include/ToBase2.h"
    1212#include <sstream>
    1313
     
    5656  {
    5757    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    58     set_signal(name,std_logic(size),std_logic_conv(size,init));
     58    set_signal(name,std_logic(size),std_logic_cst(size,init));
    5959    log_printf(FUNC,Behavioural,FUNCTION,"End");
    6060  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_std_logic.cpp

    r94 r95  
    1010#include <math.h>
    1111#include "Behavioural/include/Vhdl.h"
     12#include "Common/include/ToBase2.h"
    1213
    1314namespace morpheo              {
     
    5758
    5859    return _return;
     60  };
     61
     62#undef  FUNCTION
     63#define FUNCTION "Vhdl::std_logic_cst"
     64  std::string std_logic_cst (uint32_t size, uint32_t value)
     65  {
     66    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     67
     68    std::string conv;
     69
     70    if (size == 1)
     71      conv = "'"+toString(value&1)+"'";
     72    else
     73      conv = "\""+toBase2<uint32_t>(value,size)+"\"";
     74
     75    log_printf(FUNC,Behavioural,FUNCTION,"End");
     76
     77    return conv;
    5978  };
    6079
Note: See TracChangeset for help on using the changeset viewer.