add a simulator #3

Merged
programmerjake merged 58 commits from adding-simulator into master 2024-12-16 04:06:48 +00:00

I figured i should probably make a PR...

I figured i should probably make a PR...
programmerjake added 12 commits 2024-11-20 21:27:13 +00:00
WIP adding simulator
Some checks failed
/ deps (push) Successful in 17s
/ test (push) Failing after 16s
56ff69ba52
WIP implementing simulator
Some checks failed
/ test (push) Blocked by required conditions
/ deps (push) Has been cancelled
32253bc3f4
add missing copyright headers
All checks were successful
/ deps (push) Successful in 11m33s
/ test (push) Successful in 4m51s
41ce9b3474
working on simulator
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 4m50s
96b3f1fee4
working on simulator
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 4m49s
5b2abd3fca
working on simulator...
All checks were successful
/ deps (push) Successful in 20s
/ test (push) Successful in 4m58s
f780e31622
simulator WIP: use petgraph for topological sort over assignments
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 4m50s
d7d8e2e7ce
Simulation::settle_step() works for simple modules
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 4m49s
2e9d5c1835
simple combinatorial simulation works!
All checks were successful
/ deps (push) Successful in 21s
/ test (push) Successful in 4m49s
414a2d74f1
WIP adding VCD output
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 4m48s
6eef3c23b5
wire up simulator trace writing interface
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 4m48s
904752fa0c
WIP adding VCD output
All checks were successful
/ deps (push) Successful in 15s
/ test (push) Successful in 4m50s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 4m49s
16ea6850c8
programmerjake force-pushed adding-simulator from 16ea6850c8 to e2653a3245 2024-11-21 06:37:04 +00:00 Compare
programmerjake force-pushed adding-simulator from e2653a3245 to 11ddbc43c7 2024-11-21 06:54:27 +00:00 Compare
programmerjake added 1 commit 2024-11-23 00:07:45 +00:00
WIP adding deduce_resets pass
All checks were successful
/ deps (push) Successful in 19s
/ test (push) Successful in 4m46s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 4m45s
913baa37e9
programmerjake added 1 commit 2024-11-24 11:44:55 +00:00
WIP working on implementing deduce_resets pass
Some checks failed
/ deps (push) Successful in 18s
/ test (push) Failing after 1m31s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Failing after 1m31s
59be3bd645
programmerjake added 1 commit 2024-11-24 22:39:57 +00:00
working on deduce_resets pass
Some checks failed
/ deps (push) Successful in 16s
/ test (push) Failing after 1m30s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Failing after 1m32s
698b8adc23
programmerjake added 1 commit 2024-11-24 22:42:54 +00:00
increase rust version to support omitting match arms with uninhabited types
Some checks failed
/ deps (push) Successful in 17s
/ test (push) Failing after 1m18s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Failing after 1m17s
52ab134673
programmerjake added 1 commit 2024-11-24 22:46:47 +00:00
increase rust version in CI too
All checks were successful
/ deps (push) Successful in 15s
/ test (push) Successful in 4m57s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m1s
9516fe03a1
programmerjake added 2 commits 2024-11-25 08:01:28 +00:00
working on deduce_resets
All checks were successful
/ deps (push) Successful in 16s
/ test (push) Successful in 4m54s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 4m53s
3e3da53bd2
programmerjake added 1 commit 2024-11-26 08:07:27 +00:00
working on deduce_resets.rs
All checks were successful
/ deps (push) Successful in 19s
/ test (push) Successful in 4m53s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 4m52s
7851bf545c
programmerjake added 2 commits 2024-11-27 04:48:41 +00:00
make ClockDomain and Reg generic over reset type
All checks were successful
/ deps (push) Successful in 15s
/ test (push) Successful in 4m57s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 4m55s
9b5f1218fd
programmerjake added 1 commit 2024-11-27 05:27:15 +00:00
working on deduce_resets
Some checks failed
/ deps (push) Successful in 15s
/ test (push) Has been cancelled
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m1s
546010739a
programmerjake added 1 commit 2024-11-27 05:28:50 +00:00
Merge remote-tracking branch 'origin/master' into adding-simulator
All checks were successful
/ deps (push) Successful in 15s
/ test (push) Successful in 4m55s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 4m58s
9128a84284
programmerjake added 2 commits 2024-11-27 09:32:53 +00:00
working on deduce_resets
All checks were successful
/ deps (push) Successful in 16s
/ test (push) Successful in 4m57s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m3s
d744d85c66
programmerjake added 2 commits 2024-11-28 07:24:29 +00:00
deduce_resets works!
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 4m56s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m0s
6446b71afd
programmerjake added 1 commit 2024-11-28 07:52:29 +00:00
simulating circuits with deduced resets works
All checks were successful
/ deps (push) Successful in 15s
/ test (push) Successful in 4m58s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 4m58s
3abba7f9eb
programmerjake added 4 commits 2024-12-02 04:14:51 +00:00
programmerjake added 1 commit 2024-12-02 04:26:40 +00:00
test doc tests in CI
All checks were successful
/ deps (push) Successful in 16s
/ test (push) Successful in 5m16s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m18s
d3f52292a1
Author
Owner

got simulating circuits with registers to work! only things left: enums and memories and a few kinds of expressions

