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

Wrong state transition when requesting multiple sandwiches. #1

Open
andersondomingues opened this issue Oct 1, 2019 · 0 comments
Open

Comments

@andersondomingues
Copy link

andersondomingues commented Oct 1, 2019

Machine V4:

According to the specification, the machine should go to an error state when requesting multiple sandwiches at the same time. However, such constraint is violated when a coin is inserted along with requesting two sandwiches, as seen in the attached picture.

image

Possible solution: rearrange the following code to test error cases before accepting a coin.

if m100 = '1' then
pe <= soma;
elsif dev = '1' or (r_bacon = '1' and r_atum = '1') or (r_bacon = '1' and r_green = '1') or (r_atum = '1' and r_green = '1') then
pe <= nulo;
...

When it could be...

if dev = '1' or (r_bacon = '1' and r_atum = '1') or (r_bacon = '1' and r_green = '1') or (r_atum = '1' and r_green = '1') then
pe <= nulo;
elsif m100 = '1' then
pe <= soma;
...

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

1 participant