Commit Graph

30 Commits

Author SHA1 Message Date
David Anderson 8247661a38 vram/VRAMCore: derive FShow for request and response types
Handy in unit tests to display the structs as they fly around.
2024-09-14 20:25:30 -07:00
David Anderson 65d13a0e50 vram/VRAM: only expect a response on reads
The VRAMCore doesn't generate responses for writes, so demanding one here
deadlocks the port the first time it writes something.
2024-09-14 20:24:40 -07:00
David Anderson b46d70fa07 vram/VRAMCore: cycle using prime numbers in tests
VRAMs are powers of two, so if memory wiring is wrong and we end up
with ram blocks mirrored at several points in the address space, we
want a write pattern that doesn't repeat cleanly on power of two
blocks. That way, a mirrored memory block cannot contain values that
are valid for all its locations.
2024-09-09 11:27:53 -07:00
David Anderson 719339e69f vram/MemArbiter: plumb verbose test flag into test 2024-09-09 11:22:07 -07:00
David Anderson 4b6b34e131 vram/VRAMCore: add tests, fix bug found by same 2024-09-09 11:16:21 -07:00
David Anderson 23a78eee9e vram/VRAM: a little more documentation tweaking 2024-09-08 23:44:45 -07:00
David Anderson 16af267ab6 vram/VRAM: tweak docs, remove unnecessary rule condition 2024-09-08 23:42:27 -07:00
David Anderson 1929bbe3cc vram/VRAM: at last, a video RAM, with all the gubbins 2024-09-08 23:39:12 -07:00
David Anderson fb57903021 vram/VRAMCore: make simulatable in Bluesim, tidy up 2024-09-08 23:19:39 -07:00
David Anderson 79b54ca86f vram/MemArbiter: add a granted_port method to make downstream wiring easier
To implement the mux tree that feeds into RAM ports, we need to know the
port index of the grantee to be able to wire it up. In theory we could
dispense with the per-port grant signal, but keeping it around allows
each client to deal with local concerns separate from the port routing.
2024-09-08 23:16:49 -07:00
David Anderson 2ebf399d62 vram/MemArbiter: remove MemArbiterClient, not needed right now 2024-09-08 22:44:39 -07:00
David Anderson eca95e0fb6 vram/VRAMCore: correct exports of the vram types 2024-09-08 15:37:47 -07:00
David Anderson e5aabcbf4a vram/MemArbiter: remove unnecessary wires and fields
While iterating many redundant bits were added. This removes them again,
keeping just (I think) the minimum necessary for the arbitrators to work.
2024-09-08 15:13:47 -07:00
David Anderson 519eddc552 vram/MemArbiter: fix bug with write conflict avoidance
Now that all arbiter ports can request to write, arbitration must check
both (write, read) and (read, write) conflicts, not just (write, read).
2024-09-08 15:02:55 -07:00
David Anderson 191cd1bfa2 vram: document MemArbiter, fix round-robin ordering bug 2024-09-08 14:10:52 -07:00
David Anderson f31f64f5a2 vram: refactor MemArbiter into separate arbiters
Rather than hardcode one architecture for GARY, the arbiters
are now split and can be allocated per-port. The arbiter interface
includes plumbing so that one arbiter can propagate a write conflict
to another, so it can still implement multi-port arbitration as long
as every client is statically allocated to one port.
2024-09-08 13:26:25 -07:00
David Anderson 2760bad965 vram: move VRAM to VRAMCore, in prep for arbitrated VRAM 2024-09-08 09:28:28 -07:00
David Anderson 69b7ce7f9e vram: adjust the MemoryArbiterClient interface a little 2024-09-08 09:27:25 -07:00
David Anderson 81e5264d22 vram: make arbiter clients and servers connectable 2024-09-07 19:49:43 -07:00
David Anderson aa048537ef vram/MemArbiter: rewrite to use client/server idioms
In preparation for making the two Connectable and defining an
arbitrated memory client/server for VRAM access.
2024-09-07 16:58:11 -07:00
David Anderson b2b2c14009 vram/VRAM: finish the top-level VRAM module
Well, for now at least. It can build 112KiB and 128KiB memories that
seem to synthesize to something reasonable.
2024-09-07 16:04:21 -07:00
David Anderson f7cb4b6ba2 vram/VRAM: early VRAM implementation
Only checked up to mkByteRAMArray, main VRAM still WIP
2024-09-06 16:11:55 -07:00
David Anderson ab20db44f4 vram: rename MemoryArbiter to something shorter
As I implement the whole transaction-level modeling thing with
arbitration, the interface names are getting longer and longer.
2024-09-06 10:04:20 -07:00
David Anderson 7f10694371 vram: get rid of old commented code 2024-09-06 00:13:42 -07:00
David Anderson f010693b9b vram: compact the test output even more 2024-09-06 00:08:14 -07:00
David Anderson 71f422b8c1 vram: fix up documentation for MemoryArbiterWriter 2024-09-06 00:02:23 -07:00
David Anderson e0d156cdd1 vram: a little more formatting of the vram test
Make it a bit more compact, for large test runs
2024-09-06 00:00:25 -07:00
David Anderson d41ca7daae vram: tidy up formatting 2024-09-05 23:51:21 -07:00
David Anderson 60348fefd2 vram: one more arbiter test for port conflicts 2024-09-05 23:46:01 -07:00
David Anderson 5e22d03e15 vram: implement a MemoryArbiter for VRAM 2024-09-05 23:39:21 -07:00