topic Re: Verilog - minimizing logic in NiosĀ® II Embedded Design Suite (EDS)
https://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181942#M44517
<P>ISTR that somewhere you can see a logic diagram (or similar) after one stage of the syntheses. But the actual logic used can depend on timing (and other) constraints. </P><P></P> <P></P>I'd guess that you'd be better counting down to zero (or until carry) and reloading the counter with a sequence of values.Mon, 03 Oct 2011 20:33:12 GMTAltera_Forum2011-10-03T20:33:12ZVerilog - minimizing logic
https://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181940#M44515
<P>Hi </P><P></P> <P></P>I'm generating some asymmetric waveforms from a counter, and am able to adjust the counts where it changes output. Hence I'd like to choose numbers that utilize the minimum amount of logic - e.g: <P></P> <P></P> Counter8_out = ((Counter1 >= 48) && (Counter1 < 80)) | <P></P> ((Counter1 >= 128) && (Counter1 < 176)) | <P></P> ((Counter1 >= 208) && (Counter1 < 256)) | <P></P> (Counter1 >= 304); <P></P> <P></P>Is there any way I can see what effect tweaking the numbers has on the compiled logic, e.g. seeing how much logic is used by that signal, or seeing the canonical equation produced by the synthesis (IIRC there was a way of seeing that from MAX-PLUS-II)? <P></P> <P></P>[edit] - other than by compile, print-screen "resource usage summary", tweak, compile, compare "resource usage summary" against previous... <P></P> <P></P>[edit] - also seeing that adjusting the counts to use a spread of 2,3,4 input Logic Element usage can work better than trying to always use minimum number of bits.Mon, 03 Oct 2011 19:56:30 GMThttps://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181940#M44515Altera_Forum2011-10-03T19:56:30ZRe: Verilog - minimizing logic
https://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181941#M44516
<P>This kind of compare logic is minimized if you choose numbers which allow comparision of a limited number of bits. </P><P></P>This can be easily evaluated from the binary representation of you numbers, <P></P>e.g (Counter1 >= 128) && (Counter1 < 176) is efficient because only 3 upper bits need to be compared in order to evaluate the expression. <P></P>While (Counter1 >= 135) && (Counter1 < 182) would require far more complex logic.Mon, 03 Oct 2011 20:25:26 GMThttps://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181941#M44516Altera_Forum2011-10-03T20:25:26ZRe: Verilog - minimizing logic
https://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181942#M44517
<P>ISTR that somewhere you can see a logic diagram (or similar) after one stage of the syntheses. But the actual logic used can depend on timing (and other) constraints. </P><P></P> <P></P>I'd guess that you'd be better counting down to zero (or until carry) and reloading the counter with a sequence of values.Mon, 03 Oct 2011 20:33:12 GMThttps://community.intel.com/t5/Nios-II-Embedded-Design-Suite/Verilog-minimizing-logic/m-p/181942#M44517Altera_Forum2011-10-03T20:33:12Z