Ignore:
Timestamp:
May 16, 2013, 3:32:38 PM (11 years ago)
Author:
cfuguet
Message:

Modifying the tsar_generic_xbar:

  • Modifying the metadata and the sources of the tsar_xbar_cluster to support two differents VCI parameters (one for the DIRECT network and another for the EXTERNAL network).

The DIRECT network use 32 bits for VCI_DATA and the EXTERNAL network use
64 bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r379 r389  
    2626#include "../include/tsar_xbar_cluster.h"
    2727
     28#define tmpl(x) template<\
     29   typename iss_t,int cmd_width, int rsp_width> \
     30   x TsarXbarCluster<\
     31   iss_t, cmd_width, rsp_width\
     32   >
     33
    2834namespace soclib {
    2935namespace caba  {
     
    3238//                 Constructor
    3339//////////////////////////////////////////////////////////////////////////
    34 template<typename vci_param, typename iss_t, int cmd_width, int rsp_width>
    35 TsarXbarCluster<vci_param, iss_t, cmd_width, rsp_width>::TsarXbarCluster(
     40tmpl(/**/)::TsarXbarCluster(
    3641         sc_module_name                     insname,
    3742         size_t                             nb_procs,
     
    103108        std::ostringstream sproc;
    104109        sproc << "proc_" << p;
    105         proc[p] = new VciCcVCacheWrapper<vci_param, iss_t>(
     110        proc[p] = new VciCcVCacheWrapper<vci_param_d, cmd_width, rsp_width, iss_t>(
    106111                      sproc.str().c_str(),
    107112                      cluster_id*nb_procs + p,        // GLOBAL PROC_ID
     
    125130        std::ostringstream swip;
    126131        swip << "wi_proc_" << x_id << "_" << y_id << p;
    127         wi_proc[p] = new VciDspinInitiatorWrapper<vci_param,cmd_width,rsp_width>(
     132        wi_proc[p] = new VciDspinInitiatorWrapper<vci_param_d,cmd_width,rsp_width>(
    128133                     swip.str().c_str(),
    129134                     x_width + y_width + l_width);
     
    133138    std::cout << "  - building memc_" << x_id << "_" << y_id << std::endl;
    134139
    135     memc = new VciMemCache<vci_param>(
     140    memc = new VciMemCache<vci_param_d, vci_param_x, rsp_width, cmd_width>(
    136141                     "memc",
    137142                     mtd,                                // Mapping Table direct space
     
    148153                     memc_debug_ok );
    149154
    150     wt_memc = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>(
     155    wt_memc = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>(
    151156                     "wt_memc",
    152157                     x_width + y_width + l_width);
     
    155160    std::cout << "  - building xram_" << x_id << "_" << y_id << std::endl;
    156161
    157     xram = new VciSimpleRam<vci_param>(
     162    xram = new VciSimpleRam<vci_param_x>(
    158163                     "xram",
    159164                     IntTab(cluster_id),
     
    165170    std::cout << "  - building xicu_" << x_id << "_" << y_id << std::endl;
    166171
    167     xicu = new VciXicu<vci_param>(
     172    xicu = new VciXicu<vci_param_d>(
    168173                     "xicu",
    169174                     mtd,                               // mapping table
     
    171176                     nb_procs,                          // number of timer IRQs
    172177                     32,                                // number of hard IRQs
    173                      0,                                 // number of soft IRQs
     178                     32,                                // number of soft IRQs
    174179                     nb_procs);                         // number of output IRQs
    175180
    176     wt_xicu = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>(
     181    wt_xicu = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>(
    177182                     "wt_xicu",
    178183                     x_width + y_width + l_width);
     
    181186    std::cout << "  - building mdma_" << x_id << "_" << y_id << std::endl;
    182187
    183     mdma = new VciMultiDma<vci_param>(
     188    mdma = new VciMultiDma<vci_param_d>(
    184189                     "mdma",
    185190                     mtd,
     
    189194                     nb_dmas);                            // number of IRQs
    190195
    191     wt_mdma = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>(
     196    wt_mdma = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>(
    192197                     "wt_mdma",
    193198                     x_width + y_width + l_width);
    194199
    195     wi_mdma = new VciDspinInitiatorWrapper<vci_param,cmd_width,rsp_width>(
     200    wi_mdma = new VciDspinInitiatorWrapper<vci_param_d,cmd_width,rsp_width>(
    196201                     "wi_mdma",
    197202                     x_width + y_width + l_width);
     
    285290        std::cout << "  - building brom" << std::endl;
    286291
    287         brom = new VciSimpleRam<vci_param>(
     292        brom = new VciSimpleRam<vci_param_d>(
    288293                        "brom",
    289294                        IntTab(cluster_id, tgtid_brom),
     
    291296                        loader);
    292297
    293         wt_brom = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>("wt_brom",
     298        wt_brom = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>("wt_brom",
    294299                     x_width + y_width + l_width);
    295300
     
    297302        std::cout << "  - building fbuf" << std::endl;
    298303
    299         fbuf = new VciFrameBuffer<vci_param>(
     304        fbuf = new VciFrameBuffer<vci_param_d>(
    300305                        "fbuf",
    301306                        IntTab(cluster_id, tgtid_fbuf),
     
    303308                        xfb, yfb);
    304309
    305         wt_fbuf = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>("wt_fbuf",
     310        wt_fbuf = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>("wt_fbuf",
    306311                     x_width + y_width + l_width);
    307312
     
    309314        std::cout << "  - building bdev" << std::endl;
    310315
    311         bdev = new VciBlockDeviceTsar<vci_param>(
     316        bdev = new VciBlockDeviceTsar<vci_param_d>(
    312317                        "bdev",
    313318                        mtd,
     
    318323                        64);            // burst size
    319324
    320         wt_bdev = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>("wt_bdev",
    321                      x_width + y_width + l_width);
    322         wi_bdev = new VciDspinInitiatorWrapper<vci_param,cmd_width,rsp_width>("wi_bdev",
     325        wt_bdev = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>("wt_bdev",
     326                     x_width + y_width + l_width);
     327        wi_bdev = new VciDspinInitiatorWrapper<vci_param_d,cmd_width,rsp_width>("wi_bdev",
    323328                     x_width + y_width + l_width);
    324329
     
    326331        std::cout << "  - building mnic" << std::endl;
    327332
    328         mnic = new VciMultiNic<vci_param>(
     333        mnic = new VciMultiNic<vci_param_d>(
    329334                        "mnic",
    330335                        IntTab(cluster_id, tgtid_mnic),
     
    336341                        0 );           // mac_2 address
    337342
    338         wt_mnic = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>("wt_mnic",
     343        wt_mnic = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>("wt_mnic",
    339344                     x_width + y_width + l_width);
    340345
     
    349354            vect_names.push_back(term_name.str().c_str());
    350355        }
    351         mtty = new VciMultiTty<vci_param>(
     356        mtty = new VciMultiTty<vci_param_d>(
    352357                        "mtty",
    353358                        IntTab(cluster_id, tgtid_mtty),
     
    355360                        vect_names);
    356361
    357         wt_mtty = new VciDspinTargetWrapper<vci_param,cmd_width,rsp_width>("wt_mtty",
     362        wt_mtty = new VciDspinTargetWrapper<vci_param_d,cmd_width,rsp_width>("wt_mtty",
    358363                     x_width + y_width + l_width);
    359364
     
    677682//    destructor
    678683///////////////////////////////////////////////////////////////////////////
    679 template<typename vci_param, typename iss_t, int cmd_width, int rsp_width>
    680 TsarXbarCluster<vci_param, iss_t, cmd_width, rsp_width>::~TsarXbarCluster() {}
    681 
     684tmpl(/**/)::~TsarXbarCluster() {}
    682685}
    683686}
Note: See TracChangeset for help on using the changeset viewer.