got simulating circuits with registers to work! only things left: enums and memories and a few kinds of expressions
programmerjake added 1 commit 2024-12-03 05:06:43 +00:00
WIP adding enums to simulator
All checks were successful
/ deps (push) Successful in 23s
/ test (push) Successful in 5m17s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m19s
4422157db8
programmerjake added 2 commits 2024-12-05 04:59:26 +00:00
sim: implement enums (except for connecting unequal enum types)
Some checks failed
/ deps (push) Successful in 18s
/ test (push) Has been cancelled
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m24s
42afd2da0e
programmerjake added 1 commit 2024-12-05 05:04:47 +00:00
vcd: handle enums with fields
All checks were successful
/ deps (push) Successful in 16s
/ test (push) Successful in 5m17s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 5m23s
643816d5b5
programmerjake added 1 commit 2024-12-06 02:17:31 +00:00
tests/sim: split expected output text into separate files
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m16s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m22s
259bee39c2
programmerjake added 2 commits 2024-12-06 04:32:49 +00:00
add BoolOrIntType::copy_bits_from_bigint_wrapping and take BigInt arguments by reference
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 5m21s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m19s
e504cfebfe
programmerjake added 1 commit 2024-12-06 05:35:42 +00:00
sim: WIP adding memory support
All checks were successful
/ deps (push) Successful in 16s
/ test (push) Successful in 5m28s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m24s
3ed7827485
programmerjake added 1 commit 2024-12-06 23:53:57 +00:00
sim: WIP working on memory
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 5m18s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m18s
9654167ca3
programmerjake added 2 commits 2024-12-10 07:03:40 +00:00
sim: implement memories, still needs testing
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m15s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m20s
e4cf66adf8
Author
Owner

I think this should be complete enough to merge once I add tests for enums and memories.

there are a few missing minor features still that I probably won't implement before merging:

  • proper implementation of connect when connecting enum types that aren't the same type -- e.g. connecting HdlOption<UInt<2>> with HdlOption<UInt<5>>. (tbh I think that's a mis-feature in FIRRTL). it already should work fine for connecting identical enum types (which is what I expect people to use almost exclusively).
  • simulating external modules -- maybe they'll be more inputs/outputs for the simulation?
  • simulating formal assume/assert/cover -- assume/assert are simple enough, cover can probably be ignored
  • handling ReadWrite memory ports with ReadUnderWrite::Old and/or non-equal read/write latencies -- blocked on: https://github.com/chipsalliance/firrtl-spec/issues/263 -- the semantics are not as expected, so I'm making sure I implement the right semantics. ReadWrite memory ports with ReadUnderWrite::New/ReadUnderWrite::Undefined and equal read/write latencies should work.
  • optimizing the generated instructions to not use bigints for nearly everything
I think this should be complete enough to merge once I add tests for enums and memories. there are a few missing minor features still that I probably won't implement before merging: * proper implementation of connect when connecting enum types that aren't the same type -- e.g. connecting `HdlOption<UInt<2>>` with `HdlOption<UInt<5>>`. (tbh I think that's a mis-feature in FIRRTL). it already should work fine for connecting identical enum types (which is what I expect people to use almost exclusively). * simulating external modules -- maybe they'll be more inputs/outputs for the simulation? * simulating formal assume/assert/cover -- assume/assert are simple enough, cover can probably be ignored * handling ReadWrite memory ports with `ReadUnderWrite::Old` and/or non-equal read/write latencies -- blocked on: https://github.com/chipsalliance/firrtl-spec/issues/263 -- the semantics are not as expected, so I'm making sure I implement the right semantics. ReadWrite memory ports with `ReadUnderWrite::New`/`ReadUnderWrite::Undefined` and equal read/write latencies should work. * optimizing the generated instructions to not use bigints for nearly everything
programmerjake added 3 commits 2024-12-11 07:41:28 +00:00
sim: add .dot output for Assignments graph for debugging
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m20s
/ deps (pull_request) Successful in 15s
/ test (pull_request) Successful in 5m21s
6b31e6d515
programmerjake added 2 commits 2024-12-11 08:01:41 +00:00
tests/sim: test_enums works!
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 5m18s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m20s
8616ee4737
programmerjake added 1 commit 2024-12-12 07:29:06 +00:00
sim: add WIP memory test
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m16s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m19s
393f78a14d
programmerjake added 2 commits 2024-12-13 00:27:48 +00:00
sim/interpreter: add addresses to instruction listing
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m20s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m19s
8d030ac65d
programmerjake added 1 commit 2024-12-13 03:48:21 +00:00
sim: simple memory test works!
All checks were successful
/ deps (push) Successful in 17s
/ test (push) Successful in 5m20s
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m24s
903ca1bf30
programmerjake added 1 commit 2024-12-13 04:51:12 +00:00
tests/sim: add test for memory rw port
All checks were successful
/ deps (push) Successful in 18s
/ test (push) Successful in 5m20s
/ deps (pull_request) Successful in 13s
/ test (pull_request) Successful in 6m32s
c756aeec70
programmerjake added 1 commit 2024-12-13 23:05:23 +00:00
add more memory tests
Some checks failed
/ deps (push) Successful in 19s
/ test (push) Has been cancelled
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m21s
2af38de900
programmerjake added 1 commit 2024-12-13 23:07:26 +00:00
Merge remote-tracking branch 'origin/master' into adding-simulator
All checks were successful
/ deps (pull_request) Successful in 14s
/ test (pull_request) Successful in 5m24s
/ deps (push) Successful in 16s
/ test (push) Successful in 5m46s
304d8da0e8
programmerjake changed title from WIP: add a simulator to add a simulator 2024-12-16 04:06:22 +00:00
programmerjake merged commit 304d8da0e8 into master 2024-12-16 04:06:48 +00:00
programmerjake deleted branch adding-simulator 2024-12-16 04:06:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: libre-chip/fayalite#3
No description provided.