From 0301ced00095b072332d8d4af081dd18ae3fdcba Mon Sep 17 00:00:00 2001 From: Charles Papon Date: Thu, 16 May 2019 19:49:13 +0200 Subject: [PATCH] Fix dBusSimplePlugin to bmb bridge --- src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala b/src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala index b2f141d..9e84ea2 100644 --- a/src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala +++ b/src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala @@ -259,11 +259,17 @@ case class DBusSimpleBus() extends Bundle with IMasterSlave{ bus.cmd.opcode := (cmd.wr ? B(Bmb.Cmd.Opcode.WRITE) | B(Bmb.Cmd.Opcode.READ)) bus.cmd.address := cmd.address.resized bus.cmd.data := cmd.data + bus.cmd.length := cmd.size.mux( + 0 -> U"00", + 1 -> U"01", + default -> U"11" + ) bus.cmd.mask := cmd.size.mux( - 0 -> B"0001", - 1 -> B"0011", + 0 -> B"0001", + 1 -> B"0011", default -> B"1111" ) |<< cmd.address(1 downto 0) + cmd.ready := bus.cmd.ready rsp.ready := bus.rsp.valid && !bus.rsp.context(0)