Skip to content

Commit

Permalink
litex integration wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Aug 16, 2023
1 parent 055abe8 commit 6825a51
Show file tree
Hide file tree
Showing 6 changed files with 557 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-Xms1024M
-Xmx4096M
-Xss2M
-XX:MaxMetaspaceSize=1024M
29 changes: 20 additions & 9 deletions src/main/scala/naxriscv/platform/NaxriscvTilelink.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,29 @@ import scala.util.Random



class NaxriscvTilelink(hartId : Int) extends Area with RiscvHart{
class NaxriscvTilelink() extends Area with RiscvHart{
val ibus = Node.master()
val dbus = Node.master()
val pbus = Node.master()

val buses = List(ibus, dbus, pbus)
val plugins = Handle[Seq[Plugin]]

def setPluginsSimple(hartId : Int) : this.type = {
plugins load Config.plugins(
withCoherency = true,
withRdTime = false,
aluCount = 1,
decodeCount = 1,
ioRange = a => a(31 downto 28) === 0x1,
hartId = hartId
)
this
}
def setPlugins(p : Seq[Plugin]) : this.type = {
plugins.load(p)
this
}


def privPlugin = thread.core.framework.getService[PrivilegedPlugin]
Expand All @@ -47,14 +64,8 @@ class NaxriscvTilelink(hartId : Int) extends Area with RiscvHart{
override def getIntSupervisorExternal() = privPlugin.io.int.supervisor.external

val thread = Fiber build new Area{
val l = Config.plugins(
withCoherency = true,
withRdTime = false,
aluCount = 1,
decodeCount = 1,
ioRange = a => a(31 downto 28) === 0x1,
hartId = hartId
)
val l = ArrayBuffer[Plugin]()
l ++= plugins

// Add a plugin to Nax which will handle the negotiation of the tilelink parameters
l += new Plugin {
Expand Down
Loading

0 comments on commit 6825a51

Please sign in to comment.