snaiks
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| snaiks [2017/03/17 09:31] – [Goals] dokuwikiadmin | snaiks [2024/09/19 12:14] (aktuell) – dokuwikiadmin | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Snaiks ====== | ====== Snaiks ====== | ||
| - | **Signals and Systems from KiCad to C++** | + | **Signals and Systems from KiCad to Cpp** |
| March 2017 | March 2017 | ||
| Zeile 12: | Zeile 12: | ||
| - | **Snaiks** provides a tool chain to get from a signal plan, drawn in **KiCad**s schematic editor to a generated standard **C++** code, runnable on **any platform**. | + | **Snaiks** provides a tool chain to get from a signal plan, drawn in **KiCad**s schematic editor to a generated standard **Cpp** code, runnable on **any platform**. |
| This tool chain consists of following parts: | This tool chain consists of following parts: | ||
| * **Snaiks KiCad Library**, providing all the symbols | * **Snaiks KiCad Library**, providing all the symbols | ||
| - | * **Snaiks Compiler**, generating | + | * **Snaiks Compiler**, generating |
| - | * **Snaiks | + | * **Snaiks |
| - | It's purpose is to create complex systems by drawing them in KiCad' | + | It's purpose is to create complex systems by drawing them in KiCad' |
| It can be used to implement PLCs or digital signal processing like filtering. | It can be used to implement PLCs or digital signal processing like filtering. | ||
| ===== Goals ===== | ===== Goals ===== | ||
| - | * Generate beautiful | + | * Generate beautiful |
| * Compiles without dynamic memory allocation (embedded, safety) | * Compiles without dynamic memory allocation (embedded, safety) | ||
| * Read and write system states during runtime (e.g. with a simple terminal) | * Read and write system states during runtime (e.g. with a simple terminal) | ||
| Zeile 30: | Zeile 30: | ||
| * Hierarchical design (sub-systems) | * Hierarchical design (sub-systems) | ||
| * full documentation within the schematic | * full documentation within the schematic | ||
| - | ===== Mini-Demo ===== | ||
| - | {{ :: | ||
| - | {{:: | ||
| - | {{:: | ||
| - | {{:: | ||
| - | {{:: | ||
| - | ===== Source Code ===== | + | ===== Status |
| - | * https:// | + | ==== Implemented |
| - | * https:// | + | * A set of basic blocks in KiCad and Cpp |
| - | * https:// | + | * Snaiks |
| + | * auto arrangement of block-execution to provide transparent behavior | ||
| - | ===== Blue Prints ===== | ||
| - | ==== Sampled vs. Transparent Systems ==== | ||
| - | === The Problem === | ||
| - | For some systems it would be handy, if they are transparent from input to output. \\ | ||
| - | This means, that they do not consume a whole clock cycle. An example could be a simple And-gate. Perhaps one do not want this gate to introduce an extra clock-cycle, | ||
| - | The drawback of this method is, that the update-order of all the systems is very important. If the user is aware of this problem, he can shorten latencies of complex systems. | ||
| - | In Snaiks example test1 we had a undesired behaveour, because the And-gate befor the middle output indroduced a delay of one clock. In transitions from " | ||
| - | This made the antiGlitchDelays necessary. | ||
| - | === The Proposal | + | ==== Open Tasks ==== |
| - | Every System has a flag **transparent** which is by default false. \\ | + | * communication with the system in runtime |
| - | If it is true and sample() is called, update() is called from the sample() function: | + | * unit tests of all Snaiks Objects |
| - | <code C> | + | |
| - | class MySystem | + | |
| - | { | + | |
| - | ... | + | |
| - | bool transparent; | + | |
| - | bool sampled=false; | + | |
| - | ... | + | |
| - | void sample() | + | |
| - | { | + | |
| - | sInput = *input; | + | |
| - | sampled = true; | + | |
| - | if(transparent) | + | |
| - | { | + | |
| - | update(); | + | |
| - | } | + | |
| - | } | + | |
| - | void update() | + | ===== Mini-Demo ===== |
| - | { | + | [[https://gitlab.com/ |
| - | if(sampled) | + | |
| - | { | + | |
| - | sampled | + | ===== Installer ===== |
| - | output | + | TODO: make an installer repo, which clones all the sub-repos, compiles and installs the snaiks compiler, installs kicad and a demo project. |
| - | } | + | |
| - | } | + | # using git clone --recursive to check out all submodules |
| - | ... | + | git clone --recursive https:// |
| - | } | + | ===== Source Code ===== |
| - | </ | + | * https:// |
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ===== Library Presentation ===== | ||
| + | * https:// | ||
| + | * {{ :: | ||
| + | ===== Blue Prints ===== | ||
| - | This also makes the flag sampled necessary. Becaus the normal clock master calls every sample() and then every update(). A second update-run shouldn' | ||
| ==== Properties ==== | ==== Properties ==== | ||
| Zeile 119: | Zeile 96: | ||
| * list properties of an object | * list properties of an object | ||
| * change property values permanently | * change property values permanently | ||
| - | |||
| - | ==== Hierarchical Systems ==== | ||
| - | It should be possible to combine a set of systems to a sub-system, where new inputs and outputs are defined. | ||
| - | |||
| - | KiCads hierarchical schematic structure could be used out of the box, but in C++ we do not see anything from this. Similar to the KiCad PCB layout, which also doesn' | ||
| - | |||
| - | For the systems we should make something similar to the properties, which live in a SnsPropertyContainer. We should make a SnsSystemContainer, | ||
| Zeile 136: | Zeile 106: | ||
| Cons: | Cons: | ||
| * every pin must have a type specified in KiCad (could be done with net-annotators, | * every pin must have a type specified in KiCad (could be done with net-annotators, | ||
| - | * we cannot use a simple template-interface class any more, such as the SnsHybrid or SnsNumeric. | + | * we cannot use a simple template-interface class any more |
| === Proposal === | === Proposal === | ||
| - | * in cases, where this is really needed, a specific | + | * in cases, where this is really needed, a specific |
| * mixture of numbers and bool shouldn' | * mixture of numbers and bool shouldn' | ||
| - | {{tag> | + | {{tag> |
snaiks.1489739491.txt.gz · Zuletzt geändert: von dokuwikiadmin
