diff --git a/doc/en/contents.xml b/doc/en/contents.xml index ebbb04f..9a4f4e4 100644 --- a/doc/en/contents.xml +++ b/doc/en/contents.xml @@ -23,6 +23,7 @@ + @@ -129,6 +130,7 @@ + diff --git a/doc/en/guide/menu/edit.html b/doc/en/guide/menu/edit.html index 7be4352..d170d13 100644 --- a/doc/en/guide/menu/edit.html +++ b/doc/en/guide/menu/edit.html @@ -60,6 +60,41 @@ the clipboard.

Select All

Selects all components in the current circuit.

+
Raise Selection
+

Available only when editing how a circuit's appearance, this menu item +raises the currently selected object(s) to be drawn +on top of an object that currently overlaps the selection. If the selected +object is overlapped by several objects, it is raised only to be above the lowest +one; select the menu item repeatedly until it is in the order it +should be.

+ +

(Determining whether two arbitrary objects overlap is difficult. Logisim uses +an algorithm of selecting several random points in each of the two objects +and seeing if any point is also in the other object. Sometimes it will fail to +detect an overlap if the overlap is small — say, less than 5% of +either of the objects.)

+ +
Lower Selection
+

Available only when editing a circuit's appearance, this menu item +lowers the currently selected object(s) to be drawn below an object that the +object currently overlaps. If it overlaps several objects, it is lowered only +to be below the highest one; select the menu item repeatedly until it is in the +order it should be.

+ +
Add Vertex
+

Available only when editing a circuit's appearance and a point has been +selected on a line, polyline, or polygon, this menu item inserts a new vertex +onto the shape. Previous to insertion, the selected point is drawn as a +diamond.

+ +
Remove Vertex
+

Available only when editing a circuit's appearance and an existing +vertex has been selected on a polyline or polygon, this menu item removes +the selected vertex. Previous to deletion, the selected vertex is drawn as a +diamond within the square representing the vertex. Logisim will not permit +removing a vertex on a polygon with only three vertices or on a polyline with +only two vertices.

+

Next: The Project menu.

diff --git a/doc/en/guide/menu/project.html b/doc/en/guide/menu/project.html index 7a25a67..0916612 100644 --- a/doc/en/guide/menu/project.html +++ b/doc/en/guide/menu/project.html @@ -36,11 +36,29 @@ circuits within the project, as displayed in the explorer pane.

Set As Main Circuit

Sets the currently displayed circuit to be the project's -``main circuit.'' (This menu item will be grayed out if the +main circuit. (This menu item will be grayed out if the current circuit is already the project's main circuit.) The only significance of the main circuit is that it is the circuit that first appears when a project file is opened.

+
Edit Circuit Layout
+

Switches to allow you to edit how the layout of components that +determines how the circuit works. This is what the program does when it starts, +and you will edit circuit layouts most often using Logisim, so this menu item +is normally disabled.

+ +
Edit Circuit Appearance
+

Switches to allow you to edit how the circuit will be represented +when it is used as a subcircuit within another circuit. By default, the circuit +is represented as a rectangle with a gray notch on its north end, but +this menu option allows you to draw a different appearance for the +subcircuit.

+ +
Revert To Default Appearance
+

If you've edited the circuit's appearance, this menu item reverts +the appearance back to the default rectangle-with-notch appearance. +The menu item is enabled only when editing the circuit's appearance.

+
Remove Circuit

Removes the currently displayed circuit from the project. Logisim will prevent you from removing circuits that are used as @@ -85,7 +103,8 @@ not included in the unique and recursive counts.

When checked, this menu item indicates that a small toolbar should be displayed above the explorer pane, allowing the user easy access to adding, renaming, reordering, and removing circuits -from a project.

+from a project. The toolbar also supports switching between editing a circuit's +layout and its appearance.

Options...

