Git Product home page Git Product logo

tlb-controller's Issues

Parse USIMM traces

  • Just change the R to W and W to R.

  • Ignore the data part

  • The first column of the traces counts the number of non-load store instructions after which the current load/store operation is triggered, Simply ignore the 1st and last column in the trace.

  • Download source

std::string l_transactionStr = "";    std::string l_delimiter = " ";
    size_t l_pos = 0;
    std::string l_token;
    unsigned int l_count = 0;
    t_VirtualAddress l_address;
    t_RequestType l_reqType;
    t_Time l_traceTime;
    t_Size l_nonLsCount;
    t_Data l_data;
    while ((l_pos = l_transactionStr.find(l_delimiter)) != std::string::npos) {​​​​​​​​
        l_token = l_transactionStr.substr(0, l_pos);
        const char* l_value = l_token.c_str();
        char* l_end;
        if(l_count == 0)    {​​​​​​​​
            l_nonLsCount = strtol(l_value, &l_end, 0);
        }​​​​​​​​
        else if(l_count == 1)    {​​​​​​​​
            if(l_value[0] == 'W')   {​​​​​​​​
                l_reqType = t_RequestType::E_CORE_READ;
            }​​​​​​​​
            else if(l_value[0] == 'R') {​​​​​​​​
                l_reqType = t_RequestType::E_CORE_WRITE;
            }​​​​​​​​
            else        {​​​​​​​​
                assert(false);
            }​​​​​​​​
        }​​​​​​​​
        else if(l_count == 2)    {​​​​​​​​
            l_address = strtol(l_value, &l_end, 0);
        }​​​​​​​​
        else if(l_count == 3)    {​​​​​​​​
            l_data = new unsigned char[64];
            std::memcpy(l_data, l_value, 64);
        }​​​​​​​​
        l_transactionStr.erase(0, l_pos + l_delimiter.length());
        l_count++;
    }​​​​​​​​

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.