Reputation: 21
Hello I'm trying to learn chisel and I'm compiling an existing project, but I get a problem with the mem instantiation :
How can i modify the int type to type T and what is type T ?
Waiting for your answers.
Thank you.
Upvotes: 0
Views: 84
Reputation: 7877
type T needs to be a subtype of Data. It appears numAddresses
is an Int
From the UC Berkeley Chisel guide it looks like subtypes of Data include
From here it looks like you could convert a Scala Int to a UInt as numAddresses.U
(I assumed numAddresses is non-negative)
Upvotes: 1