From 12a05c23b7d351afee4b0c531021d8fb8ea5f57d Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 23 Feb 2011 16:41:59 -0800 Subject: ruby: automate permission setting This patch integrates permissions with cache and memory states, and then automates the setting of permissions within the generated code. No longer does one need to manually set the permissions within the setState funciton. This patch will faciliate easier functional access support by always correctly setting permissions for both cache and memory states. --HG-- rename : src/mem/slicc/ast/EnumDeclAST.py => src/mem/slicc/ast/StateDeclAST.py rename : src/mem/slicc/ast/TypeFieldEnumAST.py => src/mem/slicc/ast/TypeFieldStateAST.py --- src/mem/protocol/MI_example-dma.sm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mem/protocol/MI_example-dma.sm') diff --git a/src/mem/protocol/MI_example-dma.sm b/src/mem/protocol/MI_example-dma.sm index 3e52ae5f6..878af538e 100644 --- a/src/mem/protocol/MI_example-dma.sm +++ b/src/mem/protocol/MI_example-dma.sm @@ -7,10 +7,10 @@ machine(DMA, "DMA Controller") MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", no_vector="true"; MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", no_vector="true"; - enumeration(State, desc="DMA states", default="DMA_State_READY") { - READY, desc="Ready to accept a new request"; - BUSY_RD, desc="Busy: currently processing a request"; - BUSY_WR, desc="Busy: currently processing a request"; + state_declaration(State, desc="DMA states", default="DMA_State_READY") { + READY, AccessPermission:Invalid, desc="Ready to accept a new request"; + BUSY_RD, AccessPermission:Busy, desc="Busy: currently processing a request"; + BUSY_WR, AccessPermission:Busy, desc="Busy: currently processing a request"; } enumeration(Event, desc="DMA events") { -- cgit v1.2.3