diff --git a/How to set up Eclipse to develop the LEGv8 simulator/How to set up Eclipse to develop the LEGv8 simulator.pdf b/How to set up Eclipse to develop the LEGv8 simulator/How to set up Eclipse to develop the LEGv8 simulator.pdf new file mode 100644 index 0000000..ddab1b6 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/How to set up Eclipse to develop the LEGv8 simulator.pdf differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/HowtosetupEclipsetodeveloptheLEGv8simulator.html b/How to set up Eclipse to develop the LEGv8 simulator/HowtosetupEclipsetodeveloptheLEGv8simulator.html new file mode 100644 index 0000000..db4430f --- /dev/null +++ b/How to set up Eclipse to develop the LEGv8 simulator/HowtosetupEclipsetodeveloptheLEGv8simulator.html @@ -0,0 +1 @@ +
  1. Download, install and run Eclipse [ https://www.eclipse.org/downloads/ ]







    Select your preferred directory as workspace. This will be the directory containing the project so remember its name.

  2. Create a resources folder to put all the important files in. I will call it “LEGv8 Simulator Resources”

  3. Download a Java 8 JDK  ( not JRE! ) of your choice. I recommend Amazon Corretto 8 for licensing and compatibility reasons [ https://aws.amazon.com/corretto ]


    Extract the .zip file and move the extracted folder in the
    resources folder.

  4. Tell Eclipse to use this JDK instead of the default one. Go to Window → Preferences

    Java –> Installed JREs → Add..

    Press Next

    Click on Directory… and select the one containing your JDK, in this case the folder amazon-corretto-8.392.08.1-windows-x64-jdk/jdk1.8.0_392 inside the resources folder


    The libraries list will now be populated and you can press Finish

    Select your JDK and press Apply and Close

  5. Navigate to Help → Eclipse Marketplace…

    Search for “gwt” and press “Install” for the “GWT Plugin”

    Accept the terms of the License Agreement and wait while Eclipse installs the plug-in ( you can see the progress on the bottom right progress bar ). Select all the authorities and press Trust Selected

    After this, keep waiting and then you will be asked to do the same thing one more time.
    When the installation finishes press Restart Now.

  6. Clone the github project or download and extract the zip file in your resource folder.
    [
    https://github.com/arm-university/Graphical-Micro-Architecture-Simulator ]

  7. In Eclipse go to File –> Open Projects from File System…

    Click on Directory… and select the folder containing the project you downloaded from GitHub

    Unselect the first folder and press Finish

    Eclipse will show you this dialog multiple times, ignore it every time or click the Project Natures preferences and disable the automatic warnings.

  8. Download GWT SDK version 2.7 (this is what the project uses) and extract it in your resources folder [ https://www.gwtproject.org/versions.html ]

    Right click on the project’s folder inside Eclipse and navigate to  Build Path –> Configure Build Path

    Go to the Libraries section and select Add Library

    Select GWT and press Next

    Click Configure SDK

    Press Add…

    Click Browse… and select the folder gwt-2.7.0/gwt-2.7.0 and press Ok

    Press Apply and Close

    Press Finish

    Select the missing GWT SDK and press Remove

    Go to the Projects section, select AceGWT and Remove it

    Go to the Source section, select the test source and Remove it. Then Apply and Close

  9. Download the following two files and put them in the resources folder.
    [
    http://gwtproject.org/doctype/2.7.0/gwt-module.dtd ],
    [
    http://gwtproject.org/doctype/2.8.2/gwt-module.dtd ]
    Name the first one ProjectDTD.dtd and the second one AceDTD.dtd

  10. Eclipse by default doesn’t allow importing files from the internet. If you can enable it then you can skip this point but I still suggest you use the offline files, especially as the project becomes older.
    Go to the file in the picture and substitute the URL of the Doctype with the absolute path of ProjectDTD.dtd and save the file


    Save the file.

  11. Download and extract the release of AceGWT version 1.0.0 and put it into your resources folder
    [
    https://github.com/daveho/AceGWT/releases ]

    Right click on the src package of your project’s folder inside Eclipse and select Import…

    Select General → File System and press Next

    Press Browse… and select the folder src/ from AceGWT

    Check the src/ folder and Finish

    Navigate to AceGWT.gwt.xml and click on the “Bind to grammar/schema … “ text

    Paste the path of the AceDTD.dtd file into the textbox (if you click “Browse…” it will only let you choose files from the project’s folder. If you put the AceDTD.dtd file in an external folder like we did you won’t be able to add it from there)

    Do not worry if it says it doesn’t exist, once you press Ok it will automatically add it

    Save the file.

  12. Now to compile the project we just need to right click on the project –> GWT –> Compile

    For ease of debugging we use Log Level: All, Output style: Detailed . Click Apply and then Compile

    We also have to let the program use the network since it uses a web interface

  13. The LEGv8 Simulator is a self-contained ( portable ) application. In order to test/run the simulator you just need to go to the war/ folder and open the LEGv8_Simulator.html file. If you want to distribute it to other people or put it somewhere else on your computer you just need to copy the war/ folder wherever you want ( and maybe rename it with a name of your choosing ) .

POSSIBLE IMPROVEMENTS:

\ No newline at end of file diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image1.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image1.png new file mode 100644 index 0000000..5a893fa Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image1.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image10.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image10.png new file mode 100644 index 0000000..f0e9343 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image10.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image11.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image11.png new file mode 100644 index 0000000..5e6fee2 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image11.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image12.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image12.png new file mode 100644 index 0000000..b188247 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image12.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image13.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image13.png new file mode 100644 index 0000000..21d7430 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image13.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image14.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image14.png new file mode 100644 index 0000000..ae3c170 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image14.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image15.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image15.png new file mode 100644 index 0000000..55b1bcb Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image15.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image16.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image16.png new file mode 100644 index 0000000..9fa4ba6 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image16.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image17.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image17.png new file mode 100644 index 0000000..2bb077a Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image17.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image18.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image18.png new file mode 100644 index 0000000..97463c0 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image18.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image19.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image19.png new file mode 100644 index 0000000..a2425d3 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image19.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image2.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image2.png new file mode 100644 index 0000000..f922156 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image2.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image20.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image20.png new file mode 100644 index 0000000..6c9e509 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image20.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image21.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image21.png new file mode 100644 index 0000000..347e1b4 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image21.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image22.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image22.png new file mode 100644 index 0000000..c2cbc05 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image22.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image23.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image23.png new file mode 100644 index 0000000..a3c882c Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image23.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image24.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image24.png new file mode 100644 index 0000000..7402e3f Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image24.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image25.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image25.png new file mode 100644 index 0000000..ef45658 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image25.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image26.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image26.png new file mode 100644 index 0000000..ecbdeb0 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image26.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image27.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image27.png new file mode 100644 index 0000000..535e2c6 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image27.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image28.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image28.png new file mode 100644 index 0000000..840e778 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image28.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image29.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image29.png new file mode 100644 index 0000000..f50b99e Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image29.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image3.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image3.png new file mode 100644 index 0000000..6a7bec5 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image3.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image30.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image30.png new file mode 100644 index 0000000..be28078 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image30.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image31.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image31.png new file mode 100644 index 0000000..5a447ad Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image31.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image32.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image32.png new file mode 100644 index 0000000..82f4739 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image32.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image33.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image33.png new file mode 100644 index 0000000..e87ecb4 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image33.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image34.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image34.png new file mode 100644 index 0000000..ebb8cce Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image34.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image35.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image35.png new file mode 100644 index 0000000..7a042c2 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image35.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image36.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image36.png new file mode 100644 index 0000000..7ec8d98 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image36.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image37.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image37.png new file mode 100644 index 0000000..c67a939 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image37.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image38.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image38.png new file mode 100644 index 0000000..945e0f0 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image38.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image39.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image39.png new file mode 100644 index 0000000..6bc2fbe Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image39.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image4.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image4.png new file mode 100644 index 0000000..27906cb Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image4.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image40.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image40.png new file mode 100644 index 0000000..906d2a3 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image40.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image41.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image41.png new file mode 100644 index 0000000..8fe5374 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image41.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image42.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image42.png new file mode 100644 index 0000000..0c86959 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image42.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image43.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image43.png new file mode 100644 index 0000000..81391d2 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image43.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image44.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image44.png new file mode 100644 index 0000000..df9bf5a Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image44.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image45.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image45.png new file mode 100644 index 0000000..5864ca0 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image45.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image46.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image46.png new file mode 100644 index 0000000..68e34ce Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image46.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image47.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image47.png new file mode 100644 index 0000000..c3e17fe Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image47.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image48.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image48.png new file mode 100644 index 0000000..f3564d0 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image48.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image49.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image49.png new file mode 100644 index 0000000..1c20199 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image49.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image5.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image5.png new file mode 100644 index 0000000..a9a243d Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image5.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image50.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image50.png new file mode 100644 index 0000000..aae244e Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image50.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image6.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image6.png new file mode 100644 index 0000000..1fa39d4 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image6.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image7.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image7.png new file mode 100644 index 0000000..063fb28 Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image7.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image8.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image8.png new file mode 100644 index 0000000..afeaa7e Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image8.png differ diff --git a/How to set up Eclipse to develop the LEGv8 simulator/images/image9.png b/How to set up Eclipse to develop the LEGv8 simulator/images/image9.png new file mode 100644 index 0000000..d6b66da Binary files /dev/null and b/How to set up Eclipse to develop the LEGv8 simulator/images/image9.png differ diff --git a/LEGv8_Simulator/src/com/arm/legv8simulator/client/cpu/CPU.java b/LEGv8_Simulator/src/com/arm/legv8simulator/client/cpu/CPU.java index 003213c..a9eda3f 100644 --- a/LEGv8_Simulator/src/com/arm/legv8simulator/client/cpu/CPU.java +++ b/LEGv8_Simulator/src/com/arm/legv8simulator/client/cpu/CPU.java @@ -239,7 +239,7 @@ private void ADDSetFlags(long result, long op1, long op2) { } private void SUBSetFlags(long result, long op1, long op2) { - ADDSetFlags(result, op1, op2); + ADDSetFlags(result, op1, (~(op2)+1)); } private void ANDSetFlags(long result) { @@ -801,7 +801,7 @@ private void BGE(int branchIndex) { } private void BLT(int branchIndex) { - if (Cflag != Vflag) { + if (Nflag != Vflag) { instructionIndex = branchIndex; } cpuLog.append("B.LT \t" + "0x" + Long.toHexString(getPC()) + " \n"); @@ -874,8 +874,8 @@ private void BR(int branchReg, Memory memory) throws SegmentFaultException, PCAl } private void BL(int branchIndex) { - instructionIndex = branchIndex; registerFile[LR] = instructionIndex * INSTRUCTION_SIZE + Memory.TEXT_SEGMENT_OFFSET; + instructionIndex = branchIndex; cpuLog.append("BL \t" + "0x" + Long.toHexString(registerFile[LR]) + " \n"); }