Opens the Project Options diff --git a/doc/en/guide/subcirc/appear.html b/doc/en/guide/subcirc/appear.html new file mode 100644 index 0000000..06d7396 --- /dev/null +++ b/doc/en/guide/subcirc/appear.html @@ -0,0 +1,132 @@ + + +Editing subcircuit appearance + + + + +

Editing subcircuit appearance

+ +

Default appearance

+ +

By default, when a subcircuit is placed within a larger circuit, it is drawn +as a rectangle with a notch indicating the north end of the subcircuit's +layout. Pins will be placed on the rectangle's border based on their facing: +Pins that face east in the layout (and typically appear on the west side +of the layout) will be placed on the rectangle's west side, +according to their top-down ordering in the layout. +Pins that face south in the layout (typically toward the north side of the layout) +will be placed on the rectangle's north side, according to the left-to-right +ordering in the layout.

+ +

The default rectangle can optionally include some letters that will appear +in the middle of the rectangle. To specify this, select the selection tool +() and click the background of the circuit's +layout. This will show the circuit attributes in the attribute table, including +the Label, Label Facing, and Label Font attributes. +The value of the Label attribute will be drawn in the rectangle's center; +the Label Facing attribute customizes which direction the text is drawn, +and of course the Label Font attribute customizes the font used.

+ +

Customized appearance

+ +

The default appearance is very usable, and indeed Logisim existed for many +years with no other option. If, however, you prefer that the subcircuit be +drawn differently, you can select Edit Circuit Appearance from the +Project menu, and Logisim's interface will switch from its regular +layout-editing interface to an interface for drawing the circuit's +appearance. Below, we are editing the 2:1 multiplexer's appearance so that +it is drawn with the usual trapezoid rather than a rectangle. +(You can see the project toolbar just below the regular toolbar. +This can be enabled through the Project menu, and it allows quick switching +between editing the layout and appearance.)

+ +
+ +

With the appearance for the 2:1 multiplexer drawn as above, +the layout for the 4:1 multiplexer would then appear as the following.

+ +
+ +

The appearance editor is like a traditional drawing program, but there +are a few special symbols for indicating how the drawing works when placed +into a circuit's layout. These special symbols cannot be removed.

+ +
    + +
  • The green circle with a line coming out of it, which we'll call the ankh. +There is exactly one ankh in each subcircuit appearance. +Each component in a circuit has a single point identifying its location; +a user sees this when creating a new component: +The mouse click identifies just a single location, and the component is placed +relative to that (usually with the primary output at the mouse's location) +The ankh identifies the mouse's location relative to the overall drawing +when the subcircuit is created.

    + +

    The ankh also identifies the appearance's facing, as indicated by the +direction the ankh's line points from its circle. When placing the subcircuit +into a layout, the user can change the subcircuit's facing; the ankh's facing +indicates in which direction the appearance is oriented. In our example, the +ankh is facing east, and each instance of the subcircuit in the 4:1 multiplexer +is also facing east, so they are all drawn in the same orientation as the 2:1 +multiplexer's appearance.

  • + +
  • The blue circles and squares with dots in them are the subcircuit's +ports. There are exactly as many ports as there are input and output +pins in the circuit. +Ports corresponding to inputs are drawn as squares, while ports corresponding +to outputs are drawn as circles. +Each port indicates how a wire connecting into the +circuit will correspond to an input or output pin within the layout.

    + +

    When you select a port, Logisim will indicate the corresponding pin +by popping up a miniature diagram of the layout in the window's bottom right +corner, with the corresponding pin(s) drawn in blue. This does not happen when +all ports are selected.

  • + +
+ +

The toolbar contains tools for adding additional shapes.

+ + + + + + + + + + + + + + + + + + + + +
Select, move, copy, and paste shapes.
Add or edit text.
Create a line segment. Shift-drag keeps the line at 45° angles.
Create a quadratic Bezier curve. + For the first drag, where you specify the curve's endpoints, + shift-drag keeps the endpoints at a 45° angle from each other. + Then you click to indicate the control point's location; + shift-click ensures the curve is symmetric, + while alt-click draws the curve through the control point.
Create a sequence of connected lines, whose vertices are indicated by + a succession of clicks. Shift-clicking ensures that the vertex is at a 45° + angle from the previous one. Double-click or press the Enter key to complete the + shape.
Create a rectangle through dragging from one corner to the opposite corner. + Shift-drag to create a square, and alt-drag to create the rectangle starting + from the center.
Create a rectangle with rounded corners through dragging from one corner to the opposite corner. + Shift-drag to create a square, and alt-drag to create the rectangle starting + from the center.
Create an oval through dragging from one corner of its bounding box to the opposite corner. + Shift-drag to create a circle, and alt-drag to create the circle starting + from the center.
Create an arbitrary polygon, whose vertices are indicated by + a succession of clicks. Shift-clicking ensures that the vertex is at a 45° + angle from the previous one. Double-click, press the Enter key, or click the + starting vertex to complete the shape.
+ +

Next: Using subcircuits.

+ + + diff --git a/doc/en/guide/subcirc/custom-appear.png b/doc/en/guide/subcirc/custom-appear.png new file mode 100644 index 0000000..88b5943 Binary files /dev/null and b/doc/en/guide/subcirc/custom-appear.png differ diff --git a/doc/en/guide/subcirc/custom-layout.png b/doc/en/guide/subcirc/custom-layout.png new file mode 100644 index 0000000..4041bc6 Binary files /dev/null and b/doc/en/guide/subcirc/custom-layout.png differ diff --git a/doc/en/guide/subcirc/index.html b/doc/en/guide/subcirc/index.html index 6e24289..bd4b8c3 100644 --- a/doc/en/guide/subcirc/index.html +++ b/doc/en/guide/subcirc/index.html @@ -24,6 +24,7 @@ facilitate debugging.

Creating circuits
Using subcircuits +
Editing subcircuit appearance
Debugging subcircuits
Logisim libraries
diff --git a/doc/en/guide/subcirc/using.html b/doc/en/guide/subcirc/using.html index 18111af..c9de485 100644 --- a/doc/en/guide/subcirc/using.html +++ b/doc/en/guide/subcirc/using.html @@ -67,7 +67,7 @@ deleting, or moving them) will rearrange them also in the containing circuit. Thus, if you change any pins in a circuit, you will also need to edit any circuits using it as a subcircuit.

-

Next: Debugging subcircuits.

+

Next: Editing subcircuit appearance.

