Forum Discussion
Altera_Forum
Honored Contributor
15 years agocorrect writing style
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 :)
Altera_Forum
Honored Contributor
15 years agoI 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.