Fix IO direction for host Serial-TL port

`cloneType` is a Chisel-internal method, use `chiselTypeOf` to construct
an IO of the same type and direction.
This commit is contained in:
Ethan Wu
2023-11-06 21:27:32 -08:00
parent fff36c4761
commit 70e78cb523

View File

@@ -355,7 +355,7 @@ class WithSerialTLPunchthrough extends OverrideIOBinder({
(system: CanHavePeripheryTLSerial) => {
val (ports, cells) = system.serial_tl.zipWithIndex.map({ case (s, id) =>
val sys = system.asInstanceOf[BaseSubsystem]
val port = IO(s.getWrappedValue.cloneType)
val port = IO(chiselTypeOf(s.getWrappedValue))
port <> s.getWrappedValue
(SerialTLPort(port, sys.p(SerialTLKey).get, system.serdesser.get, id), Nil)
}).unzip