Exemple #1
0
void MemoryPort::memoryPortBehavior()
{
    // main SystemC thread that implements memory port behavior

    while(!m_stop)
    {
        if(!m_bypassEnabled)
        {
            createRequests();
            issueRequests();
            handleResponses();
        }
        else
        {
            // bypass mode - just move input to output
            // TODO should we enable bypassing multiple reqs per cycle here?
            if(peInput.num_available() > 0 && peOutput.num_free() > 0)
            {
                peOutput.write(peInput.read());
            }
        }

        wait(PE_CLOCK_CYCLE);
    }
}
Exemple #2
0
void tcp_read_callback(char* rx, uint16_t rx_len, sockaddr* from, uint16_t socket_Position) {
	handleResponses(rx, rx_len);
}