This post is an expanded update to an entry in my personal "NOTES" file. At first glance, I found the following code perplxing, therefore I decided to break it down.
What does the :< operator do in [T <: Data>]?
It is obvious (to me at least) that this is for type parameterization. The <: operator indicates that the type supplied to the class instance must have chisel3.core.Data as an ancestor.
Why does (data: => T) do?
No suprise that (val entries: Int) is the primary constructor. The fat arrow (=>) implies a function. The first argument to the constructor lets you specific the number of entries. The second argument data helps to parameterize the class.
Why is a class definion and a object definition of the same name?
The object is known as a companion class, consult stackoverflow.com for more info
What does the apply function do in the object?
The apply function acts as an auxillary constructor. Allows alternative syntax for creating HellaQueue.