ChiselSim Improvements
I started porting some tests from chiseltest to ChiselSim and found some usability gaps that could be improved. Also some error:
Refs:
Sample 1:
// Scala 2 extension methods for Chisel Data types converting peek().litValue to peekLit
object ObjectUtils {
// For UInt and SInt
implicit class UIntLitValue(u: UInt) {
def peekLit: BigInt = u.peek().litValue
}
implicit class SIntLitValue(s: SInt) {
def peekLit: BigInt = s.peek().litValue
}
// For Bool
implicit class BoolLitValue(b: Bool) {
def peekLit: Boolean = b.peek().litToBoolean
}
}
ChiselSim Improvements
I started porting some tests from chiseltest to ChiselSim and found some usability gaps that could be improved. Also some error:
peekLitinstead ofpeek().litValuelike sample1.c.io.DecoderPort.inst.peek() should be(inst)instead ofc.io.DecoderPort.inst.peekValue().asBigInt should be(inst.litValue)whereinstis a ChiseEnum - (Reported on [ChiselSim] ChiselEnum does not provide peek/poke methods and user-friendly API #4208)chiseltest.experimental.exposelike Observe.scalachisel3.experimental.Analogports (Modules withchisel3.experimental.Analogports generate error using ChiselSim #4202)Refs:
Sample 1: