#41 Locked subcircuit / blackbox component


Howdy, I'm a teaching assistant for a course that uses logisim extensively. I'd love to have the ability to create a component/library that is a black box for illustration purposes during labs.

The idea being that I create a circuit that performs function X with predefined inputs i1,i2,i3 ... and outputs o1,o2. Students could then play with this custom component to see how it behaves to various inputs. I'd like to be able to prevent them (temporarily) from seeing the internals of this component while they build their own designs, and perhaps later allow them to unlock the component and view the reference design. (Perhaps some sort of simple password based lock?)

I realize that this could potentially be done by writing actual JAVA code and creating a component, but if I could create it directly in Logisim and be able to selectively lock/unlock the component details - that would be great since it allows me to reuse existing designs.

Thanks for considering this!


  • Ilia Lilov

    Ilia Lilov - 2010-09-22

    I'm sure you would like to read this related forum thread: https://sourceforge.net/projects/circuit/forums/forum/479543/topic/3837589

    What do you want to have:
    1)"Students should not to have so easy way to see internal layout of my circuit"
    2) "Students have to be forbidden to see internal layout of my circuit" ?

    In case 1, try to say them "Guys, please, don't. I trust you."
    In case 2, Carl have to invent any other way to store circuit layout instead of XML, otherwise students can to "copy and paste" XML code of your circuit into new empty project even if there will some kind of password.

  • sunmohan

    sunmohan - 2010-09-22

    I am kind of doing the first part at the moment "Here's a working sample of what it should do, don't copy it, please build your own design".

    However, I have seen that once people see one way of building a circuit, they tend to get influenced by whatever design choices that were made in that circuit.

    I have seen students who didn't get to see a reference circuit (either I didn't provide the reference design or they didn't look whatever) - come up with better designs. This is why I thought that some sort of temporary password/blackbox feature would be nice.

    I can't' do much about people who snoop the XML code - I trust that they won't do it - and if they do, later on in the course, they will get into trouble when they can't produce their own work.

  • sunmohan

    sunmohan - 2010-09-22

    How about this- can there be a a simple rectangle component with option of fill color? No functionality - just a box with a fill that can overlay existing components.

    Then I could place a large dark rectangle over the design and ask them not to peek under the rectangle.

  • Carl Burch

    Carl Burch - 2010-09-23

    As Ilia said, doing this in a truly general way is probably impossible - it's just an XML file, after all, and people can edit it. Even if it were encrypted, Logisim would have to decrypt it somehow, and people could just get Logisim's source code and modify it to access the decrypted version.

    When I assign programming projects where this happens, I tend to accomplish this by handing students something done in a horribly obfuscated manner. You could do this in Logisim: Spaghetti wiring is obvious (and probably much easier with the new automatic wire rerouting); you could also imagine overlapping your gates. Maybe implement a lookup table in ROM in some peculiar fashion. Also, if you're prohibiting the use of some Logisim components, you could use them heavily in your own solution.

    That said, if a filled rectangle fits the bill, then that's something that's coming... not next week, but soon. Actually, come to think of it, there will be a stopgap solution in the next week or so: The next version (which is about done) will allow you to customize how a circuit is drawn when used as a subcircuit. The intention is that, as an example, you could design an ALU subcircuit that would be drawn in a larger circuit in a V shape rather than as a rectangle with the notch. But it could also be used for your purpose: Create an empty circuit whose appearance as a subcircuit happens to be simply a large solid black rectangle, and place an instance of that subcircuit on top of whatever you want to "hide."

    Eventually - probably in the spring - I hope to make it so that this drawing functionality for rectangles (and ovals, and lines,...) is also available directly within the layout..

  • sunmohan

    sunmohan - 2010-09-23

    The obfuscated wiring idea is something I had not considered! Thank you for that suggestion. I'll probably go around with that suggestion. Thanks for looking into the comments and an amazing piece of software!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks