Instruction Fetch
- class ember.front.fetch.FetchUnit(*args, src_loc_at=0, **kwargs)
Instruction fetch logic.
Instruction fetch is responsible for handling requests to bring instruction bytes into the pipeline from the L1I cache.
There are two cases where a request cannot be completed:
A miss in the TLB causes the request to stall for the availability of the associated physical address. This causes a PTW request.
A miss in the L1I cache causes the request to stall for the availability of the associated cacheline. This causes an L1I fill request.
- Ports:
req (
FetchRequest
) – Instruction fetch requestresp – Instruction fetch response
l1i_rp (
ember.front.l1i.L1ICacheReadPort
) – L1I cache read porttlb_rp (
ember.front.itlb.L1ICacheTLBReadPort
) – L1I TLB read portifill_req (
ember.front.ifill.L1IFillRequest
) – L1I fill unit requestifill_sts (
ember.front.ifill.L1IFillStatus
) – L1I fill unit status
- elaborate_s0(m: Module)
Instruction Fetch - Stage #0
Drive inputs to the L1I arrays and to the TLB.
Results from the L1I arrays and TLB are available on the next cycle.
- elaborate_s1(m: Module)
Instruction Fetch - Stage #1
If we’re handling a passthrough request, output from TLB will be invalid. Instead, we use the VPN to select a matching cache way.
Valid output from the TLB will either indicate a hit or a miss. When a hit occurs, use the PPN to select a matching cache way. When a miss occurs, send a request to the PTW.
If a matching cache way is found, respond with the hitting line. If no match occurs, send a request to the L1I fill interface. The way index is selected with an LFSR.
- class ember.uarch.fetch.FTQIndex(param: EmberParams)
An index into the FTQ.
- class ember.uarch.fetch.FetchResponseStatus(value, *args, **kwargs)
Status of a fetch request that has passed through the IFU.
- Values:
NONE
L1_HIT – Request hit in the L1 instruction cache
L1_MISS – Request missed in the L1 instruction cache
TLB_MISS – Request missed in the L1I TLB
- class ember.uarch.fetch.FetchRequest(p: EmberParams)
A request to fetch a cache line at some virtual address.
- Members:
vaddr – Virtual address of the requested cacheline
passthru – Bypass virtual-to-physical translation
- class ember.uarch.fetch.FetchResponse(p: EmberParams)
Response to a fetch request.
- Members:
valid – This response is valid
vaddr – Virtual address associated with this response
sts (
FetchResponseStatus
) – Status associated with this responsedata – Response data (an L1I cache line)
ftq_idx – FTQ index responsible for the associated request