summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MI_example-dma.sm
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/protocol/MI_example-dma.sm')
-rw-r--r--src/mem/protocol/MI_example-dma.sm19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mem/protocol/MI_example-dma.sm b/src/mem/protocol/MI_example-dma.sm
index 14b8c4e4a..e328d9e20 100644
--- a/src/mem/protocol/MI_example-dma.sm
+++ b/src/mem/protocol/MI_example-dma.sm
@@ -28,13 +28,14 @@
*/
machine(DMA, "DMA Controller")
-: DMASequencer * dma_sequencer;
- Cycles request_latency := 6;
-{
-
- MessageBuffer responseFromDir, network="From", virtual_network="1", ordered="true", vnet_type="response";
- MessageBuffer reqToDirectory, network="To", virtual_network="0", ordered="false", vnet_type="request";
+ : DMASequencer * dma_sequencer;
+ Cycles request_latency := 6;
+ MessageBuffer * responseFromDir, network="From", virtual_network="1",
+ ordered="true", vnet_type="response";
+ MessageBuffer * requestToDir, network="To", virtual_network="0",
+ ordered="false", vnet_type="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";
@@ -69,7 +70,7 @@ machine(DMA, "DMA Controller")
error("DMA Controller does not support getDataBlock function.\n");
}
- out_port(reqToDirectory_out, DMARequestMsg, reqToDirectory, desc="...");
+ out_port(requestToDir_out, DMARequestMsg, requestToDir, desc="...");
in_port(dmaRequestQueue_in, SequencerMsg, mandatoryQueue, desc="...") {
if (dmaRequestQueue_in.isReady()) {
@@ -101,7 +102,7 @@ machine(DMA, "DMA Controller")
action(s_sendReadRequest, "s", desc="Send a DMA read request to memory") {
peek(dmaRequestQueue_in, SequencerMsg) {
- enqueue(reqToDirectory_out, DMARequestMsg, request_latency) {
+ enqueue(requestToDir_out, DMARequestMsg, request_latency) {
out_msg.PhysicalAddress := in_msg.PhysicalAddress;
out_msg.LineAddress := in_msg.LineAddress;
out_msg.Type := DMARequestType:READ;
@@ -116,7 +117,7 @@ machine(DMA, "DMA Controller")
action(s_sendWriteRequest, "\s", desc="Send a DMA write request to memory") {
peek(dmaRequestQueue_in, SequencerMsg) {
- enqueue(reqToDirectory_out, DMARequestMsg, request_latency) {
+ enqueue(requestToDir_out, DMARequestMsg, request_latency) {
out_msg.PhysicalAddress := in_msg.PhysicalAddress;
out_msg.LineAddress := in_msg.LineAddress;
out_msg.Type := DMARequestType:WRITE;