Skip to content

High level design plans

Erik Carstensen edited this page Oct 31, 2022 · 16 revisions

Performance

  • C generation almost acceptable (faster vtable init left)
  • Python is slow. Some alternative paths for acceleration, need to pick one:
    • pypy: Works already, limited wins, expensive startup. Can be accelerated by static type annotations? Compile server?
    • cython: haven't looked into this, incremental steps
    • reimplement parts in rust? Probably pays off iff we eventually re-implement large parts of dmlc in rust
  • Develop DML code generator practices for avoiding huge banks
    • Dynamic register_view
  • Offer hands-on help to SSM and PSG infra
    • proactively?

Coroutines

  • hooks/channels

Conditional imports

  • may come with a larger loosening of order dependency rules for early evaluated expressions, i.e., early cross-obj param refs are ok if param dependency graph doesn't have cycles

Dynamic objects

Two options:

  1. Truly dynamic objects, e.g. instantiation-time config of array sizes
  2. Optionally hidden elements, e.g. disabled registers
  • dynamic ports are problematic, port arrays can't be port objects
  • registers: compile-time overlap checks not possible, must allow mutually exclusive regs with overlap. Also need dynamic offsets (even sizes?).
  • dynamic register_view
    • two kinds of disabled registers: flexible instantiation-time config (overlapping, dynamic offset) visible in register_view; run-time toggle is a different use case, should not show up in register_view.
  • Peter's idea on "template classes"
    • essentially: instead of producing initialize_DEVNAME(void) that is automatically called, produce initialize_DEVNAME(const char *classname, int arg1, int arg2, ...) and expose this function to Python, for anyone to call
    • E.g., add compiler arg to define arglist of the initialize function, must be names of typed params in the device obj
    • can't rely as much on global variables, e.g. vtable pointers
    • Such params are inaccessible from indep methods, including shared indep methods (unless we employ unholy trickery like generating trampolines in run-time).
    • probably need a new level of independence between indep and non-indep
    • Alternative easier hack: static vars into separate C file, --split-c-file-style; parameterize by multiple static linking
      • easier but costs mem

RAII

Avoid the need for explicit allocation by supporting automatic destruction when variables go out of scope. Exact

  • primitive types (strings and data blobs)
    • Includes RAII semantics for expressions like "x" + "y".
    • Unclear relation between RAII string type and const char * in type system; likely need implicit conversions.
  • vectors

Continuous flow of manageable hot potatoes

  • easy: hot potatoes form a heap, so extract-min.
  • harder to prioritize against longer-term tasks?

Cleanup runs

  • occasionally batch-fix easy issues, similar to doc-week?
Clone this wiki locally