Timeline for FSM in VHDL which makes me doubt
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 9 at 19:11 | vote | accept | CommunityBot | ||
Oct 9 at 19:11 | comment | added | user432209 | Thank you very much for clarifying the confusion I had from the sentence the professor said and that I had noted down. I bthink I have now understood. Thank you so much for your kind help! | |
Oct 9 at 16:31 | comment | added | LordTeddy | Not every if needs an else, that's a bad rule. It sometimes makes sense in a larger switch statement to include one, but again not always. In hardware, a one bit register can only have two values, so if (BUM1 = 1) and elsif(BUM1 = 0) are all the possible states. So yes you're right, adding an else would be superfluous. Any code there would never be executed, and the compiler would just ignore it (as possibly give you a warning) | |
Oct 9 at 16:02 | comment | added | user432209 | PS: i mean "BUM1 :in std_logic --> he checks: if (BUM1 = '0') and elsif (BUM1 = '1') then.. so in this case, a 'catch-all' ELSE is also unnecessary, since all the required behavior is defined" because of BUM1 is 1 or 0 and i checked both. I hope that i understand correctly now :) let me know . | |
Oct 9 at 15:58 | comment | added | user432209 | Sure! That was clear to me; I understood the logic of that if statement "if (CLR = '1') then..." isn't controlling the progression of the state machine. I just thought that every if should always have its own else. Just one last question, in the code I wrote in my edit "when S1 => CTA <= '0'... (see above edit)" where there’s an if that checks the state, it declares BUM1: in std_logic and then checks if (BUM1 = '0') and elsif (BUM1 = '1') then in this case, is a 'catch-all' ELSE also unnecessary, since all the required behavior is defined? So it would be superfluous, right? :) Thanks again! | |
Oct 9 at 15:32 | comment | added | LordTeddy | @faustopertinotti I've edited my answer. I realise you're new, but in general, try to avoid big edits to your question after an answer has been given, use the comments to discuss. | |
Oct 9 at 15:30 | history | edited | LordTeddy | CC BY-SA 4.0 |
added 1313 characters in body
|
Oct 9 at 14:09 | comment | added | user432209 | @ LordTeddy: Thank you for your kind response. I wrote a reply (edit) in my original message. If you still have time and are willing to help me, I would appreciate it. | |
Oct 9 at 9:56 | history | answered | LordTeddy | CC BY-SA 4.0 |