Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for editor/generator from state diagram to C code

Status
Not open for further replies.

Ace-X

Advanced Member level 2
Joined
Jan 25, 2002
Messages
529
Helped
41
Reputation
82
Reaction score
14
Trophy points
1,298
Location
Germany
Activity points
5,151
I'm looking for any state diagram editor which can generate pure C code on output. Something like IAR VisualState, but more lightweight and for general case. Let say, you enter state diagram by dragging states and transitions, define conditions and actions, and system will generate pure C code for this (in form like "switch(current state) {when condition: action ... }" , etc.).

I just want to transfer my good experience with state diagrams editors from digital design world to embedded systems.

Any recommendations, links, experience are welcome here.
 

OK, I found one: SmartState from h**p://www.smartstatestudio.com/.
It has C code generator, but output code is too ugly and can't be used without deep re-coding for embedded systems with limited memory/processor resources.

So, I'm still awaiting for your experience! I can't beleive that no one here never thought about simplification of state diagram implementation for embedded programming.
 

Hi,
Mentor Graphics has tools to create C, VHDL and Verilog from graphic designers (State, TruthTable, blocks etc). But they are really expensive. It is part of their FPGA advantage package.

I used to use one on my previous company and the code is very clean and easy to compile. You maybe able to get a 30 days license from them if you ask your local Mentor representatives or sales guys.

Best regards,
/Farhad
 

Re: Looking for editor/generator from state diagram to C cod

hi,
You can use SDL of Telelogic .
 

Re: Looking for editor/generator from state diagram to C cod

We have used *isual*tate in applications from 2k to 128k, with different micros, and our experience is very good. I do not believe that be necessary to code in C sentences.
 

Re: Looking for editor/generator from state diagram to C cod

farhada said:
Hi,
Mentor Graphics has tools to create C, VHDL and Verilog from graphic designers (State, TruthTable, blocks etc). But they are really expensive. It is part of their FPGA advantage package.

I worked with FPGA Advantage from Mentor before (till version 5.3, if I rememeber right), but I'm not sure it can generate C code from state diagram. Yes, generated VHDL/Verilog code is very straight, so if it can produce something like this in C, it would be perfect.

raj_rohit10 said:
You can use SDL of Telelogic .

This one looks like usual UML tool. There are many of them, but they usually produce code which is not very suitable for embedded systems. I need very simple straight code, like the VHDL output of any state diagram editor from digital design world.
 

HI Ace,
The latest version can create all the 3 languages since they have now support for SystemC in the program. I had a demo of it for a while, but my license ran out.

BR,
/Farhad
 

Re: Looking for editor/generator from state diagram to C cod

farhada said:
The latest version can create all the 3 languages since they have now support for SystemC in the program. I had a demo of it for a while, but my license ran out.

That's good news! Maybe you have any example of generated C code by FA from state diagram? Would be very interesting to give a look at generated code before downloading this huge package.
 

Hi Ace,
As I said, I don't have the license for hte program any more, I will see if I generated any C code from the state machines or not.

BR,
/Farhad
 

Re: Looking for editor/generator from state diagram to C cod

farhada said:
Hi Ace,
As I said, I don't have the license for hte program any more, I will see if I generated any C code from the state machines or not.

OK, please, if it possible. Thanks!

Also, I found one promising program for state diagrams. It is called "TS Controls". At least, first results of generated C code seem pretty good for embedded applications.
 

I'm looking for any state diagram editor which can generate pure C code on output. Something like IAR VisualState, but more lightweight and for general case. Let say, you enter state diagram by dragging states and transitions, define conditions and actions, and system will generate pure C code for this (in form like "switch(current state) {when condition: action ... }" , etc.).

I just want to transfer my good experience with state diagrams editors from digital design world to embedded systems.

Any recommendations, links, experience are welcome here.

You can try UCG (Ultimate Code Generator) created by Robbert van Leeuwen dSEA. If you like you can submit me an example state transition diagram and required generated source code and I will make you a UCG template that does the code generation for you just the way you like.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top