# Wiki source code of Hardware Synthesis from SCCharts

Last modified by Richard Kreissig on 2023/09/14 11:12
Export
Office Formats
Export as PDF Export as ODT Export as RTF
Other Formats

Select the pages to export:

select all/ none

Legend:
  Created Page
  Modified Extension Page
  Clean Extension Page

Export as HTML

Show last authors

author | version | line-number | content
--- | --- | --- | ---
|  | 1 | == Deprecated since 0.12 ==
|  | 2 | This article is deprecated. The described features are no longer available in current releases.
|  | 3 |
|  | 4 | == Hardware Synthesis from SCCharts ==
|  | 5 |
|  | 6 | SCCharts not only can be transformed into C-Code to run it on a µC, it is also interesting to synthesize SCCharts to hardware. There are several aspect to do that.
|  | 7 |
|  | 8 | * On hardware there is per se a parallel execution, so parallel SCCharts regions can be executed in real parallel
|  | 9 | * A synthesised hardware circuit is deterministic.
|  | 10 | * Once the system clock is calculated in that way that all hardware units are executable, you have found your tick signal
|  | 11 |
|  | 12 | But there are also problems in hardware synthesis.
|  | 13 |
|  | 14 | * special handling for sequential variable assignment is needed
|  | 15 |
|  | 16 | Where we are:
|  | 17 |
|  | 18 | grafic coming soon.
|  | 19 |
|  | 20 | === First (naive) Implementation ===
|  | 21 |
|  | 22 | In the first naive implementation the example ABO-ssa.c was taken and directly implemented in VHDL. The ABO-ssa.c example is an hand optimized ABO example which is written in synchronous C. The tick function was taken and implemtented in VHDL. The "only" thing that was to do is, to change syntax differences between C and VHDL. The used variable must be adjusted too.
|  | 23 |
|  | 24 | The picture shows the ABO SCChart and two possible execution traces. The signal graphs are showing the simulated ABO-hardware circuit. As you can see, it does the same .
|  | 25 |
|  | 26 |
|  | 27 | (% class="wrapped" %)
|  | 28 | |=(((
|  | 29 | (% class="content-wrapper" %)
|  | 30 | (((
|  | 31 | [[image:attach:abo.JPG]]
|  | 32 |
|  | 33 | (% style="text-align: center;" %)
|  | 34 | ABO example
|  | 35 | )))
|  | 36 | )))|=(% colspan="1" %)(% colspan="1" %)
|  | 37 | (((
|  | 38 | (% class="content-wrapper" %)
|  | 39 | (((
|  | 40 |
|  | 41 |
|  | 42 | (% class="wrapped" %)
|  | 43 | |(% colspan="1" %)(% colspan="1" %)
|  | 44 | (((
|  | 45 | (% class="content-wrapper" %)
|  | 46 | (((
|  | 47 | (% style="text-align: center;" %)
|  | 48 | [[image:attach:abo_ex_trace.JPG]]two possible execution traces
|  | 49 | )))
|  | 50 | )))
|  | 51 | |=(((
|  | 52 | (% class="content-wrapper" %)
|  | 53 | (((
|  | 54 | [[image:attach:ABO2_ssa_c_signals_1st_case.PNG]]
|  | 55 |
|  | 56 | (% style="text-align: center;" %)
|  | 57 | signal trace from execution 1
|  | 58 | )))
|  | 59 | )))
|  | 60 | |(((
|  | 61 | (% class="content-wrapper" %)
|  | 62 | (((
|  | 63 | [[image:attach:ABO2_ssa_c_signals_2nd_case.PNG]]
|  | 64 |
|  | 65 | (% style="text-align: center;" %)
|  | 66 | signal trace from execution 2
|  | 67 | )))
|  | 68 | )))
|  | 69 |
|  | 70 |
|  | 71 | )))
|  | 72 | )))
|  | 73 |
|  | 74 | {{info}}
|  | 75 | Here **clk** is **tick_in**.
|  | 76 |
|  | 77 | A tick starts which every rising edge from clk.
|  | 78 |
|  | 79 | Do not note tick_in.
|  | 80 | {{/info}}
|  | 81 |
|  | 82 |
|  | 83 | After the execution from ABO the hardware signals still remain.
|  | 84 |
|  | 85 | From this we can see that it is possible to synthesize hardware from SCCharts (Synchronous C).
|  | 86 |

# Quick Links

KIELER on GitHub
RTSYS Homepage

XWiki 14.4.7