Giter VIP home page Giter VIP logo

cirsim's Introduction

Cirsim Circuit Simulator

Cirsim 2 is under development as an independent system for release to general users.

Cirsim is a Circuit Simulator with drag and drop capabilities that is designed to support courses in introductory computer architecture. Cirsim can be used full-screen in a browser, in a window within a browser, and can be used to present live, operational circuits anywhere on a page, as shown in the example to the right.

Cirsim has a wide range of components from simple combinatory circuits to processor building blocks such as memory, program counters, and ALU's. Connections can represent both single-bit wires and multi-bit busses. It is possible to build and operator a small processor using Cirsim.

Cirsim has extensive facilities to support educational usage, including automatic testing of circuits and the ability to control component availability.

Cirsim has been used at Michigan State University since 2016 in CSE320 Computer Organization and Architecture.

Install

CDN

<script src="https://unpkg.com/cirsim/dist/cirsim.js"></script>
<!-- or -->
<script src="https://unpkg.com/cirsim/dist/cirsim.min.js"></script>

Package managers

npm: npm install cirsim --save

Initialize

Please keep in mind that Cirsim is currently under development. I'm hoping to have a release soon and there will be a full documentation web site, but if you just want to play with it, the most basic way to get Cirsim up and running would be this:

<!doctype html>
<html lang="en-US">
<head>
  <title>Cirsim Circuit Simulator</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta charset="UTF-8">
  <script src="https://unpkg.com/cirsim/dist/cirsim.min.js"></script>
</head>
<body>
<div id="cirsim"></div>
<script>
    var cirsim = new Cirsim('#cirsim', {
        display: 'window',
        components: 'all'
    });
    cirsim.start();
</script>
</body>
</html>

Note that this will only worked if served from a server. Attempts to run Cirsim from a local HTML file will throw cross-site scripting errors in your browser.

A version of this page is currently available online.

Options

Pending...

Building

You must install node.js to build Cirsim. To build Cirsim locally, after downloading, do:

npm install

To build a development build (not optimized):

npm run build:dev

To build a production build (optimized):

npm run build:prod

To build both:

npm run build:all

To run in the webpack development server:

npm run serve

When running as a server, the URL is http://cirsim.localhost:8080. That version will have all available components (other than deprecated components). Othere valid URLs are http://cirsim.localhost:8080/inline.html, which demonstates using Cirsim as an inline demonstrator, and http://cirsim.localhost:8080/full.html, which demonstrates Cirsim running full screen.

To run tests:

npm test

To build the documentation in the doc folder:

npm run build:docs

License

Copyright 2016-2019 Michigan State University

Cirsim is released under the MIT license.


Written and maintained by Charles B. Owen

cirsim's People

Contributors

cbowen4 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.