Skip to content

Commit

Permalink
Move lsu service
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jan 15, 2025
1 parent ea4ec9d commit 90f1b8e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/vexiiriscv/execute/lsu/LsuL1Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import vexiiriscv.Global
import vexiiriscv.misc.{PerformanceCounterService, Reservation}
import vexiiriscv.riscv.{AtomicAlu, Riscv}
import vexiiriscv.execute._
import vexiiriscv.fetch.{InitService, LsuL1Service, LsuService}
import vexiiriscv.fetch.{InitService}
import vexiiriscv.riscv.Riscv.{RVA, RVC}

import scala.collection.mutable.ArrayBuffer
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/vexiiriscv/execute/lsu/LsuPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import vexiiriscv.{Global, riscv}
import vexiiriscv.execute._
import vexiiriscv.execute.lsu.AguPlugin._
import vexiiriscv.execute.lsu.LsuL1.HAZARD
import vexiiriscv.fetch.{LsuL1Service, LsuService}

import scala.collection.mutable.ArrayBuffer

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/vexiiriscv/execute/lsu/Prefetcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vexiiriscv.execute.lsu
import spinal.core._
import spinal.lib.{misc, _}
import spinal.lib.misc.plugin.FiberPlugin
import vexiiriscv.fetch.{Fetch, InitService, LsuService}
import vexiiriscv.fetch.{Fetch, InitService}
import spinal.lib.misc.pipeline._
import vexiiriscv.Global
import vexiiriscv.Global._
Expand Down
24 changes: 24 additions & 0 deletions src/main/scala/vexiiriscv/execute/lsu/Service.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
package vexiiriscv.execute.lsu

import spinal.core.Bundle
import spinal.core.fiber.{Handle, Retainer}
import spinal.lib._
import spinal.lib.system.tag.PmaRegion

import scala.collection.mutable.ArrayBuffer

trait LsuCachelessBusProvider {
def getLsuCachelessBus() : LsuCachelessBus
}

trait CmoService{
def withSoftwarePrefetch : Boolean
}

case class LsuL1InvalidationCmd() extends Bundle //Empty for now
case class LsuL1InvalidationBus() extends Bundle {
val cmd = Stream(LsuL1InvalidationCmd())
}
trait LsuService{
val invalidationRetainer = Retainer()
val invalidationPorts = ArrayBuffer[LsuL1InvalidationBus]()
def newInvalidationPort() = invalidationPorts.addRet(LsuL1InvalidationBus())
def lsuCommitProbe : Flow[LsuCommitProbe]
def getBlockSize : Int
}

trait LsuL1Service{
def withCoherency : Boolean
val regions = Handle[ArrayBuffer[PmaRegion]]()
}
19 changes: 0 additions & 19 deletions src/main/scala/vexiiriscv/fetch/FetchL1Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,6 @@ trait FetchL1Service{
def fetchProbe : FetchProbe
}

case class LsuL1InvalidationCmd() extends Bundle //Empty for now
case class LsuL1InvalidationBus() extends Bundle {
val cmd = Stream(LsuL1InvalidationCmd())
}
trait LsuService{
val invalidationRetainer = Retainer()
val invalidationPorts = ArrayBuffer[LsuL1InvalidationBus]()
def newInvalidationPort() = invalidationPorts.addRet(LsuL1InvalidationBus())
def lsuCommitProbe : Flow[LsuCommitProbe]
def getBlockSize : Int
}

trait LsuL1Service{
def withCoherency : Boolean
val regions = Handle[ArrayBuffer[PmaRegion]]()
}



class FetchL1Plugin(var translationStorageParameter: Any,
var translationPortParameter: Any,
var pmpPortParameter : Any,
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/vexiiriscv/misc/TrapPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import vexiiriscv.riscv.Riscv._
import vexiiriscv._
import vexiiriscv.decode.Decode
import vexiiriscv.decode.Decode.{INSTRUCTION_SLICE_COUNT, INSTRUCTION_SLICE_COUNT_WIDTH, INSTRUCTION_WIDTH}
import vexiiriscv.fetch.{Fetch, FetchL1Service, InitService, LsuL1Service, LsuService, PcService}
import vexiiriscv.execute.lsu.{LsuL1Service, LsuService}
import vexiiriscv.fetch.{Fetch, FetchL1Service, InitService, PcService}
import vexiiriscv.memory.AddressTranslationService
import vexiiriscv.prediction.{HistoryPlugin, Prediction}
import vexiiriscv.schedule.Ages
Expand Down

0 comments on commit 90f1b8e

Please sign in to comment.