cycles.m 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. close all
  2. data = [
  3. 0 963;
  4. 0 663;
  5. 0 598;
  6. 0 1076;
  7. 0 99;
  8. 0 49;
  9. 0 55];
  10. grid on
  11. legend
  12. B = bar(1:7,data);
  13. x_labels = [
  14. {'\begin{tabular}{r}\texttt{Divide}\\\texttt{FFFFh/0001h}\end{tabular}'}
  15. {'\begin{tabular}{r}\texttt{Divide}\\\texttt{FFFFh/FFFFh}\end{tabular}'}
  16. {'\begin{tabular}{r}\texttt{Divide}\\\texttt{0001h/FFFFh}\end{tabular}'}
  17. {'\begin{tabular}{r}\texttt{Modulus}\\\texttt{FFFFh\%0001h}\end{tabular}'}
  18. {'\begin{tabular}{r}\texttt{Modulus}\\\texttt{FFFFh\%FFFFh}\end{tabular}'}
  19. {'\begin{tabular}{r}\texttt{Modulus}\\\texttt{0001h\%FFFFh}\end{tabular}'}
  20. {'\begin{tabular}{r}\texttt{Multiply 16bit}\end{tabular}'}
  21. ];
  22. set(gca,'XTickLabel', x_labels, 'TickLabelInterpreter', 'latex')
  23. title("Power consumtion of implemented design on FPGA")
  24. ylabel("Numer of cycles")
  25. xtickangle(40);
  26. xtips1 = [1:7] - 0.21;
  27. ytips1 = B(1).YData;
  28. labels1 = ['N/A'];
  29. text(xtips1,ytips1,labels1,'HorizontalAlignment','center','VerticalAlignment','bottom');
  30. xtips2 = [1:7] + 0.21;
  31. ytips2 = B(2).YData;
  32. labels2 = string(B(2).YData);
  33. text(xtips2,ytips2,labels2,'HorizontalAlignment','center','VerticalAlignment','bottom');
  34. legend("RISC", "OISC");
  35. grid on
  36. %%
  37. figure
  38. P = [359.09 360.851 360.732];
  39. Pstd = [0.245 0.239 0.223];
  40. bar(1:3,P)
  41. hold on
  42. er = errorbar(1:3, P, -Pstd./2,+Pstd./2);
  43. er.Color = [0 0 0];
  44. er.LineStyle = 'none';
  45. set(gca,'xticklabel',{'None'; 'RISC'; 'OISC'})
  46. ylabel("Power (mW)")
  47. title("Power consumtion of implemented design on FPGA")