EHLS.SoC.LiteX.Blocks (Elixir HLS v0.1.0)

Copy Markdown View Source

The blocks every LiteX SoC of elixir-hls has (priv/backend/litex/hls_litex_blocks.py), independent of the board:

  • ticks(rate): a source of one word (its running count) rate times per second;
  • run(): a sink taking the words and doing nothing with them, for a stream whose stages' state is all that matters;
  • hold(name): a sink keeping the latest word as a level, read with pipeline(:value, name); 0 from each start until the first word;
  • EHLS.PubSub.broadcast(topic): a sink making each element an event of the topic (an atom), received by EHLS.PubSub.subscribe(topic); it never holds back what feeds it (an event that does not fit is counted); an element is one value up to 32 bits;
  • EHLS.PubSub.subscribe(topic): a source giving the events of the topic, every one of each publisher in its order; a source that cannot wait (what does not fit while it stands still is counted), so a stream from it to the CPU says overflow: :drop.