43 DmaNetif::DmaNetif(std::string name) :
TimedModel(name) {
180 #ifdef NETIF_WRITE_ADDRESS_CHECKING 181 if (_recv_address < _mem1->GetBase() || _
185 <<
", recv::WAIT_ADDR_FLIT, unable to write to _mem1 " 187 throw std::runtime_error(ss.str());
214 #ifdef NETIF_WRITE_ADDRESS_CHECKING 215 if (_recv_address < _mem1->GetBase() ||
219 <<
", recv::WAIT_SIZE_FLIT, unable to write to _mem1 " 221 throw std::runtime_error(ss.str());
249 #ifdef NETIF_WRITE_ADDRESS_CHECKING 250 if (_recv_address < _mem1->GetBase() ||
254 <<
", recv::WAIT_PAYLOAD, unable to write to _mem1 " 256 throw std::runtime_error(ss.str());
297 #ifdef NETIF_READ_ADDRESS_CHECKING 298 if (_recv_address < _mem1->GetBase() ||
302 <<
", recv::COPY_RELEASE, unable to read to _mem1 " 304 throw std::runtime_error(ss.str());
312 #ifdef NETIF_WRITE_ADDRESS_CHECKING 317 <<
", recv::COPY_RELEASE, unable to write to _mem0 " 318 << std::hex <<
"0x" << addr << std::endl;
319 throw std::runtime_error(ss.str());
370 #ifdef NETIF_READ_ADDRESS_CHECKING 375 <<
", send::COPY_RELEASE, unable to read from _mem0 " 376 << std::hex <<
"0x" << addr << std::endl;
377 throw std::runtime_error(ss.str());
385 #ifdef NETIF_WRITE_ADDRESS_CHECKING 386 if (_send_address < _mem2->GetBase() ||
390 <<
", send::COPY_RELEASE, unable to write to _mem2 " 392 throw std::runtime_error(ss.str());
Signal< uint32_t > * _sig_prog_size
The Signal class models a generic bus of width equals to the sizeof(T)
Signal< uint8_t > * GetSignalSendStatus()
Signal< uint32_t > * GetSignalProgAddr()
void SetSignalProgRecv(Signal< uint8_t > *)
Signal< uint8_t > * _sig_stall
void push(T)
Pushes an object to the back of the buffer.
Signal< uint8_t > * _sig_send_status
void Write(uint32_t addr, MemoryType *data, uint32_t length)
Writes data to the memory.
This class models a TimedModel.
void SetSignalIntr(Signal< uint8_t > *)
T top()
Peeks at the top of the buffer.
Signal< uint16_t > * _sig_prog_dest
void SetOutputBuffer(Buffer< FlitType > *ob)
Signal< uint32_t > * GetSignalProgSize()
Signal< uint8_t > * _sig_prog_send
DmaNetifRecvState _recv_state
void SetSignalProgSend(Signal< uint8_t > *)
Signal< uint8_t > * _sig_recv_reload
T Read()
Get the last value writen to the bus.
Signal< uint8_t > * GetSignalIntr()
uint32_t _send_payload_remaining
Signal< uint8_t > * _sig_intr
void SetSignalRecvReload(Signal< uint8_t > *)
void SetSignalProgSize(Signal< uint32_t > *)
void SetSignalRecvStatus(Signal< uint32_t > *)
void Write(T val)
Writes some value to the bus.
MemoryAddr GetLastAddr()
Get the address of the last addressable memory cell.
Signal< uint32_t > * _sig_recv_status
Signal< uint8_t > * GetSignalRecvReload()
Signal< uint8_t > * GetSignalProgSend()
uint32_t _recv_payload_remaining
std::string GetName()
Getter method for the <_name> field.
MemoryAddr GetBase()
(getter) Gets the base address, which is the first addressable memory cell in the module...
uint32_t _send_payload_size
void SetSignalProgDest(Signal< uint16_t > *)
void Read(uint32_t addr, MemoryType *buffer, uint32_t length)
Reads data from a given memory location.
Signal< uint8_t > * GetSignalProgRecv()
DmaNetifSendState _send_state
Signal< uint16_t > * GetSignalProgDest()
Signal< uint8_t > * GetSignalStall()
Buffer< FlitType > * GetInputBuffer()
DmaNetifRecvState GetRecvState()
uint32_t capacity()
Returns max size of the buffer.
Signal< uint32_t > * _sig_prog_addr
This class models a memory module.
SimulationTime Run()
Method which is called by the simulator when during the execution of the TimedModel.
Signal< uint8_t > * _sig_prog_recv
uint32_t _recv_payload_size
void SetSignalSendStatus(Signal< uint8_t > *)
void Reset()
Resets the instance to its starting state.
DmaNetifSendState GetSendState()
Signal< uint32_t > * GetSignalRecvStatus()
uint32_t size()
Counts elements from the buffer.
void pop()
Removes the object at the front of the buffer.
void SetSignalStall(Signal< uint8_t > *)
void SetSignalProgAddr(Signal< uint32_t > *)