Files
eb001/src/test/scala/gcd/Mac_test_top.scala

58 lines
978 B
Scala
Raw Normal View History

2023-07-11 00:00:26 +08:00
package MAC
import chisel3._
import chisel3.util._
import org.chipsalliance.cde.config._
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.tilelink._
2023-07-11 22:02:41 +08:00
import freechips.rocketchip.interrupts._
2023-07-11 00:00:26 +08:00
2023-07-11 22:02:41 +08:00
class MacTest(implicit p: Parameters) extends Mac{
2023-07-11 00:00:26 +08:00
val tlRAM = TLRAM(
address = AddressSet(0x00000000L, 0x001FFFFFL),
cacheable = false,
executable = false,
atomics = false,
beatBytes = 4,
sramReg = true,
devName = None,
)
2023-07-11 22:02:41 +08:00
tlRAM := tlClientNode
2023-07-11 00:00:26 +08:00
2023-07-11 17:45:32 +08:00
2023-07-11 00:00:26 +08:00
2023-07-11 22:02:41 +08:00
val tlClientIONode =
TLClientNode(Seq(TLMasterPortParameters.v1(
Seq(TLMasterParameters.v1(
name = "tlSlvIO",
sourceId = IdRange(0, 1),
))
)))
2023-07-11 00:00:26 +08:00
2023-07-20 14:58:59 +08:00
val tlBar = TLXbar()
2023-07-11 22:02:41 +08:00
2023-07-20 14:58:59 +08:00
tlMasterNode := tlBar := tlClientIONode
ethReg.configNode := tlBar
2023-07-11 22:02:41 +08:00
val intSinkNode = IntSinkNode(IntSinkPortSimple())
2023-07-20 14:58:59 +08:00
intSinkNode := ethReg.int_node
2023-07-11 00:00:26 +08:00
val tlSlv = InModuleBody {
tlClientIONode.makeIOs()
}
2023-07-11 22:02:41 +08:00
val int = InModuleBody {
intSinkNode.makeIOs()
2023-07-11 00:00:26 +08:00
}
2023-07-11 22:02:41 +08:00
2023-07-11 00:00:26 +08:00
}