package std
- Alphabetic
- Public
- Protected
Value Members
- object BarrelShifter
A Barrel Shifter implementation for Vec type.
A Barrel Shifter implementation for Vec type.
val input = 0xAABBCCDD.U(32.W) val bytes = VecInit(input.asBools.grouped(8).map(VecInit(_).asUInt).toSeq) val shamt = 1.U(2.W) val output = BarrelShifter.leftRotate(bytes, shamt).asUInt // big endian // output = 0xDDAABBCC.U(32.W) // The depth of Mux is 2, whereas originally // the depth of Mux is log(32) = 5 val output = BarrelShifter.leftRotate(bytes, shamt, 2).asUInt // depth is 1 now
Example:
This is the documentation for Chisel.
Package structure
The chisel3 package presents the public API of Chisel. It contains the concrete core types
UInt,SInt,Bool,FixedPoint,Clock, andReg, the abstract typesBits,Aggregate, andData, and the aggregate typesBundleandVec.The Chisel package is a compatibility layer that attempts to provide chisel2 compatibility in chisel3.
Utility objects and methods are found in the
utilpackage.The
testerspackage defines the basic interface for chisel testers.