Commit graph

286 commits

Author SHA1 Message Date
26224abe1c
sim: properly update all VCD wires when they share simulation state
All checks were successful
/ test (pull_request) Successful in 4m8s
/ test (push) Successful in 4m42s
2026-05-05 21:12:00 -07:00
2266315944
redo #[hdl(sim)] match/let destructuring to support matching values of type Type::SimValue
All checks were successful
/ test (pull_request) Successful in 7m17s
/ test (push) Successful in 4m42s
2026-05-03 23:23:17 -07:00
7e9d7739fb
use #[hdl(cmp_eq)] for HdlOption and implement conversion <-> Option
All checks were successful
/ test (pull_request) Successful in 4m6s
/ test (push) Successful in 4m40s
2026-05-01 18:46:36 -07:00
7516ec3c24
implement #[hdl(cmp_eq)] for enums 2026-05-01 18:34:49 -07:00
8e4eeef723
add support for custom debug/display formatting of #[hdl] structs/enums
All checks were successful
/ test (pull_request) Successful in 4m6s
/ test (push) Successful in 4m41s
also cleans up default debug formatting to use the struct/enum name
(or MaskType<StructName>) instead of the implementation detail type name.
2026-04-30 23:10:49 -07:00
402f457c68
sim: Speed up updating traces by tracking which traces are written to
All checks were successful
/ test (pull_request) Successful in 4m10s
/ test (push) Successful in 4m47s
2026-04-30 19:12:20 -07:00
80b92c7dd3
change vcd output to have module contents under instance's name, more closely matching how it works in verilog
All checks were successful
/ test (pull_request) Successful in 4m18s
/ test (push) Successful in 4m54s
2026-03-26 18:21:14 -07:00
2aa41137d4
add simulator tests for queue()
All checks were successful
/ test (pull_request) Successful in 7m59s
/ test (push) Successful in 5m3s
2026-03-24 23:30:15 -07:00
a0b2dc085c
add test that simulator handles last-connect semantics properly 2026-03-24 23:29:30 -07:00
a8a541b357
sim/compiler: fix registers so they properly retain their old value when not written 2026-03-24 23:26:47 -07:00
52c41bb5db
display signals when panicking because not all inputs/outputs are written yet 2026-03-24 23:25:14 -07:00
a93e66d8ab
update ui test's expected output for having rust-src available
All checks were successful
/ test (pull_request) Successful in 4m20s
/ test (push) Successful in 4m57s
2026-03-17 20:43:46 -07:00
dbed947408
change VCD id generation to be based on hashing the path, making them better for git diff
Some checks failed
/ test (pull_request) Successful in 7m51s
/ test (push) Failing after 5m18s
2026-02-23 20:05:10 -08:00
cb4e1f42c0
silence unused import warning 2026-02-23 16:07:46 -08:00
8c270b0e35
silence warning for enums with only one variant 2026-02-23 16:07:05 -08:00
c632e5d570
speed up simulation by optimizing SimulationImpl::read_traces
All checks were successful
/ test (pull_request) Successful in 4m22s
/ test (push) Successful in 5m24s
this makes cpu/crates/cpu/tests/next_pc.rs take 56s instead of 168s
2026-02-04 15:41:09 -08:00
1bc835803b
speed up LazyInterned by redoing caching using RwLock and add a thread-local cache
All checks were successful
/ test (pull_request) Successful in 4m28s
/ test (push) Successful in 5m32s
2026-02-03 18:00:36 -08:00
9db3240644
fix UI test's expected output 2026-02-03 18:00:36 -08:00
a96efa9696
cache interned UInt/SInt types
All checks were successful
/ test (pull_request) Successful in 4m8s
/ test (push) Successful in 4m44s
2026-02-02 17:51:30 -08:00
4ac1bcbc0a
change Interner to use a sharded hash table 2026-02-02 15:49:26 -08:00
39810043ea
move Interner into new mod interner 2026-02-02 15:44:37 -08:00
26b0dc3fd8
change Interner to pub(crate) 2026-02-02 15:42:12 -08:00
11281a9842
add a thread-local cache when using TypeIdMap 2026-02-01 21:19:32 -08:00
e366793204
don't compare function pointers -- they're non-deterministic
All checks were successful
/ test (pull_request) Successful in 4m5s
/ test (push) Successful in 4m36s
2026-01-12 03:11:36 -08:00
c97b44d9d6
simplify SimValue Debug format, making complex structures much easier to read
All checks were successful
/ test (pull_request) Successful in 3m55s
/ test (push) Successful in 4m30s
2025-12-14 20:59:48 -08:00
fbe4585578
add FillInDefaultedGenerics<Type = Self> bound for SizeType
All checks were successful
/ test (pull_request) Successful in 3m56s
/ test (push) Successful in 4m26s
2025-12-10 20:10:39 -08:00
9e803223d0
support operations directly on SimValue, UIntValue, and SIntValue, and shared references to those
All checks were successful
/ test (pull_request) Successful in 3m59s
/ test (push) Successful in 4m38s
2025-11-24 00:14:53 -08:00
2a65aa2bd5
fix DynShr[SU]'s literal bits to properly shift right instead of left 2025-11-20 02:25:05 -08:00
2817cd3d58
support Rust's default binding modes when destructuring with #[hdl(sim)] let/match
All checks were successful
/ test (pull_request) Successful in 4m47s
/ test (push) Successful in 5m25s
2025-11-14 00:20:54 -08:00
053c1b2b10
implement Display for SimValue<T> 2025-11-14 00:20:54 -08:00
17b58e8edb
add utility impls for SimValue<ArrayType<_, _>>
All checks were successful
/ test (pull_request) Successful in 4m52s
/ test (push) Successful in 5m28s
2025-11-13 20:21:07 -08:00
df020e9c9b
add ExternModuleSimulatorState::read_past() and more output when simulator trace is enabled
All checks were successful
/ test (pull_request) Successful in 4m52s
/ test (push) Successful in 5m28s
2025-11-12 22:31:45 -08:00
45fea70c18
add ExternModuleSimulationState::fork_join_scope
All checks were successful
/ test (pull_request) Successful in 4m47s
/ test (push) Successful in 5m24s
2025-11-07 02:18:43 -08:00
fbc8ffa5ae
fix private fields in #[hdl] pub struct
All checks were successful
/ test (pull_request) Successful in 4m53s
/ test (push) Successful in 5m38s
2025-11-06 20:23:16 -08:00
26a7090178
add ParsedVisibility 2025-11-06 20:22:53 -08:00
0b77d1bea0
fix Simulator panicking when you use PhantomConst
All checks were successful
/ test (pull_request) Successful in 5m2s
/ test (push) Successful in 5m38s
2025-11-05 22:44:43 -08:00
840c5e1895
add ExternModuleSimulationState::resettable helper for procedural simulations that have a reset input.
All checks were successful
/ test (pull_request) Successful in 4m55s
/ test (push) Successful in 5m31s
2025-11-03 23:59:36 -08:00
c11a1743f9
add sim.fork_join() and fix Simulator to handle running futures with arbitrary wakers
All checks were successful
/ test (pull_request) Successful in 4m51s
/ test (push) Successful in 5m29s
2025-10-30 21:16:05 -07:00
0be9f9ce23
fix JobGraph::run to not busy-wait
All checks were successful
/ test (pull_request) Successful in 4m50s
/ test (push) Successful in 5m27s
2025-10-27 22:57:12 -07:00
0b82178740
add PhantomConstGet to the known Type bounds for #[hdl] struct/enum
All checks were successful
/ test (pull_request) Successful in 4m54s
/ test (push) Successful in 5m28s
2025-10-27 20:08:22 -07:00
4b24a88641
add docs for #[hdl] and particularly for #[hdl] type aliases
All checks were successful
/ test (pull_request) Successful in 4m50s
/ test (push) Successful in 5m26s
2025-10-26 03:25:35 -07:00
094c77e26e
add #[hdl(get(|v| ...))] type GetStuff<P: PhantomConstGet<MyStruct>> = MyType or DynSize; 2025-10-26 03:25:35 -07:00
d2c8b023bf
deny broken docs 2025-10-26 03:25:35 -07:00
edcc5927a5
don't cache external job failures if they could be caused by the user killing processes
All checks were successful
/ test (pull_request) Successful in 4m51s
/ test (push) Successful in 5m30s
2025-10-24 02:27:20 -07:00
7dc4417874
add test_many_memories so we catch if memories are iterated in an inconsistent order like in 838bd469ce
All checks were successful
/ test (pull_request) Successful in 4m44s
/ test (push) Successful in 5m22s
2025-10-24 01:40:30 -07:00
838bd469ce
change SimulationImpl::trace_memories to a BTreeMap for consistent iteration order 2025-10-24 00:53:13 -07:00
b6e4cd0614
move FormalMode to crate::testing and add to prelude 2025-10-24 00:14:04 -07:00
3e5b2f126a
make UIntInRange[Inclusive][Type] castable from/to any UInt<N> and add methods to get bit_width, start, and end 2025-10-23 23:52:41 -07:00
b3cc28e2b6
add transmit-only UART example
All checks were successful
/ test (pull_request) Successful in 4m33s
2025-10-22 20:11:02 -07:00
26840daf13
arty_a7: add divided clocks as available input peripherals so you're not stuck with 100MHz 2025-10-22 20:11:02 -07:00