diff --git a/doc/en/icons/bitadder.gif b/doc/en/icons/bitadder.gif new file mode 100644 index 0000000..386d617 Binary files /dev/null and b/doc/en/icons/bitadder.gif differ diff --git a/doc/en/icons/drawarc.gif b/doc/en/icons/drawarc.gif new file mode 100644 index 0000000..d8663cd Binary files /dev/null and b/doc/en/icons/drawarc.gif differ diff --git a/doc/en/icons/drawcurv.gif b/doc/en/icons/drawcurv.gif new file mode 100644 index 0000000..ae39ec7 Binary files /dev/null and b/doc/en/icons/drawcurv.gif differ diff --git a/doc/en/icons/drawline.gif b/doc/en/icons/drawline.gif new file mode 100644 index 0000000..4ce6bd6 Binary files /dev/null and b/doc/en/icons/drawline.gif differ diff --git a/doc/en/icons/drawoval.gif b/doc/en/icons/drawoval.gif new file mode 100644 index 0000000..c0e5fe5 Binary files /dev/null and b/doc/en/icons/drawoval.gif differ diff --git a/doc/en/icons/drawpin.gif b/doc/en/icons/drawpin.gif new file mode 100644 index 0000000..7384950 Binary files /dev/null and b/doc/en/icons/drawpin.gif differ diff --git a/doc/en/icons/drawplin.gif b/doc/en/icons/drawplin.gif new file mode 100644 index 0000000..9333e88 Binary files /dev/null and b/doc/en/icons/drawplin.gif differ diff --git a/doc/en/icons/drawpoly.gif b/doc/en/icons/drawpoly.gif new file mode 100644 index 0000000..00f02a7 Binary files /dev/null and b/doc/en/icons/drawpoly.gif differ diff --git a/doc/en/icons/drawrect.gif b/doc/en/icons/drawrect.gif new file mode 100644 index 0000000..7b90bec Binary files /dev/null and b/doc/en/icons/drawrect.gif differ diff --git a/doc/en/icons/drawrrct.gif b/doc/en/icons/drawrrct.gif new file mode 100644 index 0000000..56050d9 Binary files /dev/null and b/doc/en/icons/drawrrct.gif differ diff --git a/doc/en/icons/projadd.gif b/doc/en/icons/projadd.gif new file mode 100644 index 0000000..d4bea4f Binary files /dev/null and b/doc/en/icons/projadd.gif differ diff --git a/doc/en/icons/projapp.gif b/doc/en/icons/projapp.gif new file mode 100644 index 0000000..46e324a Binary files /dev/null and b/doc/en/icons/projapp.gif differ diff --git a/doc/en/icons/projdel.gif b/doc/en/icons/projdel.gif new file mode 100644 index 0000000..8a2658f Binary files /dev/null and b/doc/en/icons/projdel.gif differ diff --git a/doc/en/icons/projdown.gif b/doc/en/icons/projdown.gif new file mode 100644 index 0000000..ae52e28 Binary files /dev/null and b/doc/en/icons/projdown.gif differ diff --git a/doc/en/icons/projlayo.gif b/doc/en/icons/projlayo.gif new file mode 100644 index 0000000..ef9127e Binary files /dev/null and b/doc/en/icons/projlayo.gif differ diff --git a/doc/en/icons/projup.gif b/doc/en/icons/projup.gif new file mode 100644 index 0000000..77945e9 Binary files /dev/null and b/doc/en/icons/projup.gif differ diff --git a/doc/en/libs/arith/bitadder.html b/doc/en/libs/arith/bitadder.html new file mode 100644 index 0000000..8c07a25 --- /dev/null +++ b/doc/en/libs/arith/bitadder.html @@ -0,0 +1,79 @@ + + +Bit Adder + + + + +

+Bit Adder

+ +

+ + + + + + +
Library:Arithmetic
Introduced:2.6.0
Appearance:

+ +

Behavior

+ +

The component determines how many 1 bits are in its input(s) and emits the +total number of 1 bits on its output. For example, given the 8-bit input 10011101, +the output would be 5, since there are five 1-bits in the input +(the first, the last, and a string of three bits in the middle).

+ +

