Giter VIP home page Giter VIP logo

p4's Introduction

P4 - Pequeno Processador Pedagógico com Pipeline

This is the source code for the Assembler and Simulator for the P4 educational CPU.

You can see the online version here: https://dinismadeira.github.io/p4/

Running the Assembler and Simulator for the P4 educational CPU

On the web browser:

  • Open the index.html file on a web browser.

As an NW.js application:

  • Install NW.js.
  • Put the source code inside a package.nw folder.
  • Run the nw executable.

On a HTTP server:

  • Put the source code in a directory served by your HTTP server.
  • Open the URL for your HTTP server on a web browser.

There's a Minified Web Version Creation Tool in Node.js that allows you to create a minified web version that will load faster.

In order to create a minified version run node web.js. A web folder containing the minified version will be created.

Command Line Assembler for P4

You can create a .p4z zip file with the program and data memory initialization files for P4 from assembly source files using the Command Line Assembler for P4 in Node.js.

Assemble a P4 program:

  • Install packages: npm install
  • Assemble: node p4as.js INPUT_FILE.as

Where INPUT_FILE.as is the name of the P4 assembly source file.

You can set a custom output file by appending the option: -o OUTPUT_FILE where OUTPUT_FILE is the output file.

To show references append the option --show-refs.

Build NW.js executables:

You can create NW.js executables for several operating systems using the nwjs-builder-phoenix Node.js module.

  • Install packages: npm install
  • Create executables: ./node_modules/.bin/build --tasks win-x64,mac-x64,linux-x64,linux-x86,win-x86.

p4's People

Contributors

dinismadeira avatar

Watchers

 avatar

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.