This contains literal constructor factory methods that are deprecated as of Chisel3.
This contains literal constructor factory methods that are deprecated as of Chisel3.
This contains literal constructor factory methods that are deprecated as of Chisel3.
LFSR16 generates a 16-bit linear feedback shift register, returning the register contents.
LFSR16 generates a 16-bit linear feedback shift register, returning the register contents. This is useful for generating a pseudo-random sequence.
The example below, taken from the unit tests, creates two 4-sided dice using LFSR16
primitives:
val bins = Reg(Vec(8, UInt(32.W))) // Create two 4 sided dice and roll them each cycle. // Use tap points on each LFSR so values are more independent val die0 = Cat(Seq.tabulate(2) { i => LFSR16()(i) }) val die1 = Cat(Seq.tabulate(2) { i => LFSR16()(i + 2) }) val rollValue = die0 +& die1 // Note +& is critical because sum will need an extra bit. bins(rollValue) := bins(rollValue) + 1.U
Package for experimental features, which may have their API changed, be removed, etc.
Package for experimental features, which may have their API changed, be removed, etc.
Because its contents won't necessarily have the same level of stability and support as non-experimental, you must explicitly import this package to use its contents.
Compute the log2 rounded down with min value of 1
Compute the log2 rounded up with min value of 1
(Since version 3.4) Please switch to chisel3.stage.ChiselStage
(Since version chisel3) debug doesn't do anything in Chisel3 as no pruning happens in the frontend