Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why the code of VendingMachineSwitch.scala in the tutorial generate if-else statement instead of case statement #151

Open
qgzln opened this issue Sep 16, 2019 · 2 comments

Comments

@qgzln
Copy link

qgzln commented Sep 16, 2019

How to generate a case statement for state machine with chisel3

@schoeberl
Copy link
Member

You need to include chisel3.util._ and use a switch. See an example here: https://github.com/schoeberl/chisel-book/blob/master/src/main/scala/SimpleFsm.scala

@qgzln
Copy link
Author

qgzln commented Sep 20, 2019

Thank you for your reply.It is my fault.I didn't make it clear, I mean there is no case in the generated Verilog statement, I usually use the case when writing the state machine with Verilog. So, chisel3 still can not generate Verilog code with case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants