dau-core 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dau_core-0.1.1/.gitignore +168 -0
- dau_core-0.1.1/LICENSE +201 -0
- dau_core-0.1.1/PKG-INFO +292 -0
- dau_core-0.1.1/README.md +248 -0
- dau_core-0.1.1/dau_core/__init__.py +118 -0
- dau_core-0.1.1/dau_core/_lazy.py +46 -0
- dau_core-0.1.1/dau_core/capabilities.py +79 -0
- dau_core-0.1.1/dau_core/capability_contract.py +274 -0
- dau_core-0.1.1/dau_core/composition.py +939 -0
- dau_core-0.1.1/dau_core/config/__init__.py +155 -0
- dau_core-0.1.1/dau_core/config/base.yaml +3 -0
- dau_core-0.1.1/dau_core/config/dau-core/cores.yaml +4564 -0
- dau_core-0.1.1/dau_core/config/task/tasks/temporal/hero-workflow.yaml +10 -0
- dau_core-0.1.1/dau_core/cores.py +839 -0
- dau_core-0.1.1/dau_core/design.py +107 -0
- dau_core-0.1.1/dau_core/element_types.py +165 -0
- dau_core-0.1.1/dau_core/exp_generator.py +397 -0
- dau_core-0.1.1/dau_core/fixed_point.py +469 -0
- dau_core-0.1.1/dau_core/generators.py +105 -0
- dau_core-0.1.1/dau_core/hdl/.gitignore +1 -0
- dau_core-0.1.1/dau_core/hdl/__init__.py +123 -0
- dau_core-0.1.1/dau_core/hdl/dau_aggregation_pkg.sv +40 -0
- dau_core-0.1.1/dau_core/hdl/dau_arrow_lite_stream_aggregation.sv +447 -0
- dau_core-0.1.1/dau_core/hdl/dau_asof_backward.sv +412 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_burst_reader.sv +219 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_ram_sim.sv +209 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_random_probe.sv +180 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_record_writer.sv +233 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_stream_job.sv +379 -0
- dau_core-0.1.1/dau_core/hdl/dau_axi_write_mux.sv +125 -0
- dau_core-0.1.1/dau_core/hdl/dau_bar_aggregation.sv +388 -0
- dau_core-0.1.1/dau_core/hdl/dau_bitonic_sorter.sv +278 -0
- dau_core-0.1.1/dau_core/hdl/dau_bram_stream_job.sv +175 -0
- dau_core-0.1.1/dau_core/hdl/dau_broadcast_hash_join.sv +522 -0
- dau_core-0.1.1/dau_core/hdl/dau_datetime_format.sv +489 -0
- dau_core-0.1.1/dau_core/hdl/dau_field_sum_aggregation.sv +262 -0
- dau_core-0.1.1/dau_core/hdl/dau_fixed_point_divide.sv +305 -0
- dau_core-0.1.1/dau_core/hdl/dau_fixed_point_sqrt.sv +285 -0
- dau_core-0.1.1/dau_core/hdl/dau_grouped_aggregation.sv +370 -0
- dau_core-0.1.1/dau_core/hdl/dau_grouped_field_aggregation.sv +333 -0
- dau_core-0.1.1/dau_core/hdl/dau_grouped_field_sum_aggregation.sv +321 -0
- dau_core-0.1.1/dau_core/hdl/dau_hash_grouped_aggregation.sv +519 -0
- dau_core-0.1.1/dau_core/hdl/dau_identity_axil.v +135 -0
- dau_core-0.1.1/dau_core/hdl/dau_identity_registers.sv +66 -0
- dau_core-0.1.1/dau_core/hdl/dau_int32_keyed_map_alu.sv +227 -0
- dau_core-0.1.1/dau_core/hdl/dau_int32_keyed_predicate_filter.sv +250 -0
- dau_core-0.1.1/dau_core/hdl/dau_int32_map_alu.sv +228 -0
- dau_core-0.1.1/dau_core/hdl/dau_int32_predicate_filter.sv +297 -0
- dau_core-0.1.1/dau_core/hdl/dau_int32_record_gather.sv +244 -0
- dau_core-0.1.1/dau_core/hdl/dau_key_mask_dispatcher.sv +592 -0
- dau_core-0.1.1/dau_core/hdl/dau_key_membership_filter.sv +526 -0
- dau_core-0.1.1/dau_core/hdl/dau_keyed_state.sv +316 -0
- dau_core-0.1.1/dau_core/hdl/dau_map_alu_pkg.sv +74 -0
- dau_core-0.1.1/dau_core/hdl/dau_market_feature.sv +262 -0
- dau_core-0.1.1/dau_core/hdl/dau_pair_key_filter.sv +251 -0
- dau_core-0.1.1/dau_core/hdl/dau_predicate_pkg.sv +70 -0
- dau_core-0.1.1/dau_core/hdl/dau_range_partitioner.sv +341 -0
- dau_core-0.1.1/dau_core/hdl/dau_record_batch_aggregation.sv +492 -0
- dau_core-0.1.1/dau_core/hdl/dau_record_gearbox.sv +188 -0
- dau_core-0.1.1/dau_core/hdl/dau_rolling_extremum.sv +389 -0
- dau_core-0.1.1/dau_core/hdl/dau_rolling_moments.sv +484 -0
- dau_core-0.1.1/dau_core/hdl/dau_row_map_alu.sv +312 -0
- dau_core-0.1.1/dau_core/hdl/dau_row_predicate_filter.sv +416 -0
- dau_core-0.1.1/dau_core/hdl/dau_row_unpack.sv +578 -0
- dau_core-0.1.1/dau_core/hdl/dau_scratchpad.sv +230 -0
- dau_core-0.1.1/dau_core/hdl/dau_session_gap.sv +439 -0
- dau_core-0.1.1/dau_core/hdl/dau_stream_aggregation.sv +178 -0
- dau_core-0.1.1/dau_core/hdl/dau_stream_broadcast.sv +41 -0
- dau_core-0.1.1/dau_core/hdl/dau_streaming_dedup.sv +418 -0
- dau_core-0.1.1/dau_core/hdl/dau_streaming_top_k.sv +275 -0
- dau_core-0.1.1/dau_core/hdl/dau_stride_distributor.sv +250 -0
- dau_core-0.1.1/dau_core/hdl/dau_time_bucket_key.sv +269 -0
- dau_core-0.1.1/dau_core/hdl/dau_wide_field_sum_aggregation.sv +346 -0
- dau_core-0.1.1/dau_core/hdl/dau_wide_row_map_alu.sv +304 -0
- dau_core-0.1.1/dau_core/hdl/dau_wide_row_predicate_filter.sv +364 -0
- dau_core-0.1.1/dau_core/hdl/types.svh +71 -0
- dau_core-0.1.1/dau_core/hero.py +204 -0
- dau_core-0.1.1/dau_core/ln_generator.py +447 -0
- dau_core-0.1.1/dau_core/models.py +126 -0
- dau_core-0.1.1/dau_core/normal_cdf_generator.py +318 -0
- dau_core-0.1.1/dau_core/operators.py +1993 -0
- dau_core-0.1.1/dau_core/registers.py +464 -0
- dau_core-0.1.1/dau_core/registry.py +194 -0
- dau_core-0.1.1/dau_core/stream.py +356 -0
- dau_core-0.1.1/dau_core/temporal.py +522 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/__init__.py +1 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_arrow_lite_stream_aggregation_tb.py +189 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_asof_backward_tb.py +288 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_asof_feature_chain_tb.py +252 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_axi_bar_job_tb.py +176 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_axi_bar_noc_tb.py +207 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_axi_burst_reader_tb.py +103 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_axi_random_probe_tb.py +104 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_axi_sort_noc_tb.py +241 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_bar_aggregation_tb.py +220 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_bitonic_sorter_tb.py +344 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_broadcast_hash_join_small_tb.py +71 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_broadcast_hash_join_tb.py +760 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_bucket_agg_chain_tb.py +163 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_datetime_format_tb.py +236 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_field_sum_aggregation_tb.py +371 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_fixed_point_divide_tb.py +393 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_fixed_point_exp_tb.py +130 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_fixed_point_ln_tb.py +248 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_fixed_point_sqrt_tb.py +367 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_grouped_aggregation_tb.py +206 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_grouped_field_aggregation_tb.py +200 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_grouped_field_sum_aggregation_tb.py +472 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_hash_grouped_aggregation_tb.py +328 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_hero_datapath_tb.py +179 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_int32_keyed_map_alu_tb.py +410 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_int32_keyed_predicate_filter_tb.py +418 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_int32_map_alu_tb.py +206 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_int32_predicate_filter_tb.py +193 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_int32_record_gather_tb.py +256 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_exact_tb.py +130 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_hash_tb.py +127 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_multi_tb.py +158 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_records_tb.py +172 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_tb.py +269 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_mask_dispatcher_wide_tb.py +193 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_membership_filter_single_word_tb.py +97 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_key_membership_filter_tb.py +625 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_keyed_state_tb.py +196 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_market_feature_tb.py +196 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_normal_cdf_tb.py +145 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_pair_key_filter_tb.py +296 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_range_partitioner_tb.py +402 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_record_batch_aggregation_tb.py +369 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_record_gearbox_tb.py +229 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_rolling_extremum_tb.py +252 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_rolling_moments_tb.py +207 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_map_alu_tb.py +339 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_predicate_filter_tb.py +587 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_predicate_filter_width_tb.py +150 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_unpack_slots_tb.py +349 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_unpack_tb.py +783 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_row_unpack_wide_tb.py +428 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_scratchpad_tb.py +194 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_session_gap_tb.py +208 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_stream_aggregation_tb.py +94 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_streaming_dedup_tb.py +312 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_streaming_top_k_tb.py +209 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_stride_distributor_tb.py +120 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_time_bucket_key_tb.py +182 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_wide_field_sum_aggregation_tb.py +169 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_wide_ingest_chain_tb.py +141 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_wide_row_map_alu_tb.py +255 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/dau_wide_row_predicate_filter_tb.py +284 -0
- dau_core-0.1.1/dau_core/tests/cocotb_benches/rate_probe.py +95 -0
- dau_core-0.1.1/dau_core/tests/conftest.py +22 -0
- dau_core-0.1.1/dau_core/tests/exhaustive_sweep.py +90 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/README.md +17 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/bars_full.csv +8 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/bars_regular.csv +7 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/prepared_full.csv +13 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/prepared_regular.csv +12 -0
- dau_core-0.1.1/dau_core/tests/fixtures/ohlcv/trades.csv +14 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_arrow_lite_stream_aggregation_tb.sv +250 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_asof_feature_chain.sv +149 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_axi_bar_job_sim.sv +195 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_axi_bar_job_tb.sv +130 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_axi_random_probe_sim.sv +73 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_bar_aggregation_tb.sv +151 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_bucket_agg_chain.sv +78 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_grouped_aggregation_tb.sv +170 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_hero_datapath.sv +230 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_int32_map_alu_tb.sv +170 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_int32_predicate_filter_tb.sv +165 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_record_batch_aggregation_tb.sv +214 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_stream_aggregation_tb.sv +170 -0
- dau_core-0.1.1/dau_core/tests/sv/dau_wide_ingest_chain.sv +73 -0
- dau_core-0.1.1/dau_core/tests/test_aggregation_goldens.py +43 -0
- dau_core-0.1.1/dau_core/tests/test_aggregation_tile_hdl.py +71 -0
- dau_core-0.1.1/dau_core/tests/test_benches_can_fail.py +125 -0
- dau_core-0.1.1/dau_core/tests/test_capability_contract.py +235 -0
- dau_core-0.1.1/dau_core/tests/test_composition.py +1342 -0
- dau_core-0.1.1/dau_core/tests/test_contributed_cores.py +112 -0
- dau_core-0.1.1/dau_core/tests/test_contributed_discovery.py +156 -0
- dau_core-0.1.1/dau_core/tests/test_core_contract.py +38 -0
- dau_core-0.1.1/dau_core/tests/test_cores.py +1006 -0
- dau_core-0.1.1/dau_core/tests/test_datetime_format.py +125 -0
- dau_core-0.1.1/dau_core/tests/test_design.py +58 -0
- dau_core-0.1.1/dau_core/tests/test_docs.py +49 -0
- dau_core-0.1.1/dau_core/tests/test_element_types.py +204 -0
- dau_core-0.1.1/dau_core/tests/test_fixed_point_exp.py +145 -0
- dau_core-0.1.1/dau_core/tests/test_fixed_point_ln.py +140 -0
- dau_core-0.1.1/dau_core/tests/test_fixed_point_normal_cdf.py +72 -0
- dau_core-0.1.1/dau_core/tests/test_generated_cores.py +131 -0
- dau_core-0.1.1/dau_core/tests/test_hash_grouped.py +157 -0
- dau_core-0.1.1/dau_core/tests/test_hdl_cocotb.py +1092 -0
- dau_core-0.1.1/dau_core/tests/test_hdl_elaboration.py +167 -0
- dau_core-0.1.1/dau_core/tests/test_hdl_parameter_bindings_resolve.py +87 -0
- dau_core-0.1.1/dau_core/tests/test_hdl_sources.py +53 -0
- dau_core-0.1.1/dau_core/tests/test_hdl_verilator.py +156 -0
- dau_core-0.1.1/dau_core/tests/test_hero.py +163 -0
- dau_core-0.1.1/dau_core/tests/test_lazy_exports.py +78 -0
- dau_core-0.1.1/dau_core/tests/test_measured_from_matches_the_hdl.py +234 -0
- dau_core-0.1.1/dau_core/tests/test_ohlcv_fixtures.py +82 -0
- dau_core-0.1.1/dau_core/tests/test_operators.py +1359 -0
- dau_core-0.1.1/dau_core/tests/test_output_beat_declarations.py +91 -0
- dau_core-0.1.1/dau_core/tests/test_parameter_bounds_match_the_hdl.py +144 -0
- dau_core-0.1.1/dau_core/tests/test_public_tile_surface.py +175 -0
- dau_core-0.1.1/dau_core/tests/test_readme.py +26 -0
- dau_core-0.1.1/dau_core/tests/test_record_batch.py +113 -0
- dau_core-0.1.1/dau_core/tests/test_registers_and_capabilities.py +320 -0
- dau_core-0.1.1/dau_core/tests/test_stream.py +73 -0
- dau_core-0.1.1/dau_core/tests/test_temporal.py +242 -0
- dau_core-0.1.1/dau_core/tests/test_validation_at_use.py +222 -0
- dau_core-0.1.1/dau_core/workflows.py +53 -0
- dau_core-0.1.1/pyproject.toml +194 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.a
|
|
8
|
+
*.o
|
|
9
|
+
*.dSYM
|
|
10
|
+
*.so
|
|
11
|
+
*.obj
|
|
12
|
+
*.dll
|
|
13
|
+
*.exp
|
|
14
|
+
*.lib
|
|
15
|
+
|
|
16
|
+
# vcpkg
|
|
17
|
+
vcpkg/
|
|
18
|
+
vcpkg_installed/
|
|
19
|
+
|
|
20
|
+
# Rust
|
|
21
|
+
target
|
|
22
|
+
target-capi
|
|
23
|
+
|
|
24
|
+
# Distribution / packaging
|
|
25
|
+
.Python
|
|
26
|
+
build/
|
|
27
|
+
develop-eggs/
|
|
28
|
+
dist/
|
|
29
|
+
downloads/
|
|
30
|
+
eggs/
|
|
31
|
+
.eggs/
|
|
32
|
+
lib/
|
|
33
|
+
lib64/
|
|
34
|
+
parts/
|
|
35
|
+
sdist/
|
|
36
|
+
var/
|
|
37
|
+
wheels/
|
|
38
|
+
pip-wheel-metadata/
|
|
39
|
+
share/python-wheels/
|
|
40
|
+
*.egg-info/
|
|
41
|
+
.installed.cfg
|
|
42
|
+
*.egg
|
|
43
|
+
MANIFEST
|
|
44
|
+
|
|
45
|
+
# PyInstaller
|
|
46
|
+
*.manifest
|
|
47
|
+
*.spec
|
|
48
|
+
|
|
49
|
+
# Installer logs
|
|
50
|
+
pip-log.txt
|
|
51
|
+
pip-delete-this-directory.txt
|
|
52
|
+
|
|
53
|
+
# Unit test / coverage reports
|
|
54
|
+
htmlcov/
|
|
55
|
+
.tox/
|
|
56
|
+
.nox/
|
|
57
|
+
.coverage
|
|
58
|
+
.coverage.*
|
|
59
|
+
.cache
|
|
60
|
+
nosetests.xml
|
|
61
|
+
coverage.xml
|
|
62
|
+
junit.xml
|
|
63
|
+
*.cover
|
|
64
|
+
*.py,cover
|
|
65
|
+
.hypothesis/
|
|
66
|
+
.pytest_cache/
|
|
67
|
+
|
|
68
|
+
# Django
|
|
69
|
+
*.log
|
|
70
|
+
local_settings.py
|
|
71
|
+
db.sqlite3
|
|
72
|
+
db.sqlite3-journal
|
|
73
|
+
|
|
74
|
+
# IPython
|
|
75
|
+
profile_default/
|
|
76
|
+
ipython_config.py
|
|
77
|
+
|
|
78
|
+
# pyenv
|
|
79
|
+
.python-version
|
|
80
|
+
|
|
81
|
+
# pipenv
|
|
82
|
+
Pipfile.lock
|
|
83
|
+
|
|
84
|
+
# Celery
|
|
85
|
+
celerybeat-schedule
|
|
86
|
+
celerybeat.pid
|
|
87
|
+
|
|
88
|
+
# Airspeed Velocity
|
|
89
|
+
.asv
|
|
90
|
+
|
|
91
|
+
# Environments
|
|
92
|
+
.env
|
|
93
|
+
.venv
|
|
94
|
+
env/
|
|
95
|
+
venv/
|
|
96
|
+
ENV/
|
|
97
|
+
env.bak/
|
|
98
|
+
venv.bak/
|
|
99
|
+
|
|
100
|
+
# Spyder project settings
|
|
101
|
+
.spyderproject
|
|
102
|
+
.spyproject
|
|
103
|
+
|
|
104
|
+
# Rope project settings
|
|
105
|
+
.ropeproject
|
|
106
|
+
|
|
107
|
+
# mkdocs documentation
|
|
108
|
+
/site
|
|
109
|
+
|
|
110
|
+
# mypy
|
|
111
|
+
.mypy_cache/
|
|
112
|
+
.dmypy.json
|
|
113
|
+
dmypy.json
|
|
114
|
+
|
|
115
|
+
# Pyre type checker
|
|
116
|
+
.pyre/
|
|
117
|
+
|
|
118
|
+
# Documentation
|
|
119
|
+
/site
|
|
120
|
+
index.md
|
|
121
|
+
docs/_build/
|
|
122
|
+
docs/api
|
|
123
|
+
docs/html
|
|
124
|
+
docs/index.md
|
|
125
|
+
docs/jupyter_execute
|
|
126
|
+
docs/src/_build/
|
|
127
|
+
docs/superpowers
|
|
128
|
+
index.md
|
|
129
|
+
|
|
130
|
+
# JS
|
|
131
|
+
js/coverage
|
|
132
|
+
js/dist
|
|
133
|
+
js/lib
|
|
134
|
+
js/node_modules
|
|
135
|
+
js/test-results
|
|
136
|
+
js/playwright-report
|
|
137
|
+
js/*.tgz
|
|
138
|
+
|
|
139
|
+
# Jupyter
|
|
140
|
+
.ipynb_checkpoints
|
|
141
|
+
.autoversion
|
|
142
|
+
Untitled*.ipynb
|
|
143
|
+
dau_core/extension
|
|
144
|
+
dau_core/nbextension
|
|
145
|
+
dau_core/labextension
|
|
146
|
+
|
|
147
|
+
# Emscripten SDK (locally installed)
|
|
148
|
+
emsdk
|
|
149
|
+
.pyodide_build/
|
|
150
|
+
|
|
151
|
+
# Mac
|
|
152
|
+
.DS_Store
|
|
153
|
+
|
|
154
|
+
# Hydra
|
|
155
|
+
/outputs/
|
|
156
|
+
/multirun/
|
|
157
|
+
|
|
158
|
+
# Rendered output of generated cores. This is the default render root, so a
|
|
159
|
+
# test run or a render-cores task materializes tiles here; committing them
|
|
160
|
+
# leaves a second copy of a tile that only the operating point defines, and
|
|
161
|
+
# whichever of the two is stale is the one that gets synthesized.
|
|
162
|
+
dau_core/hdl/generated/
|
|
163
|
+
|
|
164
|
+
# AI
|
|
165
|
+
ROADMAP.md
|
|
166
|
+
AGENTS.md
|
|
167
|
+
.github/hooks/sdlc.json
|
|
168
|
+
.superpowers
|
dau_core-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 the dau-core authors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
dau_core-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: dau-core
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Core IP for dau projects
|
|
5
|
+
Project-URL: Repository, https://github.com/dau-dev/dau-core
|
|
6
|
+
Project-URL: Homepage, https://github.com/dau-dev/dau-core
|
|
7
|
+
Author-email: the dau-core authors <dev@dau.dev>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: ccflow>=0.9
|
|
21
|
+
Requires-Dist: hydra-core
|
|
22
|
+
Requires-Dist: pydantic>=2
|
|
23
|
+
Provides-Extra: develop
|
|
24
|
+
Requires-Dist: build; extra == 'develop'
|
|
25
|
+
Requires-Dist: bump-my-version; extra == 'develop'
|
|
26
|
+
Requires-Dist: check-dist; extra == 'develop'
|
|
27
|
+
Requires-Dist: cocotb; extra == 'develop'
|
|
28
|
+
Requires-Dist: codespell; extra == 'develop'
|
|
29
|
+
Requires-Dist: dau-build>=0.15; extra == 'develop'
|
|
30
|
+
Requires-Dist: dau-sim; extra == 'develop'
|
|
31
|
+
Requires-Dist: hatchling; extra == 'develop'
|
|
32
|
+
Requires-Dist: mdformat; extra == 'develop'
|
|
33
|
+
Requires-Dist: mdformat-frontmatter; extra == 'develop'
|
|
34
|
+
Requires-Dist: mdformat-tables>=1; extra == 'develop'
|
|
35
|
+
Requires-Dist: omegaconf; extra == 'develop'
|
|
36
|
+
Requires-Dist: pytest; extra == 'develop'
|
|
37
|
+
Requires-Dist: pytest-cov; extra == 'develop'
|
|
38
|
+
Requires-Dist: ruff; extra == 'develop'
|
|
39
|
+
Requires-Dist: twine; extra == 'develop'
|
|
40
|
+
Requires-Dist: ty; extra == 'develop'
|
|
41
|
+
Requires-Dist: uv; extra == 'develop'
|
|
42
|
+
Requires-Dist: wheel; extra == 'develop'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# dau core
|
|
46
|
+
|
|
47
|
+
Hardware contracts, golden semantics, and the core registry for the DAU accelerator stack
|
|
48
|
+
|
|
49
|
+
[](https://github.com/dau-dev/dau-core/actions/workflows/build.yaml)
|
|
50
|
+
[](https://codecov.io/gh/dau-dev/dau-core)
|
|
51
|
+
[](https://github.com/dau-dev/dau-core)
|
|
52
|
+
[](https://pypi.python.org/pypi/dau-core)
|
|
53
|
+
|
|
54
|
+
## Overview
|
|
55
|
+
|
|
56
|
+
`dau-core` holds the definitions the other DAU packages share:
|
|
57
|
+
|
|
58
|
+
- **The core registry.** Every HDL building block (streaming operator
|
|
59
|
+
tiles, AXI stream infrastructure, shell adapters, shared packages) is
|
|
60
|
+
described by a `CoreDefinition`: its module, sources, dependencies,
|
|
61
|
+
golden model, testbench, measured resources, module parameters, and
|
|
62
|
+
stream-contract facts.
|
|
63
|
+
- **Golden models.** Each operator has a pure-Python reference
|
|
64
|
+
implementation. Hardware results are compared byte for byte against it,
|
|
65
|
+
so the golden defines what the tile computes.
|
|
66
|
+
- **Wire contracts.** Register maps, stream framing structs, DMA
|
|
67
|
+
constraints, capability advertisement, and composition specs.
|
|
68
|
+
|
|
69
|
+
The package also ships the SystemVerilog for every registered core.
|
|
70
|
+
Every operator tile has a golden, a cocotb bench under Verilator, and
|
|
71
|
+
measured resource points. The stream infrastructure and shell adapters
|
|
72
|
+
are tested inside the composed shells instead of one by one. Five tiles
|
|
73
|
+
generate their source from their parameters when rendered.
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
The full documentation is at
|
|
78
|
+
[dau-dev.github.io/dau-core](https://dau-dev.github.io/dau-core/).
|
|
79
|
+
|
|
80
|
+
- **Tutorial**: [Read a tile's contract end to end](docs/src/tutorial/read-a-tile-contract.md)
|
|
81
|
+
follows one operator through the five places its definition lives.
|
|
82
|
+
- **How-to guides**: [Add an operator tile](docs/src/how-to/add-an-operator-tile.md) ·
|
|
83
|
+
[Test a core](docs/src/how-to/test-a-core.md) ·
|
|
84
|
+
[Measure a resource envelope](docs/src/how-to/measure-a-resource-envelope.md), the one
|
|
85
|
+
step that needs a synthesis host · [Develop and contribute](docs/src/how-to/develop.md).
|
|
86
|
+
- **Reference**: [`CoreDefinition` fields](docs/src/reference/core-definition.md) ·
|
|
87
|
+
[Registry guards](docs/src/reference/registry-guards.md) and what each one checks.
|
|
88
|
+
- **Explanation**: [Why cores are declared in config](docs/src/explanation/why-cores-are-declared-in-config.md) ·
|
|
89
|
+
[Why each tile has a golden model](docs/src/explanation/why-each-tile-has-a-golden-model.md) ·
|
|
90
|
+
[Why resource costs are measured](docs/src/explanation/why-resources-are-measured.md).
|
|
91
|
+
|
|
92
|
+
## The core registry
|
|
93
|
+
|
|
94
|
+
Cores are declared in a [Hydra](https://hydra.cc) config tree,
|
|
95
|
+
`dau_core/config/dau-core/cores.yaml`, with one `CoreDefinition` entry per
|
|
96
|
+
core, and loaded into the [ccflow](https://github.com/Point72/ccflow)
|
|
97
|
+
`ModelRegistry` at `/dau-core/<core-name>`. The package adds the tree to the
|
|
98
|
+
shared Hydra search path through a `hydra.lernaplugins` entry point, so an
|
|
99
|
+
application that composes Hydra configs finds the cores without importing
|
|
100
|
+
`dau_core`.
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from dau_core.registry import loaded_cores, core, sources_for
|
|
104
|
+
|
|
105
|
+
cores = loaded_cores() # name -> CoreDefinition, registry order
|
|
106
|
+
tile = core("int32-predicate-filter") # one core
|
|
107
|
+
print(tile.kind.value) # "operator"
|
|
108
|
+
print(tile.golden) # "dau_core.operators:filter_values"
|
|
109
|
+
print(tile.resources) # measured LUT/FF/BRAM/DSP envelope
|
|
110
|
+
|
|
111
|
+
sources_for("stream-aggregation") # dependency-closed HDL paths, in order
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The palette has 46 operator tiles (filters, maps, ordered and hash-mode
|
|
115
|
+
aggregations, joins, membership, sorters, partitioners, dispatchers,
|
|
116
|
+
temporal operators, top-k, fixed-point transcendentals, and the stateful
|
|
117
|
+
group), 5 stream-infrastructure blocks (AXI burst reader, broadcast, record
|
|
118
|
+
writer, write mux, row unpacker), 4 shell adapters, 3 shared SV packages,
|
|
119
|
+
and 1 simulation model: 59 entries in all. `loaded_cores()` returns the
|
|
120
|
+
current list. If an application has already composed the registry, with or
|
|
121
|
+
without overrides, the accessors read that composition instead of loading
|
|
122
|
+
the packaged defaults.
|
|
123
|
+
|
|
124
|
+
## Golden models
|
|
125
|
+
|
|
126
|
+
Each operator tile's behavior is defined by a pure function or small model
|
|
127
|
+
in `dau_core.operators` or `dau_core.temporal`. Tile configurations are
|
|
128
|
+
frozen [pydantic](https://docs.pydantic.dev) models that mirror the tile's
|
|
129
|
+
config ports, and the same object drives the golden, the testbench, and
|
|
130
|
+
design emission. Their mapping fields are read-only, `replace()` is a
|
|
131
|
+
`model_copy` that validates the result, and `check()` validates a model
|
|
132
|
+
again on demand, so a copy that skipped validation is rejected before
|
|
133
|
+
anything hashes or prices it.
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from dau_core.operators import (
|
|
137
|
+
PredicateOp, RowField, RowPredicateConfig, RowPredicateTerm,
|
|
138
|
+
filter_rows_by_predicate, streaming_top_k,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
config = RowPredicateConfig(
|
|
142
|
+
term0=RowPredicateTerm(field=RowField.VALUE, op=PredicateOp.GT, constant=10),
|
|
143
|
+
)
|
|
144
|
+
rows = [(1, 5, 0, 0), (2, 25, 0, 0), (3, 11, 0, 0)]
|
|
145
|
+
filter_rows_by_predicate(rows, config) # -> [(2, 25, 0, 0), (3, 11, 0, 0)]
|
|
146
|
+
|
|
147
|
+
streaming_top_k(rows, k=2) # ORDER BY key DESC LIMIT 2, ties by arrival
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`dau_core.temporal` covers the time-series operators (backward as-of join,
|
|
151
|
+
market features, time/volume/dollar/imbalance bars, rolling moments, EWMA)
|
|
152
|
+
in an exact-integer domain: divisions are deferred to the host, so goldens
|
|
153
|
+
and hardware agree bit-for-bit.
|
|
154
|
+
|
|
155
|
+
## Composition specs
|
|
156
|
+
|
|
157
|
+
A shell datapath is described as data: `ScanCompositionSpec` names
|
|
158
|
+
registry cores, their config-port bindings, and module-parameter overrides
|
|
159
|
+
for a one-scan-N-lanes design. Construction validates everything against
|
|
160
|
+
the registry (operator kinds, status-contract roles, declared parameter
|
|
161
|
+
bounds) and raises `CompositionError` before any HDL is generated;
|
|
162
|
+
`estimated_resources` prices a spec from the measured envelopes.
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
from dau_core.composition import LaneSpec, ScanCompositionSpec, TileSpec, estimated_resources
|
|
166
|
+
|
|
167
|
+
spec = ScanCompositionSpec(
|
|
168
|
+
name="bar-noc-4",
|
|
169
|
+
lanes=tuple(
|
|
170
|
+
LaneSpec(
|
|
171
|
+
tile=TileSpec(core="bar-aggregation", config={"cfg_mode": "2'd0"}),
|
|
172
|
+
partition=TileSpec(core="pair-key-filter",
|
|
173
|
+
config={"cfg_key_mask": "32'd3", "cfg_key_match": f"32'd{lane}"}),
|
|
174
|
+
)
|
|
175
|
+
for lane in range(4)
|
|
176
|
+
),
|
|
177
|
+
)
|
|
178
|
+
print(estimated_resources(spec, part="xc7a200tfbg484-2", clock_ns=8.0))
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Pricing needs a part and a clock. Each core is looked up at exactly that
|
|
182
|
+
part, clock, and parameter set, and a combination that has not been
|
|
183
|
+
measured raises `UnmeasuredResourceError` naming it. Nothing is
|
|
184
|
+
interpolated.
|
|
185
|
+
|
|
186
|
+
### Wide lanes
|
|
187
|
+
|
|
188
|
+
A quad-row operator core takes one row per beat at the rate its `ingest`
|
|
189
|
+
contract declares (one row per cycle or per two cycles, depending on the
|
|
190
|
+
tile). A `wide-row-stream` core takes the reader's whole beat,
|
|
191
|
+
`SLOTS = data_width / 128` quad rows every cycle, with no dispatcher and no
|
|
192
|
+
fan-out. The three row operators have wide counterparts
|
|
193
|
+
(`wide-row-predicate-filter`, `wide-row-map-alu`,
|
|
194
|
+
`wide-field-sum-aggregation`) that take the same configs in the same order;
|
|
195
|
+
only the core names change.
|
|
196
|
+
|
|
197
|
+
`data_width` must equal `SLOTS * 128` or construction raises
|
|
198
|
+
`CompositionError`. A wide lane cannot use the packed front unpacker,
|
|
199
|
+
because packing saves DMA bytes at the cost of job time and a wide lane
|
|
200
|
+
needs whole rows.
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
from dau_core.composition import LaneSpec, ScanCompositionSpec, TileSpec, estimated_resources
|
|
204
|
+
|
|
205
|
+
spec = ScanCompositionSpec(
|
|
206
|
+
name="q6-wide",
|
|
207
|
+
data_width=512, # SLOTS=4: four quad rows per cycle
|
|
208
|
+
lanes=(
|
|
209
|
+
LaneSpec(
|
|
210
|
+
tile=TileSpec(core="wide-field-sum-aggregation",
|
|
211
|
+
config={"cfg_field_mask": "4'b0010"}),
|
|
212
|
+
chain=(
|
|
213
|
+
# shipdate >= 8766 AND shipdate < 9131
|
|
214
|
+
TileSpec(core="wide-row-predicate-filter", config={
|
|
215
|
+
"cfg_field0": "2'd0", "cfg_op0": "3'd6", "cfg_constant0": "32'd8766",
|
|
216
|
+
"cfg_combine01": "2'd1",
|
|
217
|
+
"cfg_field1": "2'd0", "cfg_op1": "3'd3", "cfg_constant1": "32'd9131",
|
|
218
|
+
"cfg_combine2": "2'd0",
|
|
219
|
+
"cfg_field2": "2'd0", "cfg_op2": "3'd0", "cfg_constant2": "32'd0"}),
|
|
220
|
+
# value = value * aux0 >> 15
|
|
221
|
+
TileSpec(core="wide-row-map-alu", config={
|
|
222
|
+
"cfg_op": "3'd4", "cfg_dst_field": "2'd1",
|
|
223
|
+
"cfg_src_a_field": "2'd1", "cfg_src_b_field": "2'd2",
|
|
224
|
+
"cfg_shift": "5'd15"}),
|
|
225
|
+
),
|
|
226
|
+
),
|
|
227
|
+
),
|
|
228
|
+
)
|
|
229
|
+
print(estimated_resources(spec, part="xc7k325tffg900-2", clock_ns=8.0))
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The rate model predicts rows / SLOTS / clock. At SF1 that is
|
|
233
|
+
6,001,215 / 4 / 125 MHz = 12.0 ms, and the job measures 12.4 ms on
|
|
234
|
+
hardware.
|
|
235
|
+
|
|
236
|
+
## Workflows and typed results
|
|
237
|
+
|
|
238
|
+
Multi-stage reference workflows are ccflow `CallableModel`s with typed
|
|
239
|
+
`ResultBase` results, so they can be registered and composed with Hydra
|
|
240
|
+
like the rest of the package. `dau_core.workflows.HeroWorkflow` runs the
|
|
241
|
+
temporal pipeline (as-of align, feature map, time bars, rolling moments)
|
|
242
|
+
over the goldens and records the row count at each stage and a per-stage
|
|
243
|
+
materialization cost (`dau_core.hero`).
|
|
244
|
+
|
|
245
|
+
```python
|
|
246
|
+
from ccflow import GenericContext
|
|
247
|
+
from dau_core.temporal import generate_market_stream
|
|
248
|
+
from dau_core.workflows import HeroWorkflow
|
|
249
|
+
|
|
250
|
+
stream = generate_market_stream(seed=7, num_symbols=3)
|
|
251
|
+
result = HeroWorkflow(bar_width=64, roll_window=3)(GenericContext(value=stream))
|
|
252
|
+
print(result.funnel) # input -> matched -> bars -> rolling row counts
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Wire contracts
|
|
256
|
+
|
|
257
|
+
- `dau_core.registers`: the DAU magic word, register/protocol versions,
|
|
258
|
+
register offsets, reset scopes, and the stream-job register contract
|
|
259
|
+
(trigger/status/buffer addresses).
|
|
260
|
+
- `dau_core.stream`: Arrow-lite framing (`BatchHeader`,
|
|
261
|
+
`ColumnDescriptor`, `OperationDescriptor`), logical types, operation
|
|
262
|
+
codes, record-batch limits, and shared error codes.
|
|
263
|
+
- `dau_core.capabilities`: DMA constraints and device/operator
|
|
264
|
+
capability models populated from a live device.
|
|
265
|
+
- `dau_core.capability_contract`: the composed capability advertisement
|
|
266
|
+
a built shell publishes, derived from its composition spec.
|
|
267
|
+
- `dau_core.design`: the operator-unit inventory parsed back from a
|
|
268
|
+
synthesized design's manifest.
|
|
269
|
+
|
|
270
|
+
## HDL and verification
|
|
271
|
+
|
|
272
|
+
`dau_core/hdl/` holds the SystemVerilog for every registered core, five of
|
|
273
|
+
them generated at render time. Tiles share a 64-bit valid/ready stream and
|
|
274
|
+
status contract: `input_last` ends a batch, a terminal tile closes out with
|
|
275
|
+
a status word and count, and mid-lane stages stay silent on success. The
|
|
276
|
+
tests run at three levels, all from `pytest`:
|
|
277
|
+
|
|
278
|
+
- text-contract checks over the packaged sources;
|
|
279
|
+
- standalone Verilator benches;
|
|
280
|
+
- cocotb-on-Verilator benches, golden-equal against the registered
|
|
281
|
+
reference for each tile.
|
|
282
|
+
|
|
283
|
+
## Installation
|
|
284
|
+
|
|
285
|
+
Requires Python 3.11 or newer.
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
pip install dau-core
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
> [!NOTE]
|
|
292
|
+
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
|