Ah, that worked. Thanks! Didn't even think to try that. Will try to make a pull request adding a note about that to the documentation website when I get a chance (whenever that is)
-James On Mon, Oct 30, 2023 at 5:26 AM C.-Y. Wu via gem5-users <gem5-users@gem5.org> wrote: > Hello James, > > Have you tried: > int src_cpuId, default="-1", desc="the id of the cpu core that > originated the request"; > I think -1 might need to be between quotation marks. > > Chia > > > On Sat, Oct 28, 2023 at 10:00 PM James Pangia via gem5-users < > gem5-users@gem5.org> wrote: > >> Hello all, >> >> I am trying to add a src_cpuId data member to the MemoryMsg structure in >> Ruby to help in tracking memory requests from cpu to MemCtrl. >> MemoryMsg is defined in src/mem/ruby/protocol/RubySlicc_MemControl.sm. I >> have added the parameter to the structure definition. code snippet below: >> >> int Len, desc="size of the memory/dma request"; >> //<-- original code >> int src_cpuId, default=-1, desc="the id of the cpu core that >> originated the request"; //jpangia >> // Not all fields used by all protocols: //<-- original code >> PrefetchBit Prefetch, desc="Is this a prefetch request"; //<-- >> original code >> >> For ease of bookkeeping, I'd like to make the default value be -1 for >> src_cpuId so that requests that didn't originate from a cpu have a >> src_cpuId of -1. But if I try to set default=-1, then I get the error: >> "Syntax error at [gem5 root >> directory]/src/mem/ruby/protocol/RubySlicc_MemControl.sm:83:3570" >> >> However, non-negative integers compile fine. >> >> Is there a way to set a default value of -1 to a SLICC structure data >> member, or will I have to just use int_max, or another large value for the >> code for "no source cpu"? >> >> Thank you, >> -James Pangia >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-le...@gem5.org >> > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org >
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org