If any of the input bits are floating or error values, then the output will +contain error bits in the output corresponding to the range of possible outputs +depending on whether those floating/error values are counted as zeroes or ones. +For instance, if the 14-bit input is 111x10110x1101, then the output must be +at least 9 (if the x's are interpreted as zeroes +and at most 11 (if they are interpreted as ones). +Thus, the output will be 10EE: The upper two bits will be 1 and 0 since all integers +between 9 and 11 have 1 and 0 as their top two bits, but the lower two bits are EE +since integers between 9 and 11 vary within these bits.

+ +

Pins

+ +
+ +
West edge (inputs, bit width matches Data Bits attribute)
+
The inputs whose 1 bits are to be counted. The number of inputs is based +on the Number of Inputs attribute.
+ +
East edge (output, bit width computed as described below)
+
The number of input bits which are 1. The bit width of the output is the +minimum number of bits to store the maximum possible value (which would be +the product of the Data Bits attribute and the Number of Inputs attribute).
+ +
+ +

Attributes

+ +

When the component is selected or being added, +the digits '0' through '9' alter its Number of Inputs attribute and +Alt-0 through Alt-9 alter its Data Bits attribute.

+ +
+ +
Data Bits
+
The bit width of the input(s).
+ +
Number of Inputs
+
The number of input values.
+ +
+ +

Poke Tool Behavior

+ +

None.

+ +

Text Tool Behavior

+ +

None.

+ +

Back to Library Reference

+ + + diff --git a/doc/en/libs/arith/index.html b/doc/en/libs/arith/index.html index 1f9b3de..629eab1 100644 --- a/doc/en/libs/arith/index.html +++ b/doc/en/libs/arith/index.html @@ -26,6 +26,8 @@ two's-complement values.

Comparator Shifter + + Bit Adder

Back to Library Reference

diff --git a/doc/en/libs/index.html b/doc/en/libs/index.html index eb8844c..1ab84d0 100644 --- a/doc/en/libs/index.html +++ b/doc/en/libs/index.html @@ -111,6 +111,8 @@ documented in this reference material.

Comparator Shifter + + Bit Adder
Memory library diff --git a/doc/en/map.jhm b/doc/en/map.jhm index 27d2151..4cfa705 100644 --- a/doc/en/map.jhm +++ b/doc/en/map.jhm @@ -23,6 +23,7 @@ + @@ -113,6 +114,7 @@ + diff --git a/notes/2.6.0/announce-2.6.0.txt b/notes/2.6.0/announce-2.6.0.txt new file mode 100644 index 0000000..7397f7f --- /dev/null +++ b/notes/2.6.0/announce-2.6.0.txt @@ -0,0 +1,45 @@ +Feature: You can customize how a subcircuit component will be drawn, in place of the default rectangle-with-notch appearance earlier. + +Feature: Multiplexers, demultiplexers, decoders, and priority encoders all support 5 "Select Bits." + +Feature: The Arithmetic library now includes a "Bit Adder" which computes the number of 1 bits in its input(s). + +Feature: The I/O library's LED has an "Off Color" attribute. + +Bug fix: After removing a circuit from the project, an Undo would place the removed circuit at the end of the project's list rather than back in its previous location. + +Bug fix: When loading more than 4,096 memory entries into RAM or ROM, if the 4,096th entry (or a multiple of 4096 entries) was at the end of a line in the text file, all subsequent entries were ignored. + +Bug fix: When the circuit is scaled using the zoom controls, tool tips would show up in the wrong location. + +Bug fix: A "ConcurrentModificationException" was observed from the EventSourceWeakSupport class. It was changed to guarantee that it does not occur there. + +Bug fix: Sometimes a diagonal line would appear across the layout when you selected a different component to be added. + +Interface change: The menu shortcut for moving up in the state hierarchy is now MenuKey+Shift+Up, since MenuKey+Up is used for raising the selection. + +Interface change: When the grid is being shown and the zoom factor is 200% or more, each grid dot is actually a square of several pixels. + +Interface change: The project toolbar is drawn slightly differently, with a darker "add" icon, and of course the added elements for selecting to edit the layout or the appearance. Behind the scenes, the icons are drawn differently - this will likely be most apparent under MacOS X, where it was fairly ugly before. + +Interface change: Subcircuits are drawn (by default) with a slightly different notch to adapt to the quadratic Bezier curve supported by the customized appearance module. + +Architectural change: Subcircuits are implemented using the newer logisim.instance API rather than the deprecated logisim.comp API. + + +TODO: + +alt when creating curve creates curve going through the control point +refine point containment in text +respect shift/alt when moving handle - depends on shape +cut/copy sometimes does not work immediately after selecting view +don't create Appearance view until it is actually needed +ensure that ports and origin are always at top of appearance +When a component is selected, sometimes an attempt to change to an attribute in the attribute table changes the attribute, but the table is not updated to reflect it. +save appearance zoom/show grid as part of file +check: start but don't finish editing attribute, then change attribute list + +Deferred: + +refine when the Raise/Lower menu option is enabled +probe tool - adds display of probe value inside circuit layout