Electronicdesign 26376 Promo Iar Vs Fig 1

State-Machine Tool Now Generates C# and Java Code

April 5, 2019
IAR’s Visual State, which graphically constructs state-machine models, adds C# and Java code to its C and C++ repertoire.

To describe parts of embedded systems, designers will frequently use state machines, and that often means leveraging modeling tools like UML. These models are sometimes part of the certification process for safety-related applications. Turning these models into code can be challenging, especially if one needs to keep the model in sync with the code.

IAR’s Visual State (Fig. 1) allows designers to graphically construct state-machine models using the Visual State Designer. The hierarchical IAR models are compatible with the UML standard.

1. IAR’s Visual State allows designers to graphically create state machines and then turn models into C, C++, C#, or Java code.

Models can then be turned into C, C++, C#, or Java source code using the Visual State Coder tool. C# and Java are new additions. Changes made to the model can be easily turned into source code, allowing an application to be created from the latest model.

Visual State would be useful just for its ability to create source code, but it includes other handy features. The Validator, a state-machine simulation tool, allows a model to be tested regardless of what code will eventually be generated. The Verificator tool provides formal system verification. It can check for errors like state dead ends, ambiguous assignments, and unused elements.

For example, the Documenter tool is used to generate documentation reports in HTML or RTF formats. It correlates information from the Validator, Verificator, and Coder tools.

Visual State will work with any toolset since it generates source code, but it’s integrated with IAR’s own Embedded Workbench IDE (Fig. 2). A similar workflow would be used with any other toolset. The advantage of using IAR’s IDE comes when debugging and application. It supports state-machine breakpoints.

2. Visual State is integrated with IAR Embedded Workbench IDE.

IAR’s IDE also supports MISRA C/C++ compliance. Visual State includes an option to support the standard, addressing details such as avoiding embedding assignments in subexpressions.

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!