Git Product home page Git Product logo

graphical-micro-architecture-simulator's Introduction

Graphical-Micro-Architecture-Simulator

Welcome to our Graphical-Micro-Architecture-Simulator (BETA version)!

The Graphical Micro-Architecture Simulator is a web browser-based simulator for a subset of the Arm instructions. Specifically, this tool provides the expected execution results for the LEGv8 instructions, which is a subset of Arm®v8-A instructions based on the Computer Organization and Design (Arm Edition) textbook by David A. Patterson & John L. Hennessy. This simulator can be run locally on a PC, and is offered exclusively and at no cost to academics, teaching staff, and learners worldwide.

Note: This tool is currently a BETA version.

Kit features

  • Cross-platform, no installation required.
  • Contains a code editor, with a visible and interactive register file.
  • Shows visual datapaths similar to those in the Computer Organization and Design (Arm Edition) textbook by David A. Patterson & John L. Hennessy.
  • Execution mode:
    • Has ability to step through execution of instructions.
    • Provides expected results (register contents, flags).
    • Contains single-cycle CPU and pipelined CPU view.
    • Highlights datapaths of the CPU that uses a specific instruction.
  • Documentation provided.
  • Prerequisites: Basics of assembly programming.

Purpose of the Simulator

To produce learners who can program using Arm instructions and describe the corresponding datapaths involved in a single-cycle or a pipelined CPU. The simulator also provides error messages/feedback for learning purposes.

A fundamental understanding of an Instruction Set Architecture (ISA) is a crucial skill for all aspiring hardware designers and developers. The ISA acts as the interface between hardware and software, specifying what the instruction set can do and how the processor makes use of those instructions - helping developers write more efficient code.

Sometimes, however, students stuggle to understand how the ISA executes complex commands, for instance for the CPU, databus, memory and I/O. This simulator simplifies this interaction by allowing students to visualize the instruction execution, establishing a clear link between the inner architecture of a microprocessor and the instructions required to efficiently execute commands on the hardware.

This tool is currently a BETA version. If there are any issues, please read the Reporting Bugs section in here.

How to Use

Either clone this repository or download the simulator here.

  1. Navigate to /LEGv8_Simulator/war directory and open LEGv8_Simulator using a web browser.
  2. Click the Help tab on the top right of the simulator, which contains further documentation on usage.

Modifications and Contributions

We welcome any bug fixes, modifications, and contributions to this tool. For more information, please click here.

License

You are free to fork or clone this material. See LICENSE.md for the complete license.

Inclusive Language Commitment

Arm is committed to making the language we use inclusive, meaningful, and respectful. Our goal is to remove and replace non-inclusive language from our vocabulary to reflect our values and represent our global ecosystem.

Arm is working actively with our partners, standards bodies, and the wider ecosystem to adopt a consistent approach to the use of inclusive language and to eradicate and replace offensive terms. We recognise that this will take time. This tool may contain references to non-inclusive language; it will be updated with newer terms as those terms are agreed and ratified with the wider community. We recognise that some of you will be accustomed to using the previous terms and may not immediately recognise their replacements. We encourage the use of the following terminology where applicable:

  • When introducing the architecture, we will use the term ‘Requester’ instead of ‘Master’ and ‘Completer’ instead of ‘Slave’.

Contact us at [email protected] with questions or comments about this tool. You can also report non-inclusive and offensive terminology usage in Arm content at [email protected].

graphical-micro-architecture-simulator's People

Contributors

franciscatan-armedu avatar lizwar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graphical-micro-architecture-simulator's Issues

Problems with C & V flags when using the SUBS instruction

Hi,
I have encountered issues that arise from the setting of the C and V flags when trying to use conditional branches (B.HI and B.LE)

The sequence
movz x1, #36
movz x2, #54
subs x5, x1, x2
b.LE lse
does not work properly. The V flag is set but 36-54 = -18 is not a signed overflow.

The sequence
movz x1, #54
movz x2, #36
subx x5, x1, x2
b.GT gtr
does not work properly as 54-36=18 does not set the carry bit as it should.

In the setVflag(long result, long op1, long op2) {
replacing

with
Vflag = (((long) op1 & 0x80000000L) == ((long) op2 & 0x80000000L)) && ((long) result != (long)op1;
may work but I don't have the experience with GWT projects to rebuild.

I haven't had a chance to figure the issue with setting the C flag in the other scenario.

Thanks,
Dave

wrong value of MemWrite signal?

I assembled and executed a program with the lone instruction
STUR X1, [X2, #20]

In the graphical output, the MemRead signal is 1 and the MemWrite is 0. Shouldn't MemWrite be 1 here?

MOVZ & MOVK

717 registerFile[destReg] = immediate << quadrantShift;
726 registerFile[destReg] = registerFile[destReg] | (immediate << quadrantShift);

These two lines of code have immediate as int types. This causes issues with the results of MOVK and MOVZ. Some of the observed issues:

MOVZ X1, 0x8000, LSL #16 will result in X1 having a value of 0xffffffff80000000, this is a sign extended result where sign extension should not happen.

MOVZ X1, 0x8000, LSL #32 will result in X1 having a value of 0x8000.

MOVZ X1, 0x8000, LSL #48 will result in X1 having a value of 0xffffffff80000000, this is wrong in sign and distance.

I can not suggest a fix as I do not have a Java build environment handy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.