- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
What is the correct writing style: "if (a='1' and b='0' and…… z='1') then idan<='1'; or : "if (a& b&C&…..Z)= x"8038" then idan<='1'; ? What will require less logic elements? Idan :)Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think its the second expression. I am not sure though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
which langguage are you talking about?
but either way, they will produce the same number of logic elements, because its the same thing. And choce whatever style you think is more readable.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think second one is logically more easy.
Because for the first expression,"a==1",that means comparator is needed which can compare "a" with value "1" everytime.And same for other variables, so comparator hardware will be implemented. While in second one,all ANDing operation will be done,if true then body will be executed. Though second one seems logically more easy but quartus hardware will be same for both the code.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
looks like he/she is talking about VHDL

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