hms-networks / abccspianalyzer Goto Github PK
View Code? Open in Web Editor NEWSaleae Logic Plugin for Analyzing HMS Anybus CompactCom SPI Communication
License: Other
Saleae Logic Plugin for Analyzing HMS Anybus CompactCom SPI Communication
License: Other
Once software supports the message transactions concept, associate ABCC command and response messages as a transaction based on the source IDs.
Typically, the first packet should provide two non-error related events. The Anybus status event, and application status event. Currently this behavior is not consistent and there is likely a stale data comparison that is failing to force trigger these two events.
SPI fragments or extra clocking after a complete packet results in missing new line in the resulting output.
This behavior can be seen when running the current simulation implementation and exporting the message data or process data to a CSV file
Does the plugin handle multiple instances running simultaneously? If not add support for this to help in gateway applications.
When using 4-wire SPI the chipselect should be used to acquire packet level synchronization. This means the SPI should be controlled in the following way:
The protocol analyzer could help with detecting invalid behavior where the host attempts to send multiple packets in one strobe of the chipselect.
Certain data may be purely numeric (integer) and it may not be desirable to ever display this data as an ASCII character/string. Such and example is the "message size" of an ABCC message. It should be possible to add a base datatype field to each lookup entry to indicate if it is suppose to be displayed strictly as "integer" or if it may be appropriate to display as ASCII.
This may help clarify reasons for re-transmission or added delay in command/response object messaging
This issue is related to a past issue where the last SPI frame was not being committed to the results. The issue being reported here is just one level higher in the reporting of results logic.
To reproduce, create an explicit request from the ABCC network interface (object message command) and have the host break on receipt. Capturing this event on the logic analyzer and exporting the results to a CSV file will show that the command is missing from the exported results even though the bubble text displays all the correct information.
Currently, log files encoded as UTF16-BOM or UTF8-BOM will not be read correctly by the simulation logic. Since these are commonly encountered encoding formats, basic support should be added to avoid confusing situations for users where the tool does not produce an indication of an incompatible file format and simply runs the standard (non-log file) simulation.
It should be possible to detect a message directed towards the Network Object's "Exception Information". When the host requests this information ({object=1, instance=1, attribute=6} or the network specific exception attribute) it would be nice to enumerate the message data with the relevant "string name".
Hi, I'm getting errors when compiling it. How can I fix this?
$ sudo python build_analyzer.py
Running on Darwin
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccSpiAnalyzerLookup.o" "source/AbccSpiAnalyzerLookup.cpp"
source/AbccSpiAnalyzerLookup.cpp:16:10: fatal error: 'AnalyzerHelpers.h' file not found
#include "AnalyzerHelpers.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccSpiAnalyzerLookup.o" "source/AbccSpiAnalyzerLookup.cpp" -D _DEBUG
source/AbccSpiAnalyzerLookup.cpp:16:10: fatal error: 'AnalyzerHelpers.h' file not found
#include "AnalyzerHelpers.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccSpiAnalyzer.o" "source/AbccSpiAnalyzer.cpp"
In file included from source/AbccSpiAnalyzer.cpp:14:
source/AbccSpiAnalyzer.h:17:10: fatal error: 'Analyzer.h' file not found
#include "Analyzer.h"
^~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccSpiAnalyzer.o" "source/AbccSpiAnalyzer.cpp" -D _DEBUG
In file included from source/AbccSpiAnalyzer.cpp:14:
source/AbccSpiAnalyzer.h:17:10: fatal error: 'Analyzer.h' file not found
#include "Analyzer.h"
^~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccSpiSimulationDataGenerator.o" "source/AbccSpiSimulationDataGenerator.cpp"
In file included from source/AbccSpiSimulationDataGenerator.cpp:16:
source/AbccSpiSimulationDataGenerator.h:15:10: fatal error: 'AnalyzerHelpers.h' file not found
#include <AnalyzerHelpers.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccSpiSimulationDataGenerator.o" "source/AbccSpiSimulationDataGenerator.cpp" -D _DEBUG
In file included from source/AbccSpiSimulationDataGenerator.cpp:16:
source/AbccSpiSimulationDataGenerator.h:15:10: fatal error: 'AnalyzerHelpers.h' file not found
#include <AnalyzerHelpers.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccCrc.o" "source/AbccCrc.cpp"
source/AbccCrc.cpp:12:10: fatal error: 'Analyzer.h' file not found
#include "Analyzer.h"
^~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccCrc.o" "source/AbccCrc.cpp" -D _DEBUG
source/AbccCrc.cpp:12:10: fatal error: 'Analyzer.h' file not found
#include "Analyzer.h"
^~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccSpiAnalyzerSettings.o" "source/AbccSpiAnalyzerSettings.cpp"
In file included from source/AbccSpiAnalyzerSettings.cpp:23:
source/AbccSpiAnalyzerSettings.h:15:10: fatal error: 'AnalyzerSettings.h' file not found
#include <AnalyzerSettings.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccSpiAnalyzerSettings.o" "source/AbccSpiAnalyzerSettings.cpp" -D _DEBUG
In file included from source/AbccSpiAnalyzerSettings.cpp:23:
source/AbccSpiAnalyzerSettings.h:15:10: fatal error: 'AnalyzerSettings.h' file not found
#include <AnalyzerSettings.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/release/include" -O3 -w -c -fpic -std=c++11 -o "./plugins/OSX/AbccSpiAnalyzerResults.o" "source/AbccSpiAnalyzerResults.cpp"
In file included from source/AbccSpiAnalyzerResults.cpp:17:
source/AbccSpiAnalyzerResults.h:15:10: fatal error: 'AnalyzerResults.h' file not found
#include "AnalyzerResults.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -I"./sdk/debug/include" -O0 -w -c -fpic -g -std=c++11 -m32 -o "./plugins/OSX/Debug/AbccSpiAnalyzerResults.o" "source/AbccSpiAnalyzerResults.cpp" -D _DEBUG
In file included from source/AbccSpiAnalyzerResults.cpp:17:
source/AbccSpiAnalyzerResults.h:15:10: fatal error: 'AnalyzerResults.h' file not found
#include "AnalyzerResults.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
g++ -L"./sdk/release/lib" -lAnalyzer -dynamiclib -o "./plugins/OSX/libAbccSpiAnalyzer.dylib" "./plugins/OSX/AbccSpiAnalyzerLookup.o" "./plugins/OSX/AbccSpiAnalyzer.o" "./plugins/OSX/AbccSpiSimulationDataGenerator.o" "./plugins/OSX/AbccCrc.o" "./plugins/OSX/AbccSpiAnalyzerSettings.o" "./plugins/OSX/AbccSpiAnalyzerResults.o"
clang: error: no such file or directory: './plugins/OSX/AbccSpiAnalyzerLookup.o'
clang: error: no such file or directory: './plugins/OSX/AbccSpiAnalyzer.o'
clang: error: no such file or directory: './plugins/OSX/AbccSpiSimulationDataGenerator.o'
clang: error: no such file or directory: './plugins/OSX/AbccCrc.o'
clang: error: no such file or directory: './plugins/OSX/AbccSpiAnalyzerSettings.o'
clang: error: no such file or directory: './plugins/OSX/AbccSpiAnalyzerResults.o'
g++ -L"./sdk/debug/lib" -lAnalyzer -dynamiclib -m32 -o "./plugins/OSX/Debug/libAbccSpiAnalyzer.dylib" "./plugins/OSX/Debug/AbccSpiAnalyzerLookup.o" "./plugins/OSX/Debug/AbccSpiAnalyzer.o" "./plugins/OSX/Debug/AbccSpiSimulationDataGenerator.o" "./plugins/OSX/Debug/AbccCrc.o" "./plugins/OSX/Debug/AbccSpiAnalyzerSettings.o" "./plugins/OSX/Debug/AbccSpiAnalyzerResults.o"
clang: error: no such file or directory: './plugins/OSX/Debug/AbccSpiAnalyzerLookup.o'
clang: error: no such file or directory: './plugins/OSX/Debug/AbccSpiAnalyzer.o'
clang: error: no such file or directory: './plugins/OSX/Debug/AbccSpiSimulationDataGenerator.o'
clang: error: no such file or directory: './plugins/OSX/Debug/AbccCrc.o'
clang: error: no such file or directory: './plugins/OSX/Debug/AbccSpiAnalyzerSettings.o'
clang: error: no such file or directory: './plugins/OSX/Debug/AbccSpiAnalyzerResults.o'
If packet contains a CRC32 error or is marked as a fragmented packet, reset the message state (i.e. remove SPI fragmentation, reset data counters)
Support ABCC message fragmentation that occurs before, a complete header is received (the ABCC profile driver does this in some cases).
Currently frames are always offloaded as 64-bit values regardless of the actual size. This functionality should be updated to export the exact size of the frame
Support the enumeration of object specific error response information.
Objects such as the network configuration object have network specific instances. Without having a guaranteed way of determining the network type these instances cannot be reliably interpreted. A dropdown option that allows the users to switch from "unspecified" network to a specific network such as EtherCAT, EtherNet/IP, ProfiNet, etc. would make this possible.
Error marking is nice to have as a quick visual indicator of an important event. Currently error markers are not prioritized over normal markers and have a tendency to be masked from visibility when multiple markers are in close proximity. Once, or if, this is behavior is changed consider expanding on the usage of error markers to capture a variety of error events (SPI physical level, ABCC SPI protocol level, ABCC messaging level)
Consider adding basic detection of jitter, signal-integrity, or baud rate settings issues. The state of MOSI/MISO could be analyzed for change-of-state. If state changes in the +/-20% window of the sample edge of the clock signal, then produce a notification. Consider making this window adjustable.
Some fields such as the reserved SPI fields (or even the reserved bits in the SPI control field) may contain state information that was not meant to be produced.
Improve 3-wire transaction alignment by including an inter-packet gap parameter. Without this, bad captures are likely in this mode if the beginning of the capture takes place in the middle of a transaction. That said the user can use the built-in feature "Re-run starting at timing marker..." option.
The decoded result message below does not link to a bubble text frame:
"!CLOCKING: Unexpected ABCC SPI Clocking Behavior"
The intended behavior is that clicking on this decoded result will navigate to the bubble text frame containing the following detailed string:
"CLOCKING: (ABCC SPI Clocking. The analyzer expects one transaction per 'Active Enable' phase.)"
This issue can be worked around by placing a marker and decoding past the problematic glitch.
This main issue has been identified as being a problem in the analyzer's GetByte method. This routine currently only attempts to move past an "empty transaction" via one call to AdvanceToActiveEnableEdgeWithCorrectClockPolarity(). The issue is that this assumes everything will be OK past this point and does not attempt to re-apply the same logical check after advancing in the Logic bitstream.
It is not uncommon for a user to save a log file in Windows and end up with a file using UTF-16-BOM. Currently, the the log file simulation logic appears to have an issue with such files. Instead of forcing a user to re-encode the file, it is more user friendly to support this other common encoding.
Hi! I'm a Product Manager at Saleae and we’ve made improvements to our analyzer build process. Specifically, we cleaned up the build system, and switched to cmake, so there aren't multiple project files anymore. By implementing the changes outlined here you will be able to provide the community automatic builds in addition to a simplified build system. Let us know if you think you can make the changes or if you’d like us to make the changes for you.
Additionally, if you would like to update your analyzer so that results appear in Logic 2’s data table you can follow the steps outlined here. Note that if you upgrade your analyzer to FrameV2 it will not be backward compatible with Logic 1.
We really appreciate your time and effort! Please let us know if you have any feedback or questions. Thanks!
Add mechanism to detect mismatch of command message header and response message header when Source IDs are related.
Add support for (indication of) message segmentation for the subset of objects/cmds that support this mechanism. This includes:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.