Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ARM.SDS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<releases>
<release version="2.2.0-dev">
Active development ...
Template:
- Corestone-300/320: Fixed SDS I/O VSI driver to return correct error and status codes (SDSIO_ERROR, SDSIO_EOS)
</release>
</releases>

Expand Down
2 changes: 1 addition & 1 deletion template/Board/Corstone-300/vsi/python/arm_vsi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def app(self, message, *args, **kwargs):
# 'No limit' for idx-end
NO_LIMIT = 0x7FFFFFFF

# SDS I/O error/status codes (32-bit two'scomplement, used in the ARGUMENT register)
# SDS I/O error/status codes (32-bit two's-complement, used in the ARGUMENT register)
SDSIO_ERROR = (-1 & 0xFFFFFFFF) # -1
SDSIO_EOS = (-6 & 0xFFFFFFFF) # -6

Expand Down
11 changes: 7 additions & 4 deletions template/Board/Corstone-320/vsi/python/arm_vsi3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2025 Arm Limited. All rights reserved.
# Copyright (c) 2025-2026 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -88,6 +88,10 @@ def app(self, message, *args, **kwargs):
# 'No limit' for idx-end
NO_LIMIT = 0x7FFFFFFF

# SDS I/O error/status codes (32-bit two's-complement, used in the ARGUMENT register)
SDSIO_ERROR = (-1 & 0xFFFFFFFF) # -1
SDSIO_EOS = (-6 & 0xFFFFFFFF) # -6

class IndexAllocator:
"""
Hands out the next SDS index.
Expand Down Expand Up @@ -415,12 +419,12 @@ def processCOMMAND(command):

elif command == 3: # Write
# Return data length or SDSIO_ERROR
ARGUMENT = len(Data) if Stream.write(STREAM_ID, Data) else -1
ARGUMENT = len(Data) if Stream.write(STREAM_ID, Data) else SDSIO_ERROR

elif command == 4: # Read
# Return data length or SDSIO_EOS
Data, eof = Stream.read(STREAM_ID, ARGUMENT)
ARGUMENT = len(Data) if not eof else -6
ARGUMENT = len(Data) if not eof else SDSIO_EOS

return command

Expand Down Expand Up @@ -570,4 +574,3 @@ def wrRegs(index, value):


## @}

Loading