[gem5-users] Re: Ruby Message handling

2024-03-05 Thread Vladimir Milicevic via gem5-users
Hi Chia, Within a Message Buffer enqueue method, I’m able to cast the MsgPtr to a RubyRequest and able to dereference this new pointer: MessageBuffer::enqueue(MsgPtr message, Tick current_time, Tick delta) [...] auto rubyRequest = std::dynamic_pointer_cast(message); [...] if (rubyRequest){ RubyRe

[gem5-users] Re: Ruby Message handling

2024-03-04 Thread C.-Y. Wu via gem5-users
Hello Vlad, I don't think you can dynamically cast a Message pointer (MsgPtr) to RubyRequestType. Do you mean a RequestMsg pointer or a RubyRequest pointer? If you used dynamic_cast in NetworkInterface.cc to cast a MsgPtr to a RequestMsg pointer, you should be able to call the getType function. (