freechipsproject / chisel-bootcamp

Generator Bootcamp Material: Learn Chisel the Right Way
Apache License 2.0
981 stars 278 forks source link

Fix 3.6 TypeSafe section #133

Open chick opened 3 years ago

chick commented 3 years ago

This does not compile right now. Not clear if it is current with scala/java Gets java null pointer exception

wunderabt commented 3 years ago

Is this about

    val bundleIn = Input(new Bundle2)
    val bundleOut = Output(new Bundle1)

? I ran into that problem too. Not sure if it helps the analysis but commenting out the output and changing the input to Bundle1 at least doesn't crash. All other combinations run into one or the other stack trace.

    val bundleIn = Input(new Bundle1)
    // val bundleOut = Output(new Bundle1)
module BadTypeModule(
  input        clock,
  input        reset,
  input        io_c,
  input  [1:0] io_in,
  output       io_out,
  input  [7:0] io_bundleIn_a
);