Ignore:
Timestamp:
Dec 11, 2012, 6:19:35 PM (11 years ago)
Author:
joannou
Message:

Updated of the vci trdid/rtrdid and pktid/rpktid fields for the direct network.
The pktid values are commented in the components'headers that use them.

  • In the vci_vdspin_*_wrapper components
    • added the transmission of the pktid/rpktid field
  • In the vci_cc_vcache_wrapper_v4
    • updated gen_moore() to transmit a valid pktid
    • updated transition(), RSP_FSM now checks the rpktid
  • In the vci_mem_cache_v4
    • transition(), tests originally performed on trdid now use pktid
    • gen_moore() transmit rpktid
    • !!! THE L1_MULTI_CACHE MECHANISM IS NO LONGER COMPATIBLE !!!
  • In vci_block_device_tsar_v4
    • updated gen_moore function to transmit a valid pktid

Also renamed the "SC" states in "CAS" states in the concerned FSMs on the vci_cc_vcache_wrapper_v4 and the vci_mem_cache_v4

Location:
trunk/modules/vci_cc_vcache_wrapper_v4/caba/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/include/vci_cc_vcache_wrapper_v4.h

    r247 r284  
    118118        //handling dirty bit update
    119119        DCACHE_DIRTY_GET_PTE,
    120         DCACHE_DIRTY_SC_WAIT,           
     120        DCACHE_DIRTY_WAIT,           
    121121            // handling processor miss requests
    122122        DCACHE_MISS_VICTIM,
     
    142142        CMD_DATA_UNC,
    143143        CMD_DATA_WRITE,
    144         CMD_DATA_SC,
     144        CMD_DATA_CAS,
    145145    };
    146146
     
    152152        RSP_DATA_UNC,
    153153        RSP_DATA_WRITE,
    154         RSP_DATA_SC,
    155154    };
    156155
     
    173172        TGT_RSP_DCACHE,
    174173    };
     174
     175    /* transaction type, pktid field */
     176    enum transaction_type_e
     177    {
     178        // b3 unused
     179        // b2 READ / NOT READ
     180        // Si READ
     181        //  b1 DATA / INS
     182        //  b0 UNC / MISS
     183        // Si NOT READ
     184        //  b1 accÚs table llsc type SW / other
     185        //  b2 WRITE/CAS/LL/SC
     186        TYPE_READ_DATA_UNC          = 0x0,
     187        TYPE_READ_DATA_MISS         = 0x1,
     188        TYPE_READ_INS_UNC           = 0x2,
     189        TYPE_READ_INS_MISS          = 0x3,
     190        TYPE_WRITE                  = 0x4,
     191        TYPE_CAS                    = 0x5,
     192        TYPE_LL                     = 0x6,
     193        TYPE_SC                     = 0x7
     194    };
     195   
     196    /* SC return values */
     197    enum sc_status_type_e
     198    {
     199        SC_SUCCESS  =   0x00000000,
     200        SC_FAIL     =   0x00000001
     201    };
     202    /*
     203    this is already in vci_param.h
     204    enum {
     205        STORE_COND_ATOMIC = 0,
     206        STORE_COND_NOT_ATOMIC = 1,
     207    };
     208    */
    175209
    176210    // TLB Mode : ITLB / DTLB / ICACHE / DCACHE
  • trunk/modules/vci_cc_vcache_wrapper_v4/caba/source/src/vci_cc_vcache_wrapper_v4.cpp

    r262 r284  
    8989
    9090        "DCACHE_DIRTY_PTE_GET",
    91         "DCACHE_DIRTY_SC_WAIT", 
     91        "DCACHE_DIRTY_WAIT", 
    9292
    9393        "DCACHE_MISS_VICTIM",
     
    112112        "CMD_DATA_UNC",     
    113113        "CMD_DATA_WRITE",
    114         "CMD_DATA_SC",
     114        "CMD_DATA_CAS",
    115115    };
    116116const char *rsp_fsm_state_str[] = {
     
    39953995        r_dcache_vci_sc_old = pte;
    39963996        r_dcache_vci_sc_new = pte | PTE_D_MASK;
    3997         r_dcache_fsm        = DCACHE_DIRTY_SC_WAIT;
     3997        r_dcache_fsm        = DCACHE_DIRTY_WAIT;
    39983998
    39993999#if DEBUG_DCACHE
     
    40104010    }
    40114011    //////////////////////////
    4012     case DCACHE_DIRTY_SC_WAIT:          // wait completion of SC for PTE Dirty bit,
     4012    case DCACHE_DIRTY_WAIT:         // wait completion of CAS for PTE Dirty bit,
    40134013                                    // and return to IDLE state when response is received.
    4014                                     // we don't care if the SC is a failure:
    4015                                     // - if the SC is a success, the coherence mechanism
     4014                                    // we don't care if the CAS is a failure:
     4015                                    // - if the CAS is a success, the coherence mechanism
    40164016                                    //   updates the local copy.
    4017                                     // - if the SC is a failure, we just retry the write.
     4017                                    // - if the CAS is a failure, we just retry the write.
    40184018    {
    40194019        // external coherence request
     
    44194419            else if ( r_dcache_vci_sc_req.read() )
    44204420            {
    4421                 r_vci_cmd_fsm       = CMD_DATA_SC;
     4421                r_vci_cmd_fsm       = CMD_DATA_CAS;
    44224422                r_dcache_vci_sc_req = false;
    44234423                r_vci_cmd_cpt       = 0;
     
    44424442        }
    44434443        /////////////////
    4444         case CMD_DATA_SC:
     4444        case CMD_DATA_CAS:
    44454445        {
    44464446            // The SC VCI command contains two flits
     
    44754475    //
    44764476    // As the VCI_RSP and VCI_CMD are fully desynchronized to support several
    4477     // simultaneous VCI transactions, this FSM uses the VCI TRDID field
     4477    // simultaneous VCI transactions, this FSM uses the VCI RPKTID field
    44784478    // to identify the transactions.
    44794479    //
     
    45004500            r_vci_rsp_cpt = 0;
    45014501
    4502             if ( (p_vci_ini_d.rtrdid.read() >> (vci_param::T-1)) != 0 ) // Write transaction
    4503             {
    4504                 r_vci_rsp_fsm = RSP_DATA_WRITE;
    4505             }
    4506             else if ( p_vci_ini_d.rtrdid.read() == TYPE_INS_MISS )
     4502            if      ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_READ_DATA_UNC  )
     4503            {
     4504                r_vci_rsp_fsm = RSP_DATA_UNC;
     4505            }
     4506            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_READ_DATA_MISS )
     4507            {
     4508                r_vci_rsp_fsm = RSP_DATA_MISS;
     4509            }
     4510            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_READ_INS_UNC   )
     4511            {
     4512                r_vci_rsp_fsm = RSP_INS_UNC;
     4513            }
     4514            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_READ_INS_MISS  )
    45074515            {
    45084516                r_vci_rsp_fsm = RSP_INS_MISS;
    45094517            }
    4510             else if ( p_vci_ini_d.rtrdid.read() == TYPE_INS_UNC )
    4511             {
    4512                 r_vci_rsp_fsm = RSP_INS_UNC;
    4513             }
    4514             else if ( p_vci_ini_d.rtrdid.read() == TYPE_DATA_MISS )
    4515             {
    4516                 r_vci_rsp_fsm = RSP_DATA_MISS;
    4517             }
    4518             else if ( p_vci_ini_d.rtrdid.read() == TYPE_DATA_UNC )
     4518            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_WRITE          )
     4519            {
     4520                r_vci_rsp_fsm = RSP_DATA_WRITE;
     4521            }
     4522            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_CAS            )
    45194523            {
    45204524                r_vci_rsp_fsm = RSP_DATA_UNC;
     4525            }
     4526            else if ( (p_vci_ini_d.rpktid.read() & 0x7) ==  TYPE_LL             )
     4527            {
     4528                assert(false and "TODO ! LL NOT IMPLEMENTED YET"); //TODO
     4529                //r_vci_rsp_fsm = RSP_DATA_UNC;
     4530            }
     4531            else if ( (p_vci_ini_d.rpktid.read() & 0x7) == TYPE_SC             )
     4532            {
     4533                assert(false and "TODO ! SC NOT IMPLEMENTED YET"); //TODO
     4534                //r_vci_rsp_fsm = RSP_DATA_UNC;
    45214535            }
    45224536            else
     
    48504864    p_vci_ini_d.pktid  = 0;
    48514865    p_vci_ini_d.srcid  = m_srcid_d;
    4852     p_vci_ini_d.cons   = (r_vci_cmd_fsm.read() == CMD_DATA_SC);
    4853     p_vci_ini_d.contig = not (r_vci_cmd_fsm.read() == CMD_DATA_SC);
     4866    p_vci_ini_d.cons   = (r_vci_cmd_fsm.read() == CMD_DATA_CAS);
     4867    p_vci_ini_d.contig = not (r_vci_cmd_fsm.read() == CMD_DATA_CAS);
    48544868    p_vci_ini_d.wrap   = false;
    48554869    p_vci_ini_d.clen   = 0;
     
    48644878        p_vci_ini_d.be      = 0;
    48654879        p_vci_ini_d.trdid   = 0;
     4880        p_vci_ini_d.pktid   = 0;
    48664881        p_vci_ini_d.plen    = 0;
    48674882        p_vci_ini_d.cmd     = vci_param::CMD_NOP;
     
    48744889        p_vci_ini_d.wdata   = 0;
    48754890        p_vci_ini_d.be      = 0xF;
    4876         p_vci_ini_d.trdid   = TYPE_INS_MISS;
     4891        p_vci_ini_d.trdid   = 0;
     4892        p_vci_ini_d.pktid   = TYPE_READ_INS_MISS;
    48774893        p_vci_ini_d.plen    = m_icache_words<<2;
    48784894        p_vci_ini_d.cmd     = vci_param::CMD_READ;
     
    48854901        p_vci_ini_d.wdata   = 0;
    48864902        p_vci_ini_d.be      = 0xF;
    4887         p_vci_ini_d.trdid   = TYPE_INS_UNC;
     4903        p_vci_ini_d.trdid   = 0;
     4904        p_vci_ini_d.pktid   = TYPE_READ_INS_UNC;
    48884905        p_vci_ini_d.plen    = 4;
    48894906        p_vci_ini_d.cmd     = vci_param::CMD_READ;
     
    48964913        p_vci_ini_d.wdata   = 0;
    48974914        p_vci_ini_d.be      = 0xF;
    4898         p_vci_ini_d.trdid   = TYPE_DATA_MISS;
     4915        p_vci_ini_d.trdid   = 0;
     4916        p_vci_ini_d.pktid   = TYPE_READ_DATA_MISS;
    48994917        p_vci_ini_d.plen    = m_dcache_words << 2;
    49004918        p_vci_ini_d.cmd     = vci_param::CMD_READ;
     
    49074925        p_vci_ini_d.wdata   = 0;
    49084926        p_vci_ini_d.be      = r_dcache_vci_unc_be.read();
    4909         p_vci_ini_d.trdid   = TYPE_DATA_UNC;
     4927        p_vci_ini_d.trdid   = 0;
     4928        p_vci_ini_d.pktid   = TYPE_READ_DATA_UNC;
    49104929        p_vci_ini_d.plen    = 4;
    49114930        p_vci_ini_d.cmd     = vci_param::CMD_READ;
     
    49194938        p_vci_ini_d.be      = r_wbuf.getBe(r_vci_cmd_cpt.read());
    49204939        p_vci_ini_d.trdid   = r_wbuf.getIndex() + (1<<(vci_param::T-1));
     4940        p_vci_ini_d.pktid   = TYPE_WRITE;
    49214941        p_vci_ini_d.plen    = (r_vci_cmd_max.read() - r_vci_cmd_min.read() + 1) << 2;
    49224942        p_vci_ini_d.cmd     = vci_param::CMD_WRITE;
     
    49244944        break;
    49254945
    4926     case CMD_DATA_SC:
     4946    case CMD_DATA_CAS:
    49274947        p_vci_ini_d.cmdval  = true;
    49284948        p_vci_ini_d.address = r_dcache_vci_paddr.read() & ~0x3;
     
    49304950        else                             p_vci_ini_d.wdata = r_dcache_vci_sc_new.read();
    49314951        p_vci_ini_d.be      = 0xF;
    4932         p_vci_ini_d.trdid   = TYPE_DATA_UNC; 
     4952        p_vci_ini_d.trdid   = 0;
     4953        p_vci_ini_d.pktid   = TYPE_CAS;
    49334954        p_vci_ini_d.plen    = 8;
    4934         p_vci_ini_d.cmd     = vci_param::CMD_STORE_COND;
     4955        p_vci_ini_d.cmd     = vci_param::CMD_NOP;
    49354956        p_vci_ini_d.eop     = (r_vci_cmd_cpt.read() == 1);
    49364957        break;     
Note: See TracChangeset for help on using the changeset viewer.