From ab81461034a6eecfd7c33434ac716c9824bac640 Mon Sep 17 00:00:00 2001 From: Meruemon Date: Sun, 20 Mar 2022 16:53:10 +0100 Subject: [PATCH] created setTheme at mainframe class and finished table with register details --- bin/Backend/Microcontroller/PIC.class | Bin 11476 -> 12742 bytes bin/Backend/Microcontroller/RAM.class | Bin 18908 -> 18942 bytes bin/Backend/Runtime/Environment.class | Bin 2551 -> 2595 bytes .../PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.class | Bin 2390 -> 4695 bytes .../PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.class | Bin 12376 -> 12362 bytes .../PIC_SIMULATOR_GUI_JAVA/GUIRegisters.class | Bin 6042 -> 6739 bytes .../GUIRegistersDetailed.class | Bin 0 -> 3957 bytes .../GUITestFileTable.class | Bin 5901 -> 5990 bytes src/Backend/Microcontroller/PIC.java | 528 +++++++++--------- src/Backend/Microcontroller/RAM.java | 218 ++++---- src/Backend/Runtime/Environment.java | 4 +- .../PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.java | 86 ++- .../PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.java | 6 +- .../PIC_SIMULATOR_GUI_JAVA/GUIRegisters.java | 123 ++-- .../GUIRegistersDetailed.java | 103 ++++ .../GUITestFileTable.java | 28 +- 16 files changed, 643 insertions(+), 453 deletions(-) create mode 100644 bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.class create mode 100644 src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.java diff --git a/bin/Backend/Microcontroller/PIC.class b/bin/Backend/Microcontroller/PIC.class index 6f9de9757bdfa61c261e50a2b63cf7dc0d8efc96..e41de5dbde1b4c2e37d08a046ebaf65f64e924d0 100644 GIT binary patch literal 12742 zcmc&)33yc1*?#Z6=gefez_27NNg(XWD1`%j4+Z+a56ze2mzJS zTK&aVtO(Uw6-Bgbf?L(@*4A!nYo!ZqZLM~({rhzJ9~J)hoO|aIL&7fz&#w^np$`wm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eQCso9c~chj=^Csh&87h#f81PQ@s6oKtaZXz%~(C{=t$ z8y!WODKNqGVzQZteA7aanSyc#&T4Zc0_GU3GRNa=GXrgACfdzxbeogWV@}0I<}~!0 z)3Mu}fg8+OxY?Y8eP#jfG#B7ub1|MYm*AJ?Qf0F`8%ft@hg`=y3CF~^36@eFRl^A{ZOnE_&a7ABhY$T1s{ zXEtHB*^Ig7IjA&)#JCMXGo)~`PfFIgIIVMWTIU9+IwwG-@r>qu#qEhG!v~7nIV812 zEOt_&ALFs1*F{GjR8ac z5~g_-h1i2+^ID{u*I}%A6SB-(FvYwTGk89?)Vy5@_jQg1|KxJ#l+k6zc=40ei6b0r}m~TFVV)I#)m@lHv{2A7mzraTGphDrFaGdlJT}j8E F{~xML(?tLP diff --git a/bin/Backend/Microcontroller/RAM.class b/bin/Backend/Microcontroller/RAM.class index f8ec01b82f287bf6ddb304e39c3d6d4a48455e7d..57b17520880016659b4a357e891eb37e89d844d9 100644 GIT binary patch delta 3487 zcmZvfdsI}{6~_0z++hF*nE~bw^MJVn2n;WI%1dB)2}l!SMH8DE7q-^awURa_D<)_l ziLcNskX40GoG5(l2bD=0ubg}U>Q zh)%2%(HH1_br4tWe%BO0e4Rqg<8dcVFsI=TYBLwBdo1u0?J>_*-?6|F$_(4Bp0vQv z>1nb)0*&wlonB@-n77Snin01JA-jftRR5+q|XWZ)OS?i7=n9LLi>wQJ~%iCkF5~IPfM!fDabHLYV;g6EN`)z$&+SBUEsqyu%{? zXsZYrqk7bh5K0STZQB3e6K#*3*6}zm2RH^ySj_t<0UMS=ESB+#W5I(JkcgF#iUG*R zD&9{G6k;um#X1P!eY~anp%I&*86SX2H~}8U??Nk1gqhd^kKrVE3MWGwJ_L(!3UuOB zSc%i51r-n~Y8DpU#~0#qk@P@ZE#@l)Y%p575yA|qLLF}ZF4#$Y00w03Kl;eoUC3L^Tk1tcM(@skr8K%{| z)*7)EZF0uZbw@P*O2#~K8Kx~9+bUxCGtP3*{J3cDagn(_ELS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RxM3sUldc3Pj*ef>SE4c{+auX(0Yj{yQ zHz+q@MRhY?lACZ@T0E#OS7}|HgW_tu{3Rp4mjz|S@@gCm zNUeRG=7!?vw#Kp{B{~!m>x&AHH)_#inW13Z{{d0hxa|M{ diff --git a/bin/Backend/Runtime/Environment.class b/bin/Backend/Runtime/Environment.class index a6fd8ffd9805cebf55d4cfbf578082f4ae64d65d..8b51cd943197c918223093cb777a970ae3afe5df 100644 GIT binary patch delta 1239 zcmZuwO-~bH5Psh6wu@yI&=!!=+LX_>KrIULt)c>j7HYv_K}5xh2#Qklpou-;frE*` zy%-Y{v?g9OfoKbn#Nd^?Xa52>V+_`Lmj){IGCLp7Gc)hZ?5`s+gMQ=h*Kf%rTJdOE zzsi_N@oP-AdRS3(01Txvw9s+0Tt)>d8RSTKb}$egpNPzcXBfmvk3A^Cp{z6aK|88s zyT%xgHK*l8msDa4D)E2NQrBGYU?kjcLjp%o1AOP??R&dm@22*GS<~S^*T1mCVQR4W55-EYQ zHP}Oha(XFNL$Tv=xE+U2#8IcpQw~iWjRbBKV#zo)$a10#r*Vb`be60fuq1&62~2{W9E|AaNEVXr zqA!gVTHf^%DT3OBPIWe@x#ewun%m3S=W&5xxhlA0Ulz;WEG_%8@Fbn+Qd%Xu)3Xj= z0)3`MXvMZ?A~TBAi6w#lx5=O8*O=m#X%)c)hLi=#5Z%S+7{#^}wqE?7`NJ%{hm8l# z30xigfPAiNxSnFXNp9|re2C@;dXyF&bWdHh01xueO+)XYp?he?J~X125dJ8I0~G3q z9|IVpd%A@nrpbPa5auw1=NQ2YI-pk=#XH3&c|E;o5a7!si~t4ay>r)kN4a zx`9LV&xFYqsY*L#&nBObR=w?u@{JZkzlA);48m_%wjeQPA+1>b5yq*#{j0tGk!b0w zoy@qDI~mE7Y2>KdbtEJEF7EA=7E~O+s_9RANbn(8doO9%*L3Q zsF>hF6N$DENepXNY+U;zG%crzB#YuCFPN^3q_GZ3N9zb=DPBfcq3$)fgML2 z6$-4NLk3RbEL3d>5k|gG>sps`v>TkD!%WgWs>`g@Q{y`6G3cew?AKjs0|qDQQ|Py6 z?@q_l$&kS*hRu6=fn(I*G-KvFJ=-y1a7L1B>iufk^w`tX6|>fUK+T!M_6>gk8ye8z zU17g>jm)tX+yS!I@QewS-6LF{a0LMh1$qUR1Ss_;mj|c}uT@@KfEw>-YP7}BuVu+) z==B{Vfs2uI`y39q1@qvA?~>=IES zj-feGPRWVTjj~q~hNMvPfnACy{U|^S7vKn!zHn|M5)jR;XyUj;B}pUX*KC$K({rqv zBa*t9k``LcS!a>IZJo{_-I=ej>y3|e<uZc^Ue#<@LCj2QBiPR+*r7 z62#QKbco}fdhNrGtM9~AU*|@Qx(jy>-Gi9o edD5a{U$NX~xu>iiZh!IPZA$fbTyKV>7XAPUC8iDl diff --git a/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.class b/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.class index 11cc457e1d7039e27cd0c31e1a46efca961184a6..2402591a3d44de2ef1042d0b95e3d5e7838620f1 100644 GIT binary patch literal 4695 zcmbVQdw3jG760AYO=i2DmTccEv=$VaZrd!Bmn5Z-CZyT2n+@4b)1_jVCe!V}W+u$e zrVk1f5D~CN1s~uGd=-(0DA@o76cJPu-ykX?zEFIk{)L|!e|L6wvZ=LS^y}BV_nv#+ z=iGD7t~p}F&$Gr%#%;u~+_sgQ z1%e&+un|T8i#5#05`jST%FQa?ATW1&Ai{{^IEk~A0-6(v#LCUHAn-;F4QQ0R<29&g zRPiQ(`5x(Xi^4boizVJk8jeAeisr);!gE#_D=KKKG-#L;!Wt$86KqY!94Qra*LIdO zYGLw;Yd9IF2!x7;n>AgT1`C@jek$lpu#D?4&uFAXK2^hMI9*@~kvom;da2-c6zrmr z9yOe5M1svUN#dTV;Vn3eAtG+Z+(W(%v{!nCzFp*dWus#bZ_x8eeYah5!)V1~srz~j z=ippMkHnQLfn%#`$)v8pQo5z*4Ts99*dTE7|C+sFv{$@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JrmN@A)$gU^#3~8LdiDQ95{Z)%g=-Rxdx||4Cp{#VHfh8Fd5yu+ zm|@bite|P|0?fIQ`OG!zM77mFv(%{D-I~Kw-q5qOKy_&ehqQuIS|di@)U&ifip1#| r;xS9wVT0n^HRiB%Da%)8{y0)@{<_lsFc(J$YyN%F!`a=8iV6G=0yNhh diff --git a/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.class b/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.class index 6d75bd0e85372d8f8e55bfe2c05202057e377d60..d1acb2d8452a8858c54850fabc1ab21d5043e60f 100644 GIT binary patch literal 6739 zcmbVQ3wTt;75?XLk`2j)JV*dVt<*dvkXazt0xF?40@M%$YN1 z&ST~t{%-$Mot+pb`nzEW3@Hu;17UBVA+NHeXl`{$+4R!Fnu@Bqlc$%=omyC1m`9?@ z+vIBrdqXX5#0jL&^DOeT<+UvK1)B1vR(b+nzd*7lIMEZDU(@Ve;1x)lT`HOKJd4A5 zML~ZsR3Kn_f~CHu=CH+*9IWxSg&Tcde?yBvrsi)A`}}!@p^#@uDHr6VUe&&)fG6A< zqR_mac*ZKw)<()KmNE;*bGAFEw4?l-A23((s(F2brQXJHQEfCnpWj>U^?U2XzF;77a1qvug%TC$qXmV$E%hG1H$*!tpr)*9n51hx z{#LJA-?V9^K%YoAqJcFYQDLAS{~jGI=78PQ@niwbte#XO*J}0pj6Q@b6Rlpdgki{lWM}{0*V&V)^WP5s=&nVP!X#2`&w zVdBS{T5aMiOqOz<=n1p_VNkcSS&Ej@;OH}+cIuF8|eRq9z1Yz-%&1NkyW_nSC?C+INTfgYk{ z%j;!P(^#1&;A!%P3I^B8UGMKj@lTt02I&IvOf`=ThK^xr(}ZOz_saFY^%^F-Q#sA5~pYazK^kz>>xst@3I*UH8(y_Wk zusX5|)z2^UEVP_RI&CBZ=uGihv+06vyf4sS`G_NXO^{yf$xmWzYh_94DJSuniO=x`Z5s}1Jk~N6x3tVxCjKR* zxn(S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F^>Fv|?rGS+M*v8881}n-oR*tt)e!)|iTt1Yo;NRKw2>gT6 z`LO!g|M~pH{j4+f{fuj2S zuev7kPM?~Z{_o`U|9GeWn4G>5Yc}JjAtIw!Wc^P~CMGqRnAC*O&(%av*P7_*T9d@| zlqRW*G!FOyo$n+5J>z3cz;;ydomEG?1)tLKK4aSY94qhzE+W2`S9uLhe-n-0hp*|5 zJLqoT(D}Z?`}hvuVkfQry~x22VsCsWMl!vrgfUsY1;nVt^@&kJ(q;MQ2#jK*k;|J8 zu? diff --git a/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.class b/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.class new file mode 100644 index 0000000000000000000000000000000000000000..d84d5e136f96a274328b62a7917ddf6aba781bfa GIT binary patch literal 3957 zcmbVPX;2*35&qu1-JM}HlF&*ZtuZ3lu>?r47)i(ibii_GrR6ZYpe&M%hGmQvuXf4q zpv#FJCw6W-r=8PE94B#{+XsteMb6<|wiD-Yq9}1ie^TW?{*|PXN>wT${oc&Nf=DH$ zqIlh}r@LRjulsewOaFfE`MEjl#%n4RhV9+iOxm{6J5jWCe7G)`_>j^fAM*!0KIXTMkBB)Y!dl`(N{f8B zT7@{=t*sjU`~ zffDFK_9g=>9PTCq26Po~Ug}PUp7XS!pf2LnrU;w$`URjZF^O8GORs(Ep95h z8A|1mMR01^PpJME#QHT15FO~$Fv!40G{k7z8PY)I!ic$)Nnl#)&WSfR#M7C=fBeFxoIFV)zcM{ntD(JXKbCRL1=5TSq{bQ3>!fstg zlgmNvaz&oj9J!Qix$8K5gKP5PK&mMW==2ZUb+dmz)up-(%ojyn{e9$LWT( zMHvcZPE2LeR@!bY%7=SB5!^c&)-TOShbT=etD_6|8+ZWkW>8O>scEa9a4Vxr6}fVs zgpT`ABbN6Wct1YCpxM-+#A~6ZP_wK-IUY3d5I#iJHDTGIOltZ>nqgb9RrK;CFeJD9@9~UWn#K0%;Nd}$dU1{N+ zF!a=n)DCO-G;xC+149}<>pbYL&K?ctNE&MlMKye0a?vggUm)}cqU{>KC>biiFH43B z@+*>|0{tp6Jz-M*I+=BK3GSQHf#AMP9CZxho+fUvL&%&Rp&^WA2` z&ScLR_#u8owu!7|+LmZa&S!@DMHNQJwK^#-KtCqk1RZrci{U2*eu@{JPEzo)(ebjp zkr)Mrnd>xd(-|>TNQ>U6TY1zj&D?&=q_A@ZMSrH~eHDb23lO-?u1JZ76r(oa9_UQX zV$TK1BF_b(Yvl~aVyl8=kySxx6bH$$lHyF<)oV`4%2x3*6=XCsolRKX^rrx&X}MX^ zAaaLl!j}Uy@*vt0tq>zoQW}Vo(m0fqhM}Z13MHixCMgXqNoh)jj9o z#i)Er-0?FadN zz$dW@_yjm|73fsaZ$rRGXasyNK0*|bBHpYz00ksK>a_r=tV}HcB#v7G(31k7uL*#@ zAprW80O%0BH_DYCw|!RnRRfiUBGKlsEvDNPxsD z021}l6etk@mAC*2QH2!oX59g(LIR{;3y{vr^a4QQxQE?JZP5d|bDS=Z6YJSJa$FhE z^SBVu>{eD{kFpkfl>qiBo6xRoMTfEroyuNxDI-M3(W9ggRxaZJS8YLk8egl zZ@>WGj@x+)26+#nycaP(f?<9Phxpw@A3&Txh{OC59N~}RD1RJx@Fy|KpTRMH0VaO| zWBf%V_^Yt^AE^h54)~C0;ry!G0nhP$cnL344}67};%Dfj=KhBASNxnX;H-i$_ytbV z|CuvNEq+OQ9`-u>2Yy9*Ud6|*;Mb(*Q`%fTRk_SGyh?g1-Q{=q4e4oglUe+h^h)?q zS5K#i_v13jbkYKjz&A%=dQ}j-S5$;lOwmZGoMQ^KV&OGkS1kK=ks96Y_jHDWKl}$u C9KyZ; literal 0 HcmV?d00001 diff --git a/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.class b/bin/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.class index dd8ed34daea605dd0cbe98162bcbef4015b23cab..107a049fec848569b057fd7fe48a993b633f8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v(kQxU4C~0mdc45oRhe!!Q+UtBA)flf7F`Y# z(0NMH>Frz;=?^#qu0Vl_!+`?(1m5J66o??Fj+7c6AoJKTc;*wf#LgZ;S);`YD?DdoQ$;6EV3N4X;nRx5SteGWNW{7=R z;%&CDmXO<6qD0=wh&gQz`P&?_avoXB&R_=FkVXEUr%B=;bFD$Eb($TG3+;`i^3F1b zvihIaN@{n-g+=~^j&D(hqo~I*Y`{0@$8ml~lGu%L9KZxV<@>LZV%H?j-~@i;^$ezP z7vJLvPLdO+$cNJl(l5%SFHaqR!3TndUQF{!K|Hq_MYGgOSp0!s91k3iq0=L@d*l`3 zu6tsozhbo&l7k=D3aMm1IE^(cqy?IDE+lcOxTzTTt<5Ff4kmXo^T9kb7yN>Lc`W(N rZ15uCZ+aRJ^O=hEk(l<6l;dysc?-Fp4)rn0HT 255) - { + if (result > 255) { result = result & 255; Ram.set_Carryflag(true); } //If result is smaller than 0. - else if (result < 0) - { + else if (result < 0) { result = result & 255; Ram.set_Carryflag(true); } //If result is greater than or equal to 0 and smaller than or equal to 255. - else - { + else { Ram.set_Carryflag(false); } @@ -129,21 +120,22 @@ public class PIC { int dcResult = (wRegValue & 15) + (eightK & 15); //If the result is greater than 15, DC-Flag is set true. - if (dcResult > 15) - { + if (dcResult > 15) { Ram.set_Digitcarryflag(true); } //If the result is smaller or equal to 15, DC-Flag is set false. - else - { + else { Ram.set_Digitcarryflag(false); } setWRegister(result); + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); - //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. + //Each Instruction has to split Programmcounter to PCL and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); } @@ -174,8 +166,10 @@ public class PIC { //Write result into setWRegister(result); - //Increment programcounter + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -257,8 +251,10 @@ public class PIC { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - //Increment programcounter + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -306,8 +302,10 @@ public class PIC { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - //Increment programcounter + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -332,8 +330,10 @@ public class PIC { //Write result back into fileregister. Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); - //Increment programcounter + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -359,15 +359,19 @@ public class PIC { //If bit at bitaddress is 1, next instruction is executed. if ((bitMask & regFileAddrValue) == bitMask) { - //Increment programcounter by one. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); } //If bit at bitaddress is 0, next instruction will be replaced by a NOP. else { - //Increment programcounter by one. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Execute NOP. NOP(); } @@ -381,8 +385,7 @@ public class PIC { * * Bit ’b’ in register ’f’ is set. */ - public void BSF(int bitaddress, int registerFileAddress) - { + public void BSF(int bitaddress, int registerFileAddress) { //Get bitmask to OR with fileaddress to set bit. int bitMask = bitMaskSetBitArray[bitaddress]; //Get Value of RAM-Bank-RP0Bit Address. @@ -394,8 +397,10 @@ public class PIC { //Write result into file-register. Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); - //Increment programcounter + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -410,25 +415,26 @@ public class PIC { * discarded and a NOP is executed * instead, making this a 2TCY instruction. */ - public void BTFSS(int bitaddress, int registerFileAddress) - { + public void BTFSS(int bitaddress, int registerFileAddress) { //Get bitmask to AND with fileaddress to get bit. int bitMask = bitMaskSetBitArray[bitaddress]; //Get Value of RAM-Bank-RP0Bit Address. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //If bit at bitaddress is 0, next instruction is executed. - if ((bitMask & regFileAddrValue) != bitMask) - { - //Increment programcounter by one. + if ((bitMask & regFileAddrValue) != bitMask) { + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); } //If bit at bitaddress is 1, next instruction will be replaced by a NOP. - else - { - //Increment programcounter by one. + else { + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Execute NOP. NOP(); } @@ -447,8 +453,7 @@ public class PIC { * the PC are loaded from PCLATH. CALL * is a two cycle instruction. */ - public void CALL(int elevenK) - { + public void CALL(int elevenK) { //Push next instruction on STACK. Stack.pushReturnAdressOnStack(Ram.get_Programcounter() + 1); @@ -460,6 +465,9 @@ public class PIC { //Set Programmcounter to new address. Ram.set_Programcounter(newPC); + //Increment TMR0 if interbnal instruction cycle assigned to TMR0. + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. @@ -472,14 +480,15 @@ public class PIC { * The contents of register ’f’ are cleared * and the Z bit is set. */ - public void CLRF(int registerFileAddress) - { + public void CLRF(int registerFileAddress) { //Value at fileregisteraddress is set to zero. Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), 0); //Zeroflag is set. Ram.set_Zeroflag(true); - //Increment programcounter by 1. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -491,14 +500,15 @@ public class PIC { * W register is cleared. Zero bit (Z) is * set. */ - public void CLRW() - { + public void CLRW() { //Set to zero. setWRegister(0); //Zeroflag is set. Ram.set_Zeroflag(true); - //Increment programcounter by 1. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -512,8 +522,7 @@ public class PIC { * of the WDT. Status bits TO and PD are * set. */ - public void CLRWDT() - { + public void CLRWDT() { Ram.set_TimeOutFlag(true); Ram.set_PowerDownFlag(true); Ram.set_PS0(false); @@ -521,8 +530,10 @@ public class PIC { Ram.set_PS2(false); //Programcounter will be incremented by 1. - //Increment programcounter by 1. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -536,8 +547,7 @@ public class PIC { * W. If ’d’ is 1 the result is stored back in * register ’f’. */ - public void COMF(int destinationBit, int registerFileAddress) - { + public void COMF(int destinationBit, int registerFileAddress) { //Get value at registerFileAddress int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); @@ -545,33 +555,31 @@ public class PIC { int result = (~regFileAddrValue); //If result is zero, zeroflag is set true. - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); } //If result is not zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } result &= 255; //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into fileRegister. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - //Increment programcounter by 1. + //Increment programcounter and TMR0 if assigned to TMR0. Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -589,35 +597,36 @@ public class PIC { * executed instead making it a 2T CY instruc- * tion. */ - public void DECFSZ(int destinationBit, int registerFileAddress) - { + public void DECFSZ(int destinationBit, int registerFileAddress) { //Get value of fileregisteraddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //Decrement value by one. regFileAddrValue--; //If the destinationbit is 0, the decremented value is written into the - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(regFileAddrValue); } //If the destinationbit is 1, the decremented value is written bach into the fileregister. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), regFileAddrValue); } //If the dekremented value doesn't equal zero, the next instruction is executed. - if (regFileAddrValue != 0) - { - Ram.inkrement_Programcounter(1, 0); + if (regFileAddrValue != 0) { + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); } //If the dekremented value equals zero, a NOP is executed and the other instruction will be dismissed. - else - { - Ram.inkrement_Programcounter(1, 0); + else { + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); NOP(); } @@ -632,45 +641,41 @@ public class PIC { * result is stored in the W register. If ’d’ is * 1 the result is stored back in register ’f’ . */ - public void DECF(int destinationBit, int registerFileAddress) - { + public void DECF(int destinationBit, int registerFileAddress) { //Get value of fileregisteraddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //Decrement value by one. regFileAddrValue--; //If dekremented value equals zero, zeroflag is set true. - if (regFileAddrValue == 0) - { + if (regFileAddrValue == 0) { Ram.set_Zeroflag(true); } //If dekremented value doesn't equal zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } //If value gets smaller than zero it is AND with 255 to become positive, because only values between 0 and 255 are allowed. - if (regFileAddrValue < 0) - { + if (regFileAddrValue < 0) { regFileAddrValue = regFileAddrValue & 255; } //If destinationbit equals zero, value is written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(regFileAddrValue); } //If destinationbit doesn't equal zero, value is written into fileregister. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), regFileAddrValue); } - //Inkrement Ram by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -685,12 +690,14 @@ public class PIC { * PC are loaded from PCLATH<4:3>. * GOTO is a two cycle instruction. */ - public void GOTO(int elevenK) - { + public void GOTO(int elevenK) { //elevenK OR ((PCLATH AND 0b11000) << 8) int result = elevenK | ((Ram.get_PCLATH() & 0b11000) << 8); Ram.set_Programcounter(result); + //Increment TMR0 if internal instruction cycle assigned to TMR0. + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -704,45 +711,41 @@ public class PIC { * the W register. If ’d’ is 1 the result is * placed back in register ’f’. */ - public void INCF(int destinationBit, int registerFileAddress) - { + public void INCF(int destinationBit, int registerFileAddress) { //Get value of fileregisteraddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //Increment value by one. regFileAddrValue++; //If value becomes zero, zeroflag is set true. - if (regFileAddrValue == 0) - { + if (regFileAddrValue == 0) { Ram.set_Zeroflag(true); } //If value doesn't become zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } //If value becomes greater than 255, it will be set to a value between 0 and 255. - if (regFileAddrValue > 255) - { + if (regFileAddrValue > 255) { regFileAddrValue &= 255; } //If destinationbit is set 0, value will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(regFileAddrValue); } //If destinationbit is not 0, value will be written back to RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), regFileAddrValue); } - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -760,43 +763,41 @@ public class PIC { * cuted instead making it a 2TCY instruc- * tion . */ - public void INCFSZ(int destinationBit, int registerFileAddress) - { + public void INCFSZ(int destinationBit, int registerFileAddress) { //Get value of fileregisteraddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //Increment value by one. regFileAddrValue++; //If value increases over uper line, it is set to a value between 0 and 255. - if (regFileAddrValue > 255) - { + if (regFileAddrValue > 255) { regFileAddrValue &= 255; } //If destinationbit is zero, the value is written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(regFileAddrValue); } //If destinationbit is one, the value is written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), regFileAddrValue); } //If value is not zero, next instruction will be executed. - if (regFileAddrValue != 0) - { - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + if (regFileAddrValue != 0) { + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); } //If value is zero, next instruction will not be executed and NOP is executed instead. - else - { - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + else { + ///Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Call NOP. NOP(); @@ -813,28 +814,27 @@ public class PIC { * OR’ed with the eight bit literal 'k'. The * result is placed in the W register . */ - public void IORLW(int eightK) - { + public void IORLW(int eightK) { //and eightK are OR'ed and result is written into result. int result = get_WRegister() | eightK; //If result is zero, zeroflag is set true. - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); } //If result is not zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } //Set to result. setWRegister(result); - //Increment programcounter. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -848,37 +848,34 @@ public class PIC { * W register. If ’d’ is 1 the result is placed * back in register ’f’. */ - public void IORWF(int destinationBit, int registerFileAddress) - { + public void IORWF(int destinationBit, int registerFileAddress) { //Result is value OR fileregister-value. int result = get_WRegister() | Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //If result is zero, zeroflag is set true. - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); } //If result is not zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } //If destinationbit is zero, result is written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is not zero, result is written into fileregister. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -891,13 +888,14 @@ public class PIC { * register . The don’t cares will assemble * as 0’s. */ - public void MOVLW(int eightK) - { + public void MOVLW(int eightK) { //is set to eightK bit literal. setWRegister(eightK); - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -914,30 +912,28 @@ public class PIC { * itself. d = 1 is useful to test a file regis- * ter since status flag Z is affected. */ - public void MOVF(int destinationBit, int registerFileAddress) - { + public void MOVF(int destinationBit, int registerFileAddress) { //If destinationbit is zero, the value from fileregister is written to - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress)); } //If destinationbit is one, value will still be in fileregister. //If value in fileregister is zero, zeroflag is set true. - if (Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress) == 0) - { + if (Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress) == 0) { Ram.set_Zeroflag(true); } //If value in fileregister is not zero, zeroflag is set false. - else - { + else { Ram.set_Zeroflag(false); } - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -948,13 +944,14 @@ public class PIC { * * Move data from W register to file register */ - public void MOVWF(int registerFileAddress) - { + public void MOVWF(int registerFileAddress) { //Data from is moved to fileregister. Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), get_WRegister()); - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -965,10 +962,11 @@ public class PIC { * * No operation */ - public void NOP() - { - //Increment programcounter by one. - Ram.inkrement_Programcounter(1, 0); + public void NOP() { + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -984,8 +982,7 @@ public class PIC { * (INTCON<7>). This is a two cycle * instruction. */ - public void RETFIE() - { + public void RETFIE() { //Set Global Interrupt Enable Bit true. Ram.set_GIE(true); @@ -994,6 +991,9 @@ public class PIC { //Write returnAddress into programcounter. Ram.set_Programcounter(returnAddress); + //Increment TMR0 if assigned to TMR0. + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1002,11 +1002,13 @@ public class PIC { /**OPTION * Datasheet Page 65 */ - public void OPTION() - { + public void OPTION() { //Nothing happens, only programmcounter gets incremented by 1. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1022,8 +1024,7 @@ public class PIC { * return address). This is a two cycle * instruction. */ - public void RETLW(int eightK) - { + public void RETLW(int eightK) { //Load with eight bit literal. setWRegister(eightK); @@ -1032,6 +1033,9 @@ public class PIC { //Write returnAddress into programcounter. Ram.set_Programcounter(returnAddress); + //Increment TMR0 if assigned to TMR0. + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1045,13 +1049,15 @@ public class PIC { * is loaded into the program counter. This * is a two cycle instruction. */ - public void RETURN() - { + public void RETURN() { //Pop address from STACK. int returnAddress = Stack.popReturnAdressFromStack(); //Write returnAddress into programcounter. Ram.set_Programcounter(returnAddress); + //Increment TMR0 if assigned to TMR0. + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1066,8 +1072,7 @@ public class PIC { * W register. If ’d’ is 1 the result is stored * back in register ’f’. */ - public void RLF(int destinationBit, int registerFileAddress) - { + public void RLF(int destinationBit, int registerFileAddress) { //Get value at fileaddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); //Shift result to left by one bit. @@ -1076,42 +1081,39 @@ public class PIC { boolean set_Carryflag = false; //If the first bit which will be shifted is 1, the Carryflag will be set at the end to true. - if ((0b10000000 & regFileAddrValue) == 0b10000000) - { + if ((0b10000000 & regFileAddrValue) == 0b10000000) { set_Carryflag = true; } //If carryflag is true, last bit is set 1. - if (Ram.get_Carryflag() == true) - { + if (Ram.get_Carryflag() == true) { result |= 0b00000001; } //If carryflag is false, last bit is set 0. - else - { + else { result &= 0b11111110; } result &= 255; //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } //Set value of carryflag. Ram.set_Carryflag(set_Carryflag); - //Increment Ram by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1136,20 +1138,17 @@ public class PIC { boolean set_Carryflag = false; //If the first bit which will be shifted is 1, the Carryflag will be set at the end to true. - if ((0b00000001 & regFileAddrValue) == 0b00000001) - { + if ((0b00000001 & regFileAddrValue) == 0b00000001) { set_Carryflag = true; } //If carryflag is true, first bit is set 1. - if (Ram.get_Carryflag() == true) - { + if (Ram.get_Carryflag() == true) { result |= 0b10000000; } //If carryflag is false, first bit is set 0. - else - { + else { result &= 0b01111111; } @@ -1157,19 +1156,19 @@ public class PIC { Ram.set_Carryflag(set_Carryflag); //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - //Increment Ram by one. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1177,7 +1176,7 @@ public class PIC { /** * Datasheet Page 68 - * + * TODO * The power-down status bit, PD is * cleared. Time-out status bit, TO is * set. Watchdog Timer and its pres- @@ -1186,10 +1185,13 @@ public class PIC { * mode with the oscillator stopped. See * Section 14.8 for more details. */ - public void SLEEP() - { - //Not implemented - Ram.inkrement_Programcounter(1, 0); + public void SLEEP() { + //TODO pause running (no Thread.sleep()!!!) + //Not implemented + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1202,8 +1204,7 @@ public class PIC { * ment method) from the eight bit literal 'k'. * The result is placed in the W register. */ - public void SUBLW(int eightK) - { + public void SUBLW(int eightK) { int wRegValue = get_WRegister(); //Build Two's complement @@ -1221,34 +1222,24 @@ public class PIC { int dcResult = (eightK & 15) + (wRegValue & 15) + 1; //If the result is greater than 15, DC-Flag is set true. - if (dcResult > 15) - { + if (dcResult > 15) { Ram.set_Digitcarryflag(true); } //If the result is smaller or equal to 15, DC-Flag is set false. - else - { + else { Ram.set_Digitcarryflag(false); } - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); - } - - else - { + } else { Ram.set_Zeroflag(false); } - if (carry == 1) - { + if (carry == 1) { Ram.set_Carryflag(true); - } - - else - { + } else { Ram.set_Carryflag(false); } @@ -1256,7 +1247,10 @@ public class PIC { setWRegister(result); - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1270,8 +1264,8 @@ public class PIC { * result is stored in the W register. If 'd' is 1 the * result is stored back in register 'f'. */ - public void SUBWF(int destinationBit, int registerFileAddress) - { + public void SUBWF(int destinationBit, int registerFileAddress) { + int wRegValue = get_WRegister(); //Get value at fileaddress. @@ -1298,46 +1292,40 @@ public class PIC { } //If the result is smaller or equal to 15, DC-Flag is set false. - else - { + else { Ram.set_Digitcarryflag(false); } - if (result == 0) - { + //Set/clear zeroflag + if (result == 0) { Ram.set_Zeroflag(true); - } - - else - { + } else { Ram.set_Zeroflag(false); } - if (carry == 1) - { + //Set/clear carryflag + if (carry == 1) { Ram.set_Carryflag(true); - } - - else - { + } else { Ram.set_Carryflag(false); } result &= 255; //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1351,8 +1339,7 @@ public class PIC { * is placed in W register. If 'd' is 1 the result * is placed in register 'f'. */ - public void SWAPF(int destinationBit, int registerFileAddress) - { + public void SWAPF(int destinationBit, int registerFileAddress) { //Get value at fileaddress. int regFileAddrValue = Ram.get_Value_Of_Bank_RP0_Bit_Of_Element_At_Adress(Ram.get_RP0Bit(), registerFileAddress); @@ -1363,18 +1350,19 @@ public class PIC { int result = (lowerNibble << 4) | higherNibble; //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1393,11 +1381,13 @@ public class PIC { * with future PIC16CXX products, * do not use this instruction! */ - public void TRIS() - { + public void TRIS() { //Nothing happens, only programcounter will be incremented by 1. - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1410,25 +1400,25 @@ public class PIC { * XOR’ed with the eight bit literal 'k'. * The result is placed in the W register. */ - public void XORLW(int eightK) - { + public void XORLW(int eightK) { int wRegValue = get_WRegister(); int result = wRegValue ^ eightK; - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); } - else - { + else { Ram.set_Zeroflag(false); } setWRegister(result); - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); @@ -1442,8 +1432,7 @@ public class PIC { * 0 the result is stored in the W register. If 'd' is * 1 the result is stored back in register 'f'. */ - public void XORWF(int destinationBit, int registerFileAddress) - { + public void XORWF(int destinationBit, int registerFileAddress) { int wRegValue = get_WRegister(); //Get value at fileaddress. @@ -1451,29 +1440,28 @@ public class PIC { int result = wRegValue ^ regFileAddrValue; - if (result == 0) - { + if (result == 0) { Ram.set_Zeroflag(true); } - else - { + else { Ram.set_Zeroflag(false); } //If destinationbit is zero, result will be written into - if (destinationBit == 0) - { + if (destinationBit == 0) { setWRegister(result); } //If destinationbit is one, result will be written into RAM. - else - { + else { Ram.set_Element_X_Of_Bank_Y_To_Z(registerFileAddress, Ram.get_RP0Bit(), result); } - Ram.inkrement_Programcounter(1, 0); + //Increment programcounter and TMR0 if assigned to TMR0. + Ram.inkrement_Programcounter(1, 0); //Kind of call + if (Ram.get_T0CS() == false) + Ram.increment_TMR0(); //Each Instruction has to split Programmcounter to PC and PCLATH because Ram can't see RAM. Ram.set_PCL(Ram.get_Programcounter() & 0b0000011111111); diff --git a/src/Backend/Microcontroller/RAM.java b/src/Backend/Microcontroller/RAM.java index 5955907..4d591c0 100755 --- a/src/Backend/Microcontroller/RAM.java +++ b/src/Backend/Microcontroller/RAM.java @@ -214,7 +214,7 @@ public class RAM { //Check for overflow and set bit and timer if ((iValTMR0 + iValIncr) > 255) { set_T0IF(true); - set_TMR0((iValTMR0 + iValIncr) & 255); //TODO 0 or &255 + set_TMR0((iValTMR0 + iValIncr) & 255); //TODO 0 or &255 (Question to Prof) } else { set_T0IF(false); set_TMR0(iValTMR0 + iValIncr); @@ -281,34 +281,12 @@ public class RAM { * @param value */ public synchronized void set_PORTA(int value) { - //Check if PORT A RA4 was set/cleared - boolean bActualRA4 = get_RA4_T0CKI(); - boolean bNewRA4 = ((value & 0b00010000) == 0b00010000); - - //Increment TMR0 if RA4 was set/cleared - if (bActualRA4 != bNewRA4) { - if (bNewRA4) { //rising edge - if (!get_T0SE()) { //rising edge increments TMR0 - increment_TMR0(); - } - } else { //falling edge - if (get_T0SE()) { //falling edge increments TMR0 - increment_TMR0(); - } - } - } - //Set PORT A - bank0[5] = value; - } - - public synchronized void set_PORTA_Bit_X_To_Y(int x, int y) { //TODO - //Increment TMR0 if RA4 was set/cleared - if ((x == 4)) { + if (get_T0CS()) { + //Check if PORT A RA4 was set/cleared boolean bActualRA4 = get_RA4_T0CKI(); - boolean bNewRA4 = false; - if (y == 1) - bNewRA4 = true; - + boolean bNewRA4 = ((value & 0b00010000) == 0b00010000); + + //Increment TMR0 if RA4 was set/cleared if (bActualRA4 != bNewRA4) { if (bNewRA4) { //rising edge if (!get_T0SE()) { //rising edge increments TMR0 @@ -321,6 +299,35 @@ public class RAM { } } } + + //Set PORT A + bank0[5] = value; + } + + public synchronized void set_PORTA_Bit_X_To_Y(int x, int y) { + + //Increment TMR0 if RA4 was set/cleared + if ((x == 4)) { + //Check T0CS + if (get_T0CS()) { + boolean bActualRA4 = get_RA4_T0CKI(); + boolean bNewRA4 = false; + if (y == 1) + bNewRA4 = true; + + if (bActualRA4 != bNewRA4) { + if (bNewRA4) { //rising edge + if (!get_T0SE()) { //rising edge increments TMR0 + increment_TMR0(); + } + } else { //falling edge + if (get_T0SE()) { //falling edge increments TMR0 + increment_TMR0(); + } + } + } + } + } //Clear bit x if (y == 0) { @@ -595,71 +602,65 @@ public class RAM { set_STATUS(status); } - public synchronized boolean get_Interruptflag() - { + public synchronized boolean get_Interruptflag() { return (get_STATUS() & 0b10000000) == 128; } //Bank0 PCL - public synchronized int get_Programcounter() - { + public synchronized int get_Programcounter() { return (bank0[2]); } - public synchronized int get_LastProgramcounter() - { + public synchronized int get_LastProgramcounter() { return lastProgramcounter; } - public synchronized void inkrement_Programcounter(int value, int kindOfCall) //0 at Fetchzycle, 1 at Jumpcommand, 2 at ... - { - if (bank0[2] >= 0 && bank0[2] <= 255) - { + /** + * + * @param value + * @param kindOfCall 0 at normal instruction, 1 at Fetchzycle,... 2 at Jumpcommand, 3 at ... + */ + public synchronized void inkrement_Programcounter(int value, int kindOfCall) { + if (bank0[2] >= 0 && bank0[2] <= 255) { lastProgramcounter = bank0[2]; bank0[2] += value; - } - - else - { - if (kindOfCall == 0) - { + } else { + if (kindOfCall == 0) { //Nothing happens } - if (kindOfCall == 1) - { + if (kindOfCall == 1) { bank0[2] = 0; //Wrap-Around at fetchcycle } } } - public synchronized void dekrement_Programcounter(int value) - { - if (bank0[2] > 0 && bank0[2] <= 255) - { + /** + * Decrements PC by value. + * @param value to decrement PC by. + */ + public synchronized void dekrement_Programcounter(int value) { + if (bank0[2] > 0 && bank0[2] <= 255) { lastProgramcounter = bank0[2]; bank0[2] -= value; - } - - else - { + } else { throw new IndexOutOfBoundsException(); } } - public synchronized boolean set_Programcounter(int value) - { + /** + * Sets PC to value. + * @param value to set PC to. + * @returns true if set worked, else false if set didn't work. + */ + public synchronized boolean set_Programcounter(int value) { boolean setWorked = false; - if (value >= 0 && value <= 255) - { + if (value >= 0 && value <= 255) { lastProgramcounter = bank0[2]; bank0[2] = value; setWorked = true; - } - - else - { + } else { throw new IndexOutOfBoundsException(); } @@ -667,85 +668,84 @@ public class RAM { } //Bank0 PORTA - public synchronized void set_RA0(boolean value) - { + /** + * + * @param value + */ + public synchronized void set_RA0(boolean value) { int portA = get_PORTA(); - if (value) - { + if (value) { portA |= 0b00000001; - } - - else - { + } else { portA &= 0b11111110; } set_PORTA(portA); } - public synchronized boolean get_RA0() - { - { - return (get_PORTA() & 0b00000001) == 1; - } + /** + * + * @return + */ + public synchronized boolean get_RA0() { + return (get_PORTA() & 0b00000001) == 1; } - public synchronized void set_RA1(boolean value) - { + /** + * + * @param value + */ + public synchronized void set_RA1(boolean value) { int portA = get_PORTA(); - if (value) - { + if (value) { portA |= 0b00000010; - } - - else - { + } else { portA &= 0b11111101; } set_PORTA(portA); } - public synchronized boolean get_RA1() - { - { - return (get_PORTA() & 0b00000010) == 2; - } + /** + * + * @return + */ + public synchronized boolean get_RA1() { + return (get_PORTA() & 0b00000010) == 2; } - public synchronized void set_RA2(boolean value) - { + /** + * + * @param value + */ + public synchronized void set_RA2(boolean value) { int portA = get_PORTA(); - if (value) - { + if (value) { portA |= 0b00000100; - } - - else - { + } else { portA &= 0b11111011; } set_PORTA(portA); } - public synchronized boolean get_RA2() - { - { - return (get_PORTA() & 0b00000100) == 4; - } + /** + * + * @return + */ + public synchronized boolean get_RA2() { + return (get_PORTA() & 0b00000100) == 4; } - public synchronized void set_RA3(boolean value) - { + /** + * + * @param value + */ + public synchronized void set_RA3(boolean value) { int portA = get_PORTA(); - if (value) - { + if (value) { portA |= 0b00001000; - } - - else - { + } else { portA &= 0b11110111; } diff --git a/src/Backend/Runtime/Environment.java b/src/Backend/Runtime/Environment.java index db2b9fa..5c53d25 100755 --- a/src/Backend/Runtime/Environment.java +++ b/src/Backend/Runtime/Environment.java @@ -31,13 +31,15 @@ public class Environment { public Environment() { + oPIC = new PIC(); + oPIC.setWRegister(4); GUIMainFrame oMainFrame = new GUIMainFrame(this); watchdog = new WATCHDOG(); - oPIC = new PIC(); + sEepromDataFile = ""; sActualCommand = ""; diff --git a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.java b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.java index 10c26e0..f74a056 100755 --- a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.java +++ b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMainFrame.java @@ -3,6 +3,7 @@ package Frontend.PIC_SIMULATOR_GUI_JAVA; import java.awt.Color; import java.awt.Dimension; import java.awt.Insets; +import java.util.ArrayList; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; @@ -10,6 +11,7 @@ import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; +import javax.swing.JPanel; import javax.swing.border.Border; import Backend.EepromLoader.ReadEepromFile; @@ -17,27 +19,72 @@ import Backend.Runtime.Environment; public class GUIMainFrame extends JFrame { + /** + * Color oWhite = new Color(255, 253, 250); + * Color oDarkGray = new Color(76, 78, 82); + * Color oDarkGrayB = new Color(47, 47, 47); + * Color oLightBlue = new Color(173, 216, 230); + * Color oOrangeDM = new Color(255, 170, 0); + * Color oLightBlueDM = new Color(0, 213, 255); + * Color oOrangeDMB = new Color(255, 85, 0); + * First Color == TextColor + * Second Color == BackgroundColor + * Third Color == BorderColor + * Fourth Color == TextColor Marked + * Fifth Color == BackgroundColor Marked + * Sixth Color == BorderColor Marked + */ + Color[] aoDarkTheme = {new Color(255, 253, 250), new Color(76, 78, 82), new Color(47, 47, 47), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)}; + Color[] aoLightTheme = {new Color(76, 78, 82), new Color(255, 253, 250), new Color(173, 216, 230), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)}; + GUITestFileTable oGUITestFileTable; GUIMenuBar oGUIMenuBar; + + JPanel oMainPanel; + JPanel oPanelRegisterInformation; + + ArrayList oPanels = new ArrayList(); /** * Constructor */ public GUIMainFrame(Environment env) { - + oMainPanel = new JPanel(); this.setTitle("PIC-Simulator GUI"); // sets title of frame this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // if x is pressed, exit application (HIDE_ON_CLOSE-hides application, DO_NOTHING_ON_CLOSE-prevents user from closing application) //this.setResizable(false); // prevent frame from beeing resized this.setSize(1400, 800); //sets x and y dimension of frame //this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); - this.setLayout(new GridBagLayout()); + oMainPanel.setLayout(new GridBagLayout()); oGUITestFileTable = new GUITestFileTable(); - int[] aiTestRegisters = {1, 2, 3, 4, 5, 6, 7, 8 ,9}; + oPanelRegisterInformation = new JPanel(); + oPanelRegisterInformation.setLayout(new GridBagLayout()); + GridBagConstraints oConstraintsRegisterInformation = new GridBagConstraints(); + int iPrescaler; + if (env.getPIC().getRam().get_PSA()) + iPrescaler = env.getPIC().getRam().get_WDT_PrescalerRate(); + else + iPrescaler = env.getPIC().getRam().get_TMR0_PrescalerRate(); + int[] aiRegisters = {env.getPIC().getRam().get_PCL(), env.getPIC().getRam().get_PCLATH(), + env.getPIC().getRam().get_Programcounter(), env.getPIC().getRam().get_STATUS(), + env.getPIC().getRam().get_FSR(), env.getPIC().getRam().get_OPTION(), + iPrescaler, env.getPIC().getRam().get_TMR0(), + env.getPIC().get_WRegister()}; GUIRegisters oGUIRegisters = new GUIRegisters(); + oGUIRegisters.setRegisters(aiRegisters); + GUIRegistersDetailed oGuiRegistersDetailed = new GUIRegistersDetailed(); + oConstraintsRegisterInformation.anchor = GridBagConstraints.WEST; + oConstraintsRegisterInformation.gridx = 0; + oConstraintsRegisterInformation.gridy = 0; + oPanelRegisterInformation.add(oGUIRegisters, oConstraintsRegisterInformation); + oConstraintsRegisterInformation.gridy = 1; + oConstraintsRegisterInformation.anchor = GridBagConstraints.WEST; + oPanelRegisterInformation.add(oGuiRegistersDetailed, oConstraintsRegisterInformation); + this.setJMenuBar(new GUIMenuBar(env, this, oGUITestFileTable, oGUIRegisters)); this.setVisible(true); //make frame visible - this.setBackground(new Color(76, 78, 82)); - ImageIcon guiLogo = new ImageIcon("./images/gui_logo.png"); // create an ImageIcon + + ImageIcon guiLogo = new ImageIcon("./pictures/gui_logo.png"); // create an ImageIcon this.setIconImage(guiLogo.getImage()); // change icon of frame //this.getContentPane().setBackground(Color.green); //change color of background @@ -64,14 +111,16 @@ public class GUIMainFrame extends JFrame { //getContentPane().setLayout(new BorderLayout()); //this.add(new GUITestFileTable("./testfiles/TPicSim1.LST")); GridBagConstraints c = new GridBagConstraints(); + c.anchor = GridBagConstraints.WEST; + c.insets = new Insets(2,5,2,5); c.gridx = 0; //next added element will be in column 1 c.gridy = 0; //next added element will be in row 1 - c.insets = new Insets(10,10,10,10); - this.add(oGUITestFileTable, c); - + oMainPanel.add(oGUITestFileTable, c); c.gridx = 1; - this.add(oGUIRegisters); - + oMainPanel.add(oPanelRegisterInformation, c); + oPanels.add(oPanelRegisterInformation); + oPanels.add(oMainPanel); + this.add(oMainPanel); updateWindow(); } @@ -79,4 +128,21 @@ public class GUIMainFrame extends JFrame { this.revalidate(); this.repaint(); } + + public void setTheme(int iThemeNr) { + switch (iThemeNr) { + case 0: { + for (JPanel oPanel : oPanels) { + oPanel.setForeground(aoLightTheme[0]); + oPanel.setBackground(aoLightTheme[1]); + } + }break; + case 1: { + for (JPanel oPanel : oPanels) { + oPanel.setForeground(aoDarkTheme[0]); + oPanel.setBackground(aoDarkTheme[1]); + } + }break; + } + } } \ No newline at end of file diff --git a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.java b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.java index 6f925b8..b19299f 100644 --- a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.java +++ b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIMenuBar.java @@ -14,6 +14,8 @@ import javax.swing.JFileChooser; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JPanel; + import Backend.EepromLoader.ReadEepromFile; import Backend.Runtime.Environment; @@ -367,7 +369,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener { setTheme(aoDarkTheme[0], aoDarkTheme[1]); oGUITestFileTable.setTheme(1); oGUIRegisters.setTheme(1); - oGUIMainFrame.setBackground(aoDarkTheme[1]); + oGUIMainFrame.setTheme(1); } //Change to light theme if (e.getSource() == oLightTheme) { @@ -375,7 +377,7 @@ public class GUIMenuBar extends JMenuBar implements ActionListener { setTheme(aoLightTheme[0], aoLightTheme[1]); oGUITestFileTable.setTheme(0); oGUIRegisters.setTheme(0); - oGUIMainFrame.setBackground(aoLightTheme[1]); + oGUIMainFrame.setTheme(0); } //Microcontroller diff --git a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.java b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.java index 395e9d0..818743a 100644 --- a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.java +++ b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegisters.java @@ -14,11 +14,20 @@ public class GUIRegisters extends JPanel { /** * Color oWhite = new Color(255, 253, 250); * Color oDarkGray = new Color(76, 78, 82); + * Color oDarkGrayB = new Color(47, 47, 47); + * Color oLightBlue = new Color(173, 216, 230); + * Color oOrangeDM = new Color(255, 170, 0); + * Color oLightBlueDM = new Color(0, 213, 255); + * Color oOrangeDMB = new Color(255, 85, 0); * First Color == TextColor * Second Color == BackgroundColor + * Third Color == BorderColor + * Fourth Color == TextColor Marked + * Fifth Color == BackgroundColor Marked + * Sixth Color == BorderColor Marked */ - Color[] aoDarkTheme = {new Color(255, 253, 250), new Color(76, 78, 82)}; - Color[] aoLightTheme = {new Color(76, 78, 82), new Color(255, 253, 250)}; + Color[] aoDarkTheme = {new Color(255, 253, 250), new Color(76, 78, 82), new Color(47, 47, 47), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)}; + Color[] aoLightTheme = {new Color(76, 78, 82), new Color(255, 253, 250), new Color(173, 216, 230), new Color(0, 213, 255), new Color(255, 170, 0), new Color(255, 85, 0)}; ArrayList oTextfields = new ArrayList(); ArrayList oPanels = new ArrayList(); @@ -26,61 +35,55 @@ public class GUIRegisters extends JPanel { JPanel oLeftComponentPanel = new JPanel(); JPanel oRightComponentPanel = new JPanel(); - JTextField oTextSFR = new JTextField("SFR", 22); + int iTextFieldSize = 15; - JTextField oTextPCL = new JTextField("PCL", 22); - JTextField oTextPCLATH = new JTextField("PCLATH", 22); - JTextField oTextPCIntern = new JTextField("PC intern", 22); - JTextField oTextStatus = new JTextField("STATUS", 22); - JTextField oTextFileSelectionRegister = new JTextField("FileSelectionRegister", 22); - JTextField oTextOption = new JTextField("OPTION", 22); - JTextField oTextPrescaler = new JTextField("Prescaler", 22); - JTextField oTextTMR0 = new JTextField("TMR0", 22); + JTextField oTextSFR = new JTextField("SFR", iTextFieldSize); + + JTextField oTextPCL = new JTextField("PCL", iTextFieldSize); + JTextField oTextPCLATH = new JTextField("PCLATH", iTextFieldSize); + JTextField oTextPCIntern = new JTextField("PC intern", iTextFieldSize); + JTextField oTextStatus = new JTextField("STATUS", iTextFieldSize); + JTextField oTextFileSelectionRegister = new JTextField("FileSelectionRegister", iTextFieldSize); + JTextField oTextOption = new JTextField("OPTION", iTextFieldSize); + JTextField oTextPrescaler = new JTextField("Prescaler", iTextFieldSize); + JTextField oTextTMR0 = new JTextField("TMR0", iTextFieldSize); JTextField oValuePCL = new JTextField("00", 2); JTextField oValuePCLATH = new JTextField("00", 2); JTextField oValuePCIntern = new JTextField("00", 2); JTextField oValueStatus = new JTextField("00", 2); - JTextField oValueFileSearchRegister = new JTextField("00", 2); + JTextField oValueFileSelectionRegister = new JTextField("00", 2); JTextField oValueOption = new JTextField("00", 2); JTextField oValuePrescaler = new JTextField("00", 2); JTextField oValueTMR0 = new JTextField("00", 2); - JTextField oFillTextField1 = new JTextField("", 22); + JTextField oFillTextField1 = new JTextField("", iTextFieldSize); JTextField oFillValueField1 = new JTextField("", 2); - JTextField oFillTextField2 = new JTextField("", 22); + JTextField oFillTextField2 = new JTextField("", iTextFieldSize); JTextField oFillValueField2 = new JTextField("", 2); - JTextField oFillTextField3 = new JTextField("", 22); + JTextField oFillTextField3 = new JTextField("", iTextFieldSize); JTextField oFillValueField3 = new JTextField("", 2); JTextField oFillValueField4 = new JTextField("", 2); JTextField oFillValueField5 = new JTextField("", 2); - JTextField oTextW = new JTextField("W", 22); - - JTextField oTextWRegister = new JTextField("W-Register", 22); - + JTextField oTextW = new JTextField("W", iTextFieldSize); + JTextField oTextWRegister = new JTextField("W-Register", iTextFieldSize); JTextField oValueWRegister = new JTextField("00", 2); + /** + * Constructor of register-table-class, adds components to list, sets components uneditable, + * builds register-table and colors according to theme. + */ public GUIRegisters() { - //9 - /** - * [0] W-Register - * [1] PCL - * [2] PCLATH - * [3] PC intern - * [4] Status - * [5] FSR FileSelectionRegister - * [6] Option - * [7] Vorteiler - * [8] TMR0 - */ addComponentsToLists(); setEditFalse(); buildGUIRegisters(); setTheme(0); - this.setBorder(BorderFactory.createLineBorder(new Color(173, 216, 230))); } + /** + * Builds register-panel by actually setting the positions of the fields and adding them to the panels. + */ private void buildGUIRegisters() { GridBagConstraints oConstraints = new GridBagConstraints(); @@ -95,7 +98,7 @@ public class GUIRegisters extends JPanel { oConstraints.anchor = GridBagConstraints.WEST; oLeftComponentPanel.add(oTextSFR, oConstraints); oConstraints.gridx = 1; - oLeftComponentPanel.add(oFillValueField1); + oLeftComponentPanel.add(oFillValueField1, oConstraints); //Fill left side of left component panel oConstraints.gridx = 0; @@ -135,14 +138,16 @@ public class GUIRegisters extends JPanel { oRightComponentPanel.add(oTextTMR0, oConstraints); oConstraints.gridy = 5; oRightComponentPanel.add(oFillTextField2, oConstraints); + oConstraints.gridy = 6; + oRightComponentPanel.add(oFillTextField3, oConstraints); //Fill right side of right component panel oConstraints.gridx = 1; oConstraints.gridy = 0; oConstraints.anchor = GridBagConstraints.EAST; - oRightComponentPanel.add(oFillValueField1, oConstraints); + oRightComponentPanel.add(oFillValueField2, oConstraints); oConstraints.gridy = 1; - oRightComponentPanel.add(oValueFileSearchRegister, oConstraints); + oRightComponentPanel.add(oValueFileSelectionRegister, oConstraints); oConstraints.gridy = 2; oRightComponentPanel.add(oValueOption, oConstraints); oConstraints.gridy = 3; @@ -150,7 +155,9 @@ public class GUIRegisters extends JPanel { oConstraints.gridy = 4; oRightComponentPanel.add(oValueTMR0, oConstraints); oConstraints.gridy = 5; - oRightComponentPanel.add(oFillValueField2); + oRightComponentPanel.add(oFillValueField3, oConstraints); + oConstraints.gridy = 6; + oRightComponentPanel.add(oFillValueField4, oConstraints); //Fill footer of left component panel oConstraints.anchor = GridBagConstraints.WEST; @@ -159,8 +166,9 @@ public class GUIRegisters extends JPanel { oLeftComponentPanel.add(oTextW, oConstraints); oConstraints.anchor = GridBagConstraints.EAST; oConstraints.gridx = 1; - oLeftComponentPanel.add(oFillValueField2, oConstraints); + oLeftComponentPanel.add(oFillValueField5, oConstraints); oConstraints.gridx = 0; + oConstraints.gridy = 6; oLeftComponentPanel.add(oTextWRegister, oConstraints); oConstraints.anchor = GridBagConstraints.EAST; oConstraints.gridx = 1; @@ -171,6 +179,7 @@ public class GUIRegisters extends JPanel { oConstraints.gridx = 0; oConstraints.gridy = 0; this.add(oLeftComponentPanel, oConstraints); + oConstraints.gridx = 1; this.add(oRightComponentPanel, oConstraints); } @@ -189,24 +198,31 @@ public class GUIRegisters extends JPanel { oTextfields.add(oTextTMR0); oTextfields.add(oTextW); oTextfields.add(oTextWRegister); + oTextfields.add(oFillTextField1); + oTextfields.add(oFillTextField2); + oTextfields.add(oFillTextField3); oTextfields.add(oValuePCL); oTextfields.add(oValuePCLATH); oTextfields.add(oValuePCIntern); oTextfields.add(oValueStatus); - oTextfields.add(oValueFileSearchRegister); + oTextfields.add(oValueFileSelectionRegister); oTextfields.add(oValueOption); oTextfields.add(oValuePrescaler); oTextfields.add(oValueTMR0); oTextfields.add(oValueWRegister); + oTextfields.add(oFillValueField1); + oTextfields.add(oFillValueField2); + oTextfields.add(oFillValueField3); + oTextfields.add(oFillValueField4); + oTextfields.add(oFillValueField5); - oPanels.add(this); oPanels.add(oLeftComponentPanel); oPanels.add(oRightComponentPanel); } /** - * + * Set edit all textfields to false. */ private void setEditFalse() { for (JTextField oTextfield : oTextfields) { @@ -215,16 +231,28 @@ public class GUIRegisters extends JPanel { } /** - * + * Sets textfields of registervalues. * @param aiRegisters */ public void setRegisters(int[] aiRegisters) { - //TODO + oValuePCL.setText(aiRegisters[0] + ""); + oValuePCLATH.setText(aiRegisters[1] + ""); + oValuePCIntern.setText(aiRegisters[2] + ""); + oValueStatus.setText(aiRegisters[3] + ""); + oValueFileSelectionRegister.setText(aiRegisters[4] + ""); + oValueOption.setText(aiRegisters[5] + ""); + oValuePrescaler.setText(aiRegisters[6] + ""); + oValueTMR0.setText(aiRegisters[7] + ""); + oValueWRegister.setText(aiRegisters[8] + ""); } + /** + * Set theme of RegisterTable + * @param iThemeNr 0 == light theme, 1 == dark theme + */ public void setTheme(int iThemeNr) { switch (iThemeNr) { - case 0: { + case 0: { //light theme for (JPanel oPanel : oPanels) { oPanel.setForeground(aoLightTheme[0]); oPanel.setBackground(aoLightTheme[1]); @@ -233,12 +261,12 @@ public class GUIRegisters extends JPanel { for (JTextField oTextfield : oTextfields) { oTextfield.setForeground(aoLightTheme[0]); oTextfield.setBackground(aoLightTheme[1]); - oTextfield.setBorder(BorderFactory.createLineBorder(aoLightTheme[1])); + oTextfield.setBorder(BorderFactory.createLineBorder(aoLightTheme[2])); } + this.setBorder(BorderFactory.createLineBorder(aoLightTheme[2], 3)); }break; - case 1: { - System.out.println("Test"); + case 1: { //dark theme for (JPanel oPanel : oPanels) { oPanel.setForeground(aoDarkTheme[0]); oPanel.setBackground(aoDarkTheme[1]); @@ -247,8 +275,9 @@ public class GUIRegisters extends JPanel { for (JTextField oTextfield : oTextfields) { oTextfield.setForeground(aoDarkTheme[0]); oTextfield.setBackground(aoDarkTheme[1]); - oTextfield.setBorder(BorderFactory.createLineBorder(aoDarkTheme[1])); + oTextfield.setBorder(BorderFactory.createLineBorder(aoDarkTheme[2])); } + this.setBorder(BorderFactory.createLineBorder(aoDarkTheme[2], 3)); }break; } } diff --git a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.java b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.java new file mode 100644 index 0000000..83894a3 --- /dev/null +++ b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUIRegistersDetailed.java @@ -0,0 +1,103 @@ +package Frontend.PIC_SIMULATOR_GUI_JAVA; + +import javax.swing.BorderFactory; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTable; + +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Color; + +public class GUIRegistersDetailed extends JPanel { + + JTable oStatusTable; + JTable oOptionTable = new JTable(); + JTable oIntconTable = new JTable(); + + JPanel oStatusPanel = new JPanel(); + JPanel oOptionPanel = new JPanel(); + JPanel oIntconPanel = new JPanel(); + + JLabel oStatusLabel = new JLabel("STATUS"); + JLabel oOptionLabel = new JLabel("OPTION"); + JLabel oIntconLabel = new JLabel("INTCON"); + + public GUIRegistersDetailed() { + buildGUIRegistersDetailed(); + } + + private void buildGUIRegistersDetailed() { + this.setLayout(new GridBagLayout()); + + oStatusPanel.setLayout(new GridBagLayout()); + oOptionPanel.setLayout(new GridBagLayout()); + oIntconPanel.setLayout(new GridBagLayout()); + + String[][] asDataStatus = {{"IRP", "RP1", "RP0", "TO", "PD", "Z", "DC", "C"}, {"0", "0", "0", "0", "0", "0", "0", "0"}}; + String[] asHeadersStatus = {"0", "1", "2", "3", "4", "5", "6", "7"}; + oStatusTable = new JTable(asDataStatus, asHeadersStatus); + oStatusTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + + GridBagConstraints oConstraintsStatus = new GridBagConstraints(); + oConstraintsStatus.anchor = GridBagConstraints.WEST; + oConstraintsStatus.gridx = 0; + oConstraintsStatus.gridy = 0; + oStatusPanel.add(oStatusLabel, oConstraintsStatus); + oConstraintsStatus.gridy = 1; + oStatusPanel.add(oStatusTable, oConstraintsStatus); + + for (int i = 0; i < 8; i++) { + oStatusTable.getColumn(i + "").setMaxWidth(50); + } + oStatusTable.setEnabled(false); + + String[][] asDataOption = {{"RBPU", "INTEDG", "T0CS", "T0SE", "PSA", "PS2", "PS1", "PS0"}, {"0", "0", "0", "0", "0", "0", "0", "0"}}; + String[] asHeadersOption = {"0", "1", "2", "3", "4", "5", "6", "7"}; + oOptionTable = new JTable(asDataOption, asHeadersOption); + oOptionTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + + GridBagConstraints oConstraintsOption = new GridBagConstraints(); + oConstraintsOption.anchor = GridBagConstraints.WEST; + oConstraintsOption.gridx = 0; + oConstraintsOption.gridy = 0; + oOptionPanel.add(oOptionLabel, oConstraintsOption); + oConstraintsOption.gridy = 1; + oOptionPanel.add(oOptionTable, oConstraintsOption); + + for (int i = 0; i < 8; i++) { + oOptionTable.getColumn(i + "").setMaxWidth(50); + } + oOptionTable.setEnabled(false); + + String[][] asDataIntcon = {{"GIE", "EEIE", "T0IE", "INTE", "RBIE", "T0IF", "INTF", "RBIF"}, {"0", "0", "0", "0", "0", "0", "0", "0"}}; + String[] asHeadersIntcon = {"0", "1", "2", "3", "4", "5", "6", "7"}; + oIntconTable = new JTable(asDataIntcon, asHeadersIntcon); + oIntconTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); + + GridBagConstraints oConstraintsIntcon = new GridBagConstraints(); + oConstraintsIntcon.anchor = GridBagConstraints.WEST; + oConstraintsIntcon.gridx = 0; + oConstraintsIntcon.gridy = 0; + oIntconPanel.add(oIntconLabel, oConstraintsIntcon); + oConstraintsIntcon.gridy = 1; + oIntconPanel.add(oIntconTable, oConstraintsIntcon); + + for (int i = 0; i < 8; i++) { + oIntconTable.getColumn(i + "").setMaxWidth(50); + } + oIntconTable.setEnabled(false); + + GridBagConstraints oConstraints = new GridBagConstraints(); + oConstraints.anchor = GridBagConstraints.WEST; + oConstraints.gridx = 0; + oConstraints.gridy = 0; + this.add(oStatusPanel, oConstraints); + oConstraints.gridy = 1; + this.add(oOptionPanel, oConstraints); + oConstraints.gridy = 2; + this.add(oIntconPanel, oConstraints); + + this.setBorder(BorderFactory.createLineBorder(Color.BLACK)); + } +} \ No newline at end of file diff --git a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.java b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.java index 525e88e..02bfa0f 100644 --- a/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.java +++ b/src/Frontend/PIC_SIMULATOR_GUI_JAVA/GUITestFileTable.java @@ -46,13 +46,13 @@ public class GUITestFileTable extends JScrollPane { */ public GUITestFileTable() { oTable = new JPanel(); - oPanels.add(oTable); + + JPanel oTestPanel = new JPanel(); + JTextField oFill = new JTextField("0"); oLineInformation.add(oFill); oFill.setEditable(false); - JPanel oTestPanel = new JPanel(); - oPanels.add(oTestPanel); oTestPanel.setLayout(new GridLayout(1, 3)); oTestPanel.add(oFill); @@ -170,19 +170,19 @@ public class GUITestFileTable extends JScrollPane { public void setTheme(int iThemeNr) { iTheme = iThemeNr; - for (int i = 0; i < oLineInformation.size(); i++) { - oLineInformation.get(i).setForeground(getThemeColor()[0]); - oLineInformation.get(i).setBackground(getThemeColor()[1]); - oLineInformation.get(i).setBorder(BorderFactory.createLineBorder(getThemeColor()[2])); + for (JTextField oTextfield : oLineInformation) { + oTextfield.setForeground(getThemeColor()[0]); + oTextfield.setBackground(getThemeColor()[1]); + oTextfield.setBorder(BorderFactory.createLineBorder(getThemeColor()[2])); } - for (int i = 0; i < oCheckboxes.size(); i++) { - oCheckboxes.get(i).setForeground(getThemeColor()[0]); - oCheckboxes.get(i).setBackground(getThemeColor()[1]); - oCheckboxes.get(i).setBorder(BorderFactory.createLineBorder(getThemeColor()[2])); + for (JCheckBox oCheckbox : oCheckboxes) { + oCheckbox.setForeground(getThemeColor()[0]); + oCheckbox.setBackground(getThemeColor()[1]); + oCheckbox.setBorder(BorderFactory.createLineBorder(getThemeColor()[2])); } - for (int i = 0; i < oPanels.size(); i++) { - oPanels.get(i).setForeground(getThemeColor()[0]); - oPanels.get(i).setBackground(getThemeColor()[1]); + for (JPanel oPanel : oPanels) { + oPanel.setForeground(getThemeColor()[0]); + oPanel.setBackground(getThemeColor()[1]); } oTable.setForeground(getThemeColor()[0]);