This commit is contained in:
Tom Verbeure 2019-03-24 23:56:23 +00:00
commit 3d5e941aef
3 changed files with 18 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.class *.class
*.log *.log
*.bak *.bak
.*.swp
# sbt specific # sbt specific
.cache/ .cache/
@ -46,4 +47,4 @@ obj_dir
simWorkspace/ simWorkspace/
tmp/ tmp/
/archive.tar.gz /archive.tar.gz
*.out32 *.out32

View File

@ -63,6 +63,12 @@ object DBusSimpleBus{
useBTE = true, useBTE = true,
useCTI = true useCTI = true
) )
def getPipelinedMemoryBusConfig() = PipelinedMemoryBusConfig(
addressWidth = 32,
dataWidth = 32
)
} }
case class DBusSimpleBus() extends Bundle with IMasterSlave{ case class DBusSimpleBus() extends Bundle with IMasterSlave{
@ -178,7 +184,8 @@ case class DBusSimpleBus() extends Bundle with IMasterSlave{
} }
def toPipelinedMemoryBus() : PipelinedMemoryBus = { def toPipelinedMemoryBus() : PipelinedMemoryBus = {
val bus = PipelinedMemoryBus(32,32) val pipelinedMemoryBusConfig = DBusSimpleBus.getPipelinedMemoryBusConfig()
val bus = PipelinedMemoryBus(pipelinedMemoryBusConfig)
bus.cmd.valid := cmd.valid bus.cmd.valid := cmd.valid
bus.cmd.write := cmd.wr bus.cmd.write := cmd.wr
bus.cmd.address := cmd.address.resized bus.cmd.address := cmd.address.resized

View File

@ -59,6 +59,11 @@ object IBusSimpleBus{
useBTE = true, useBTE = true,
useCTI = true useCTI = true
) )
def getPipelinedMemoryBusConfig() = PipelinedMemoryBusConfig(
addressWidth = 32,
dataWidth = 32
)
} }
@ -136,7 +141,8 @@ case class IBusSimpleBus(interfaceKeepData : Boolean = false) extends Bundle wit
} }
def toPipelinedMemoryBus(): PipelinedMemoryBus = { def toPipelinedMemoryBus(): PipelinedMemoryBus = {
val bus = PipelinedMemoryBus(32,32) val pipelinedMemoryBusConfig = IBusSimpleBus.getPipelinedMemoryBusConfig()
val bus = PipelinedMemoryBus(pipelinedMemoryBusConfig)
bus.cmd.arbitrationFrom(cmd) bus.cmd.arbitrationFrom(cmd)
bus.cmd.address := cmd.pc.resized bus.cmd.address := cmd.pc.resized
bus.cmd.write := False bus.cmd.write := False
@ -281,4 +287,4 @@ class IBusSimplePlugin(resetVector : BigInt,
} }
} }
} }
} }