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); } }
void tcp_read_callback(char* rx, uint16_t rx_len, sockaddr* from, uint16_t socket_Position) { handleResponses(rx, rx_len); }