- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Attached herewith is the Altera safe_state example. I want to build my code around this kind of state machine (for robust design). My question is why didn't you used "when others" in your example. What would happen if I'll still write it down in the end of the case statement? In general, are there any restrictions that I should know before I'm implementing the "Safe" form in all my designs (a reference document will do as well…)? Is it o.k. that I'll add the one-hot to the safe statement*? Is it recommended? * attribute syn_encoding : string; attribute syn_encoding of state_type : type is "safe, one-hot"; Thanks, IdanLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because in the code, all cases have already been covered, and the when others would be redundant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An others case not representing existing states is meaningless, both in standard and safe encoded FSM. If I remember right, the empty others case has been required by previous VHDL versions.
one-hot will be the default encoding in most cases, thus it can be expected meaningless as well. The only drawback of safe enconding is a slight increase in LE usage, you can try yourself.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page