Giter Club home page Giter Club logo

logisim's Introduction

README

Logisim is a circuit simulator, originally available here.

Why this fork of Logisim?

Carl Burch, the original author of Logisim, abandoned development in 2011 and moved on to a similar successor project, Toves in 2013, because Logisim's code base is in need of a major overhaul. Rather than start from scratch (something you should never do), this fork of Logisim picks up where Dr. Burch left off to incrementally improve Logisim.

What's wrong with Logisim?

Logisim's code itself has numerous smells. Here's an incomplete list of these:

  • No test suite!
  • Undocumented packages, classes, methods
  • Duplicated and dead code
  • No coherent organization (it should be MVC)
  • High coupling, low cohesion (it would benefit from IoC)
  • Unnecessarily reimplements functionality found in standard or third party libraries (e.g., it has it's own Toolbar classes)
  • Code to draw components is too low-level

Logisim's user interface has numerous gotchas that need to be addressed. Here's some of the more important issues:

  • The file format is not merge-friendly, making it impossible for students to collaborate on circuits
  • Unreasonable defaults
  • Limited interaction styles
  • Single (graphical) view of circuit

What's right with Logisim?

It is arguably the best free/libre and gratis tool for teaching circuit design. That is why its development must continue.

Newest GitHub build

If you just want to test the newest developer version to report issues or for new features, download it here. Build Status Download

Getting started for developers

The build script recognizes the following commands:

./gradlew build     # Build application jar
./gradlew eclipse   # Build Eclipse configuration
./gradlew createExe # Build logisim executable
./gradlew run       # Run logisim from gradle
./gradlew sonar     # Examine problems using Sonar

To build the executable for Windows, you must install launch4j and ensure it is in the system path or you could install launch4j just into the root of the project (build process will find it and it will be ignore by git).

To examine problems with Sonar, you need to download SonarQube (the server) first into a folder without spaces in it. Then, run SonarQube for your platform and run gradlew sonar and go to Sonar's page. See the status of what everybody's working on using the Logisim Trello Board.

logisim's People

Contributors

allevaton avatar carlburch avatar drew-buckley avatar jeremyfix avatar lilovip avatar mechtecs avatar mikespallino avatar nickbaldassare avatar prochat avatar steinmetzr 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logisim's Issues

Pinch to zoom

It'd be sweet to have that. First step: research java multitouch apis/libraries.

Error reporting

Logisim cannot handle multiple errors in a circuit well. It should show a list of errors akin to Eclipse’s error view, with diagnostics (e.g., input/output pin confused).

Multiple views as default

Currently, Logisim sports a combinational analysis user interface. This should be incorporated directly in the editor for Logisim. Draw a schematic, and you should see its equivalent truth/function table, logic expression, state machine, venn diagram, 7400 breadboard layout, mux configuration, transistor layout, fpga layout, vhdl/verilog source, karnaugh map, etc. Each view should be editable and synchronize with the other views.

Web site

Logisim ships with its website, and includes site generation scripts for it. I don't want to maintain site generation scripts. So, let's use Jekyll to be the web site generator instead; that way, we can copy the web site to the gh-pages branch and get web hosting for this project for free.

Import/Export to Verilog/VHDL

Logisim cannot play nicely with other formats for describing circuits. It should support exporting and importing Verilog or VHDL code, using comments to annotate placement of components.

There's already some code for exporting to Verilog. It'd be good to see if this still works, and if so, try it out with Icarus Verilog.

For VHDL, there's GHDL

Migrate to Scala

Scala is a java compatible language, but with functional goodness.

Android port

I'd be nice to have a version that works on android devices.

Venn diagram

It'd be nice to have a venn diagram view in combinational analysis.

Diff/Merge view for collaboration

Show a diff/merge view for working on circuits with multiple contributors. This would allow students to work together on a circuit in version control, if it's configured as a mergetool for logisim files.

CAD-style selection boxes

Dragging a box to the right would include only the objects/wires that are completely selected, and dragging a box to the left would include anything that is partially within the bounds of the box.

Test suite

Logisim has no test suite. It needs a test suite to provide sufficient coverage to serve as a safety net for regressions. Let’s use Approval Tests to generate a characterization test for Logisim before we refactor.

Audio component (Speaker)

It'd be nice to have a component that can output audio for the user to hear (a speaker as an output component).

right click to use selection tool

If you have a gate selected and decide not to place it, right clicking should change your tool to the selection tool, especially if you have the "keep at component tool" option selected under layout.

Refactor UI elements

com.cburch.draw.toolbar implements it's own toolkit. Let's just use Swing toolbars instead.

New Issue

Jan 13, 2014 3:24:26 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

got this issue when I ran it, it ran but yeah......

Drag and drop gates into canvas.

Click and drag gates as interaction style (in addition to existing style of select component and click). Be able to drag from the palette and release to desired spot in addition to current behavior.

move zoom buttons to toolbar

move the zoom in and out buttons from the bottom left to the toolbar with the rest of the commonly used buttons.

Visio-style connectors

It'd be nice if we can just click on a source and target port on components to connect wires between them. (Rather than having to draw).

Truth table in Combinational analysis

It'd be nice if we didn't have input/output as separate tabs. Instead, start with a table that looks like a spreadsheet. You'd be able to name the columns, and slide a vertical bar around so Logisim knows which columns are input, and which are output. You should also be able to drag columns around to reorder them.

Truth table multiple bit variables

It'd be nice to have a way use a variable name with multiple bits in it. (E.g., a3, a2, a1, a0 as the four bits of a). The view of a truth table could then switch between binary, octal or hex.

Refactor into MVC

Reorganize packages (and classes) around the model, view, and controller design pattern. The code is too convoluted to work with (hence the need for characterization testing).

The model should stay the same, and should be able to be tested independently of view/controllers for other modalities (e.g., swing, command line, web, and android).

MRJAdapter

Do we need MRJAdapter? Is it really necessary on the Mac anymore? Try it out. Test removal of MRJAdapter on Mac OS X. If it's not necessary, remove it from the lib folder and the build script.

File format

Logisim's file format (and code to handle it) sucks.

The format seems to represent the layout of toolbars on the screen in addition to the circuit. The toolbar layout does not belong in the file (although any libraries it references obviously should be part of the format).

The format as currently implemented exclusively focuses on the layout of components. As in, we can't know if two components are connected to each other without laying out every component and wire first. While layout is important, the logical connection among components is necessary to save in the file, because otherwise there's no way to merge changes among collaborators on a circuit. Each component deserves an identifier and every port on a component deserves an identifier, that way wires connecting components can be clearly identified semantically and then layout is a separate concern.

Using SVG as the layout format with a custom xml vocabulary for describing component connectivity would be ideal, as we could save the layout and only worry about changes to connectivity during merges. XStream would be a much better option. Ideally, the format could be merged with existing merge tools.

Mac OS X build

The gradle build script doesn't make a Mac OS X app. Carl Burch's ad hoc build script did. Port the build script to work with gradle.

Drill down into primitives

View the contents of primitives as subcircuits (e.g., look inside multiplexer to see logic schematic, look inside a gate to see its implementation as transistors, etc.)

Refactor graphics

om.cburch.draw.canvas.Canvas and related classes deal with zoomable interfaces, which isn't something we should implement ourselves. Piccolo2D provides a nice framework for doing this for us instead.

SVG graphics

Logisim should use scalable vector graphics to draw shapes, rather than hardcode shapes in Java as is currently done through low-level graphics commands that are impossible to understand from reading the code.

Use Batik instead. Logisim ships with it's own half-hearted reader for SVG: com.cburch.draw.shapes.SvgReader, com.cburch.draw.shapes.SvgCreator. That should go away.

Any calls to draw gates should be revised to a preloaded SVG shape from memory (using flyweights, obviously).

With SVG support from Batik, we can get PDF generation for free, so logisim.gui.main.print shouldn’t be as necessary anymore.

About Credits

com.cburch.logisim.gui.start.AboutCredits: why is this even a dedicated class? Just load an SVG or text file from resources and call it a day.

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.