VisualDSP VisualBasic script Q
Hello all,
my setup is:
VisualDSP
APEX ICE
EZ-Kit BF535
I wrote a VB script that should fill memory from a ADspStringList.
ADspStringList is loaded from a file with data in HEx32 format, i.e. :
3de223
ffffd12a
ffa76a93
Loading code is :
Set InValueList = CreateObject( "VisualDSP.ADspStringList" )
While Not F.AtEndOfStream
InValueList.Add F.ReadLine
Wend
and it correctly loads the whole file (up to 1000000 32-bit values).
When I try to set memory, it will correctly set if using for example:
MemoryType.SetFormattedMemory &h0, 10240, 1, "Hex32", InValueList
(set 10240 32-bit values starting at 0x0)
but, if I try setting "larger" amount like:
MemoryType.SetFormattedMemory &h0, 19456, 1, "Hex32", InValueList
the SetFormattedMemory() consistently fails (both in simulation mode as well
as with real HW) !!!!
Any ideas what could go wrong, or any advice on how to load (up to 1000000)
Hex32 values from a file into a memory (in a reasonable time) ?
thanks,
dubi
//-------------------------------------------------------------------
Here is the whole script:
' Create a new file system object.
Set FSO = CreateObject( "Scripting.FileSystemObject" )
Idde.PrintText 0, vbCrlf & "Reading data from file: " & InFile & "..." &
vbCrlf
Set F = FSO.OpenTextFile( InFile, ForReading, False )
Set Proc = Idde.ActiveSession.ActiveProcessor
Set MemoryTypeList = Proc.MemoryTypeList
Set MemoryType = MemoryTypeList.Item( CStr( MemoryTypeName ) )
i = -1
Set InValueList = CreateObject( "VisualDSP.ADspStringList" )
While Not F.AtEndOfStream
i = i + 1
InValueList.Add F.ReadLine
Wend
Idde.PrintText 0 , "Closing file: " & InFile & "." & vbCrlf
F.Close
Idde.PrintText 0, InValueList.Count
'OK
MemoryType.SetFormattedMemory &h0, 10240, 1, "Hex32", InValueList
'Fails:
'MemoryType.SetFormattedMemory &h0, 19456, 1, "Hex32", InValueList
Idde.PrintText 0, "Finished setting " & MemoryTypeName & vbCrlf
Idde.RefreshWindows Proc.Name
'End time:
Idde.PrintText 0, Time
End Function
|