Skip to content

Wrong state transition when requesting multiple sandwiches. #1

Description

@andersondomingues

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;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions