Hello, If you want to trigger two different transitions based on different inputs, this should always go in the in_port definition. For instance, see http://www.gem5.org/documentation/learning_gem5/part3/cache-in-ports/. You can base this on the message information by using peek() on the buffer. If you want to trigger based on the cache state, you should make sure the state you need is stored in the TBE or cache block as a "State". Then, the transition tagged with that state as a starting state will be triggered.
It's best practice to never use if statements except in in_ports. Remember, you're describing a state machine, not writing imperative code. SLICC is more like verilog than it is C/C++. Jason On Sun, Jan 31, 2021 at 5:33 AM zhen bang via gem5-users < gem5-users@gem5.org> wrote: > Hello everyone: > Recently, I am making some changes to the cache coherence protocol in > Gem5, in the SLICC documents, I should add some if-else statements, but the > transitions code blocks seem do not to cover this case, it shows syntax > error >>if<<. If I do so, should I change the related parts like action > code blocks and basic configurations? > Such as: > if (..){ > transition(..) > } > else{ > transition(..) > } > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s >
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s