Commit Graph

292 Commits

Author SHA1 Message Date
7c1824d58c cross: list: document why we use the flat impl 2022-08-15 18:46:44 -07:00
dcbef02765 cross: backfill test for list Appendable::append 2022-08-15 16:52:03 -07:00
a3f2b0b33f cross: list: more tests for fold operation 2022-08-15 03:39:22 -07:00
663d657969 cross: list: implement a Fold operation 2022-08-15 03:33:11 -07:00
1a86fb5ca3 cross: list: fold MaybeMeta and Meta into one trait 2022-08-15 02:32:47 -07:00
22051a39f8 cross: list: s/decl_/impl_/: these are implementations, not declarations 2022-08-14 21:04:52 -07:00
35d0e6a96d cross: list: add an Appendable trait.
this isn't tested... hope it works!
2022-08-14 21:03:49 -07:00
6e9b4465cb impl IntoList for all 100 list types
didn't end up using the Chomp stuff.
2022-08-14 21:01:49 -07:00
2225f98ec8 cross: list: implement IntoList on top of ChompTuple
this should be easier for macro generation of the impl.
2022-08-14 19:52:37 -07:00
19893157fa port: legacy sim accessors test to spirv 2022-08-14 19:16:09 -07:00
f61c0aeb00 spirv_backend: document why we don't support f64 2022-08-14 19:15:58 -07:00
1e994a4feb app: multi_core_inverter: more experiments (clock decay length, drive current, clock length) 2022-08-14 16:24:58 -07:00
f1143ec365 app: multi_core_inverter: don't save meas.csv
this boosts perf by like 5x
2022-08-13 16:20:24 -07:00
ee93c22f4a app: multi_core_inverter: perf: move the stimulus Gating to outside the CurlStimulus
the region.contains() logic is much more expensive than the time bounds
check.
this gets an easy 50% perf boost to the ENTIRE simulation
2022-08-13 15:00:56 -07:00
434dc2cbd5 app: multi_core_inverter: de-virtualize the stimuli
this gets like a 5% perf gain.
there are obviously cleaner ways to do it (e.g. use a ListVisitor),
but this is only a proof of concept.

given the low perf difference, i'll likely revert this or explore other
options.
2022-08-13 03:51:52 -07:00
bbb8b2b9ae driver: better APIs around list-based stimuli 2022-08-13 03:51:01 -07:00
df2ccac1d7 cross: list: implement Indexable up to P99
was previously P4
2022-08-13 03:50:11 -07:00
858e787c19 driver: allow preserving the Stimuli as a concrete List 2022-08-12 18:03:10 -07:00
40449c4165 stim: implement AbstractStimulus for any List of stimuli
note that this doesn't handle zero-length lists (yet).
2022-08-12 17:08:53 -07:00
c2f8acaf24 cross: add a List visitor/walker type 2022-08-12 16:17:26 -07:00
468f5c5225 cross: rename 'VariantHandler' -> 'Visitor' 2022-08-12 15:20:36 -07:00
a74e7fa9a0 Driver: parameterize over the Stimulus type 2022-08-12 14:47:45 -07:00
e141047bec Driver: simplify the StimuliAdapter
it was basically dead code.
2022-08-12 14:42:56 -07:00
31fd83eb34 apps: multi_core_inverter: setup for 4ns clock phases
double what they were before. gives more time for things to settle.
2022-08-12 14:42:17 -07:00
658b8616d7 Torus: correct the cross_section_normal method -- again
i should add integration tests
2022-08-12 02:23:53 -07:00
084c5bc342 Region: remove Clone from the trait, and also parameterize everything
i didn't necessarily *want* to parameterize it all,
but it turned out to be easier to do that than to force all users to
workaround the lack of Clone.
2022-08-12 01:42:19 -07:00
d5fbb4e9b2 Region: remove the Serialization requirement 2022-08-12 00:57:01 -07:00
090b1ca09a BUGFIX: Torus: don't normalize the cross section normal
this would have led to incorrectly scaled current measurements
(but not incorrect current generation). we were likely severely
over-estimating the current.
2022-08-12 00:41:25 -07:00
ae1eb861be instrument the stimulus evaluation in our sim
... stimulus evaluation accounts for like 80% of the execution time 🤦
2022-08-11 22:57:43 -07:00
09bc7492ed expose diagnostics into the Sim, and capture stimuli evaluation
this isn't publicly exposed yet.
2022-08-11 22:43:07 -07:00
e7cc78a947 diagnostics: split into their own file 2022-08-11 22:31:05 -07:00
d379a7b0ee app: multi_core_inverter: try a related experiment where S0 is initialized to logic low 2022-08-11 22:24:19 -07:00
aa8f474f52 driver: Diagnostics: clean up the impl a bit 2022-08-11 19:04:12 -07:00
4a33912164 driver: abstract the render time measurements behind a Diagnostics api 2022-08-11 18:58:22 -07:00
f7b72a72be driver: abstract the step diagnostics measurements 2022-08-11 18:41:41 -07:00
a413a4d391 driver: move last_diag_time out of the Diagnostics object 2022-08-11 18:38:36 -07:00
0c9f04981a driver: relegate more diagnostics formatting to the Diagnostics impl 2022-08-11 18:36:35 -07:00
6f1e1557b3 driver: diagnostics: track the actual number of frames stepped
this allows fps-related diagnostics to be meaningful after
serialization / restarts.
2022-08-11 18:29:58 -07:00
e85d38d415 driver: split the Diagnostics out into their own object
more diagnostic refactoring to come
2022-08-11 18:27:30 -07:00
831cbfa76c app: multi_core_inverter: tune the state serializations
less frequent (for less disk space), and also save state
in a recoverable manner
2022-08-11 18:22:55 -07:00
1928ad71cd serializer renderer: gracefully handle the case where we run out of disk space
we might still run out of space when writing CSVs and other outputs...
but that's at least less likely,
as long as we serialize the rendering.
2022-08-11 18:21:46 -07:00
c83a44299f app: multi-core-inverter: fix S4 drive signal specification
there was a spuriuous high -> low transition
2022-08-11 15:24:26 -07:00
e23ab9efd7 app: multi_core_inverter: try a 5-stage inverter (each stage inverts)
we're diverging from the blog pretty far now.
but it turns out that, because of the inversion in Maxwell's
$\nabla x E = -dB/dT$ equation, the trivial wiring actually leads to
natural inverters.
2022-08-11 03:01:08 -07:00
652621e47a app: multi_core_inverter: more precise clock management
try to control the edges when the clock is release to prevent ringing.
2022-08-10 16:39:56 -07:00
59a4419130 app: multi_core_inverter: more detailed drive cycle 2022-08-10 15:47:28 -07:00
2f91418095 post: add doc-comments for these tools 2022-08-10 14:28:20 -07:00
46a53a4dde app: multi_core_inverter: fix up the drive sequence
see the code comment for explanation.
2022-08-10 01:43:36 -07:00
3998d72d02 app: multi_core_inverter: drive all four cores for four clock cycles 2022-08-10 01:35:42 -07:00
4fe8be8951 when writing Measurements to a CSV, format them in a machine-readable manner
i haven't tested the ones which contains commas -- hopefully the CSV
encoder deals with these :-)
2022-08-10 01:34:37 -07:00
8a3a64face meas: correctly render SI prefixes for negative numbers
the previous implementation treated negative numbers as effectively
having unknown magnitude, rendering them without any adjustment.
2022-08-10 01:17:49 -07:00