From 86d6b788f6d7b523c750ffb64d6d8920ec741c49 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Tue, 10 Jul 2012 22:51:54 -0700 Subject: ruby: banked cache array resource model This patch models a cache as separate tag and data arrays. The patch exposes the banked array as another resource that is checked by SLICC before a transition is allowed to execute. This is similar to how TBE entries and slots in output ports are modeled. --- src/mem/slicc/symbols/StateMachine.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mem/slicc') diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py index 230eb1b22..39f3a4b43 100644 --- a/src/mem/slicc/symbols/StateMachine.py +++ b/src/mem/slicc/symbols/StateMachine.py @@ -1238,6 +1238,14 @@ if (!%s.areNSlotsAvailable(%s)) ''' % (key.code, val) case_sorter.append(val) + # Check all of the request_types for resource constraints + for request_type in request_types: + val = ''' +if (!checkResourceAvailable(%s_RequestType_%s, addr)) { + return TransitionResult_ResourceStall; +} +''' % (self.ident, request_type.ident) + case_sorter.append(val) # Emit the code sequences in a sorted order. This makes the # output deterministic (without this the output order can vary -- cgit v1.2.3