Hansung Kim
b2ab45f5e2
Change parameters to spatial-only coalescing
2023-04-20 21:09:19 -07:00
Hansung Kim
322f340657
Manage to make new bugs while doing that
2023-04-18 00:14:33 -07:00
Hansung Kim
65a22b7fcb
Use TLMessages constants instead of numbers
2023-04-18 00:09:48 -07:00
Hansung Kim
2ac5ee398a
Doc
2023-04-17 21:31:13 -07:00
Hansung Kim
334d05b222
Remove leftover printf
2023-04-17 21:17:23 -07:00
Hansung Kim
02ce969c67
Fix width mismatch for source logger
2023-04-17 18:52:38 -07:00
Hansung Kim
d4a51cfee5
Log source ID in the trace
2023-04-17 18:43:17 -07:00
Hansung Kim
41d520a991
Log both request and response in trace logger
...
Inside DPI code, have a vector of unique_ptrs that act as handles to multiple
different trace logger instances. Each logger instance is instantiated in a
single instance of the Verilog module, and multiple of these Verilog modules may
be instantiated in the Chisel module (see simReq and simResp in MemTraceLogger).
2023-04-17 18:10:13 -07:00
Hansung Kim
8978c2a812
trait HasTraceReq
2023-04-17 16:51:37 -07:00
Hansung Kim
f60602fc34
Write trace from logger in the same format as driver
2023-04-17 16:26:25 -07:00
Hansung Kim
282434eb7d
Basic C++ file IO for trace logger
2023-04-17 16:20:27 -07:00
Hansung Kim
1a90ad52ac
Cleanup tracer debug prints
2023-04-17 15:50:46 -07:00
Hansung Kim
8e6a5f4bce
Fix address & data handling in memtrace driver and logger
...
* TileLink doesn't alter the `address` field from what we originally used in the
Get/Put call.
* Same goes for the `data` field.
* The only thing TL generates by itself is `mask`. This means we have to align
data to the beatBytes boundary ourselves when Putting, and also taking
the right sublanes using the mask when Getting.
2023-04-17 15:30:30 -07:00
Hansung Kim
57874a564e
Set TL size according to trace from driver
...
Mask will be set accordingly by the TL generator methods (Get/Put).
2023-04-12 14:23:17 -07:00
Hansung Kim
8e763b512a
Relay full trace line info to DPI
2023-04-12 13:54:59 -07:00
Hansung Kim
1057ed59d3
Parse log2(size) from trace; set is_store from TL opcode
2023-04-11 18:23:50 -07:00
Hansung Kim
71f334bb22
Fix size parsing from memtrace
2023-04-11 17:36:45 -07:00
Hansung Kim
62f940618e
Convert manual bitshift to Chisel bitfield access
2023-04-10 21:04:04 -07:00
Hansung Kim
dca52ace0b
Fix verilog lint error
2023-04-10 20:37:26 -07:00
Hansung Kim
b53711965e
Connect TL edge data to SimMemTraceLogger
...
TODO: since TileLink rounds all address down to a multiple of its beat
size (8 in the current code), we can't directly compare the memory trace
input to its output. Need to take masks into account.
2023-04-10 20:24:27 -07:00
Hansung Kim
af29acdcda
Placeholder for MemTraceLogger C++ code
2023-04-09 14:53:02 -07:00
Hansung Kim
452cc40eb7
Make MemTraceLogger pass-through node
...
Instead of making MemTraceLogger a TL slave, make it an IdentityNode
that simply snoops on the TL edges and generates logs.
We can attach a TLRAM at the downstream to actually get response back,
rather than MemTraceLogger simply absorbing all requests.
2023-04-07 17:22:52 -07:00
Hansung Kim
109ad2cac0
Write MemTraceLogger and new synthesizable unittest
2023-04-07 16:23:14 -07:00
Hansung Kim
abecd30b2b
Store sourceId for every old req entry in table
2023-04-07 14:50:40 -07:00
Vamber Yang
8e5254292b
Attach MemTracer to SBus , all physical addr hashed between 0X80000000->0X90000000
2023-04-05 23:43:22 -07:00
Hansung Kim
bdc32b765f
Accept memory trace filename from VCS plusargs
...
Now can use `EXTRA_SIM_FLAGS="+memtracefile=<tracefile>"` to simulate
with different trace files without recompiling.
2023-04-03 17:41:47 -07:00
Hansung Kim
c0d502960f
Experiment with coalescing across all lanes
2023-04-02 12:23:28 -07:00
Hansung Kim
d62732fb89
Invalidate outgoing per-lane requests that got coalesced
...
Now the response queue no longer blocks the flow!
2023-04-01 14:33:46 -07:00
Hansung Kim
d9f6e27a04
Move coalescer chiseltest to its own package
2023-03-31 20:51:34 -07:00
Hansung Kim
4aabbecda1
Do not deassert deq.valid right after invalidate(head)
...
... to avoid combinational cycle.
2023-03-31 20:40:12 -07:00
Hansung Kim
1c0c8fa112
Complete test for enqueuing to invalidated tail
2023-03-31 20:15:49 -07:00
Hansung Kim
92ad5c2548
Cleanup padding logic
2023-03-31 20:12:43 -07:00
Hansung Kim
3ee639f376
Eliminate unnecessary delay when invalidating head
...
When invalidate signal is given for queue head, that head should be
gone immediately at the next cycle, regardless of what deq.ready was
at the previous cycle.
2023-03-31 19:55:36 -07:00
Hansung Kim
6ca22a39e0
Implement automatic dequeuing of invalid entries
2023-03-31 19:40:10 -07:00
Hansung Kim
f44dfc8d5a
Implement invalidation for the queue
2023-03-31 19:25:45 -07:00
Hansung Kim
a0d75530cb
Use used mask in CoalShiftQueue
...
Easier to use than wptr when enqueuing & dequeueing at the same time.
2023-03-31 17:10:09 -07:00
Hansung Kim
303c43a5e2
Make CoalShiftQueue use wptr; add unit test
...
Cannot solely rely on valid mask because there may be holes in the
middle.
2023-03-29 19:06:08 -07:00
Hansung Kim
a3472752bf
Duplicate ShiftQueue definition to make entries visible
2023-03-29 16:06:14 -07:00
Hansung Kim
12b3b67687
Store multiple oldSrcId reqs per lane in a table row
...
The number of the per-lane reqs is controlled by `numPerLaneReqs`
rather than being set to 2 ** sourceWidth to allow some flexibility.
2023-03-29 14:02:41 -07:00
Hansung Kim
3b335bda18
Basic unit test for the uncoalescer
2023-03-29 00:50:13 -07:00
Hansung Kim
9bc8f0074b
Make uncoalescer a separate module for better testability
2023-03-28 17:07:54 -07:00
Hansung Kim
23d8fa3be1
Write simple test for MultiPortQueue
...
... and comment out old CAM-based inflight table test.
2023-03-27 15:21:01 -07:00
Hansung Kim
f07497638d
Add .scalafmt.conf
2023-03-27 14:38:02 -07:00
Hansung Kim
434013f816
Remove redundant coal edge handling code
2023-03-27 14:37:08 -07:00
Hansung Kim
d951de7810
Handle taking offset chunks in uncoalescing logic
...
TODO: handling different size enums. Currently assumes everything is
4 bytes.
2023-03-27 14:22:21 -07:00
Hansung Kim
4daa0cefd8
Check for response queue blocking
2023-03-27 02:18:30 -07:00
Hansung Kim
d745792d42
Use rocket-chip MultiPortQueue to serialize responses
...
NOT tested yet
2023-03-27 01:47:45 -07:00
Hansung Kim
0660923eb8
Split out CoalescingUnitImp
2023-03-27 01:12:28 -07:00
Hansung Kim
2416275e12
Enqueue some uncoalesced data to response queue
2023-03-27 00:58:03 -07:00
Hansung Kim
683a0172d8
Fix sourceWidth being wrongly taken from coalescer edge
2023-03-26 02:32:59 -07:00