add trait

This commit is contained in:
RuigeLee
2023-07-11 23:05:44 +08:00
parent 8b2121959e
commit 242765f106
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package MAC
import chisel3._
import org.chipsalliance.cde.config.Field
import freechips.rocketchip.subsystem.BaseSubsystem
import freechips.rocketchip.diplomacy.{LazyModule,BufferParams}
import freechips.rocketchip.tilelink.{TLBuffer, TLIdentityNode, TLWidthWidget, TLFragmenter}
trait WithManyMacMix { this: BaseSubsystem =>
val mac = LazyModule(new Mac)
fbus.coupleFrom("mac_mst") { _ := TLBuffer() := mac.tlClientNode }
pbus.coupleTo("mac_cfg") { mac.tlMasterNode := TLFragmenter(4, pbus.blockBytes) := TLWidthWidget(pbus.beatBytes) := _ }
ibus.fromSync := mac.int_node
}