Two fixes: do a proper "all bits are the same" function, as well as
prepare a capability target to pass back.
This commit is contained in:
@@ -746,7 +746,7 @@ module mkFetchStage(FetchStage);
|
||||
end
|
||||
end else if (!isValid(nextPc)) begin
|
||||
// A Jr will jump; if we don't have a record, we should wait to prevent wasted work.
|
||||
nextPc = Valid ({2'b01,?}); // Invalid virtual address to prevent progress.
|
||||
nextPc = Valid (setAddrUnsafe(nullCap,{2'b01,?})); // Invalid virtual address to prevent progress.
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ function Vpn getVpn(Addr addr) = addr[38:12];
|
||||
function PageOffset getPageOffset(Addr addr) = truncate(addr);
|
||||
|
||||
// All the upper bits should be equal for a valid SV39 virtual address.
|
||||
function Bool validVirtualAddress(Addr addr) = ((^addr[63:39]) == 0);
|
||||
function Bool validVirtualAddress(Addr addr) = ((addr[63:39] ^ {addr[39],addr[63:40]}) == 0);
|
||||
|
||||
function Addr getPTBaseAddr(Ppn basePpn);
|
||||
PageOffset offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user