docs: rewrite DESIGN + README for the core/frontends structure
DESIGN.md: new layered Build section (essim_core + ESSIM_FRONTEND, FTXUI per
frontend, split tests), a rewritten Layout tree (src/core/{domain,imports,app},
src/frontends/tui, tests/{,tui}), and a new "Architecture — core vs frontends"
section stating the rule (core never depends on a frontend) with the export
operation as the worked example. README: layered-build note, FTXUI-is-the-tui-
frontend's dependency, core-vs-frontend test split, nested project-layout tree.
Also keep the binary at ./build/essim via RUNTIME_OUTPUT_DIRECTORY now that the
exe is produced from the frontend subdir.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
35
README.md
35
README.md
@@ -15,6 +15,13 @@ cmake --build build -j
|
||||
./build/essim
|
||||
```
|
||||
|
||||
The build is **layered**: `essim_core` is the frontend-agnostic business
|
||||
library (domain + importers + operations); the `essim` binary comes from a
|
||||
**frontend** under `src/frontends/<name>/` that links it. Select one with
|
||||
`-DESSIM_FRONTEND=<name>` (default `tui`); `-DESSIM_FRONTEND=none` builds the
|
||||
core + tests only, with no GUI toolkit fetched. Architecture in
|
||||
[`DESIGN.md`](DESIGN.md).
|
||||
|
||||
Inside the shell, type `help` for the live command list — or read the
|
||||
auto-generated reference at [`doc/user/commands.md`](doc/user/commands.md).
|
||||
A worked bring-up script is at [`test/system.essim`](test/system.essim);
|
||||
@@ -41,10 +48,14 @@ Step-by-step walkthroughs for both the batch and TUI workflows are in
|
||||
`../libbsdl`, pulled in via `add_subdirectory` and linked dynamically.
|
||||
Override its location with `-DBSDL_DIR=/path/to/libbsdl`. Powers the
|
||||
`attach-bsdl` command and the pin/JTAG checks.
|
||||
- Fetched automatically at configure time via `FetchContent` (nothing to
|
||||
install): **FTXUI** v6.1.9 and **doctest** v2.4.11.
|
||||
- Fetched automatically via `FetchContent` (nothing to install): **FTXUI**
|
||||
v6.1.9 — only when building the **tui** frontend — and **doctest** v2.4.11
|
||||
for the tests.
|
||||
- Optional, only for the `doc` target: **doxygen** and **python3**.
|
||||
|
||||
libzip, pugixml and libbsdl are the **core** dependencies; FTXUI belongs to the
|
||||
tui frontend, so a `-DESSIM_FRONTEND=none` build needs none of it.
|
||||
|
||||
## Tests
|
||||
|
||||
```sh
|
||||
@@ -53,6 +64,9 @@ Step-by-step walkthroughs for both the batch and TUI workflows are in
|
||||
ctest --test-dir build
|
||||
```
|
||||
|
||||
`ctest` runs `essim_tests` (core — links `essim_core`, no GUI toolkit) and
|
||||
`essim_tui_tests` (the FTXUI frontend's tests, under `tests/tui/`).
|
||||
|
||||
Skip building tests entirely:
|
||||
|
||||
```sh
|
||||
@@ -76,12 +90,17 @@ cmake --build build --target doc # needs doxygen + python3
|
||||
## Project layout
|
||||
|
||||
```
|
||||
src/system/ domain model (Module/Part/Pin/Signal, Connection, Transform, …)
|
||||
src/imports/ Mentor / Altium / ODS netlist importers
|
||||
src/tui/ FTXUI shell (commands, screens, completion, history)
|
||||
tests/ doctest suite
|
||||
doc/ api/ + user/ Markdown trees, Doxyfile.in, gen_api_md.py
|
||||
test/ sample netlists + system.essim bring-up script
|
||||
src/
|
||||
core/ business logic, NO GUI toolkit (→ libessim_core)
|
||||
domain/ model (Module/Part/Pin/Signal, Connection, Transform…) + analyses
|
||||
imports/ Mentor / Altium / ODS netlist importers + ODS writer
|
||||
app/ use-case operations (export → CSV/ODS, …)
|
||||
frontends/ one dir per GUI/TUI engine, each links essim_core
|
||||
tui/ FTXUI shell + main.cpp (→ libessim_tui + the `essim` binary)
|
||||
tests/ core tests (link essim_core)
|
||||
tui/ frontend tests (link essim_tui)
|
||||
doc/ api/ + user/ Markdown, Doxyfile.in, gen_api_md.py
|
||||
test/ sample netlists + system.essim bring-up script
|
||||
```
|
||||
|
||||
Full layout & rationale in [`DESIGN.md`](DESIGN.md).
|
||||
|
||||
Reference in New Issue
Block a user