Reputation: 21
For example ,I want to express Vec(0),Vec(1),Vec(2),Vec(3),Vec(4) together.Can I express it Vec(0->4) ?If it's error,what should I do ? And I also want to know which is the fullest document of the Chisel?I have many problem,but I can't find the answer in my documents.I have Digital Design with Chisel and chisel_cheatsheet.
Upvotes: 2
Views: 471
Reputation: 6064
When you're new to Chisel and Scala it can be a little intimidating, but I would suggest taking a look at the API docs and learning how to read them: https://www.chisel-lang.org/api/3.2.0/index.html
In this case, for Vec: https://www.chisel-lang.org/api/3.2.0/chisel3/Vec.html
Vec extends Scala Seq and thus has a massive assortment of useful methods like slice
as discussed in the post Fabien linked.
Upvotes: 1
Reputation: 3761
I want to express Vec(0),Vec(1),Vec(2),Vec(3),Vec(4) together.Can I express it Vec(0->4) ?If it's error,what should I do ?
I think you are looking for a slicing function for Vec as plenn08 asked. Chick Markley gave a response for a slice assignement.
I have Digital Design with Chisel and chisel_cheatsheet.
That's a good start. You can also take a look at the chisel-bootcamp which can be done with a simple web browser.
Upvotes: 1