PICASSO

advertisement
TEAM 12
PICASSO
Requirements Document
Chase Nordhoff | Cole Chadler | Farrukh Yakubov | Jaya Bharadwaj Yellapragada
2/1/2012
[The Document Consists of a set of requirement documents including Functional, Environmental,
Quality, Process and Platform implementations of PICASSO software.]
Problem
Creating physical circuits can be a ponderous experience. Large amounts of time are spent stripping
wires and attaching them to the breadboard, especially when building a complex circuit. Picasso’s
“virtual-circuitry” allows engineers, nerds, technicians, and geeks to build circuits quickly with little
preparation time. Picasso minimizes the dependency on physical equipment and reduces the frustration
of creating physical circuits. Moreover, building and simulating virtual circuitry is a fun learning
experience and can be very helpful in debugging real circuits. In other words, one can build, modify, and
test a virtual circuit before assembling the actual, physical circuit, making problems easier to locate and
fix.
PICASSO Overview
Picasso, named after the genius himself, is a computer program used to create virtual circuits. Picasso
users speak the language of logic in a simple and vivid way. Our experiences building logic circuits in
computer architecture classes inspired our idea of an intuitive logic circuit simulator.
Although there are a number of circuit simulators available, Picasso is unique. Most major circuit
simulators can be divided into two types: logic circuit simulators and electrical circuit simulators. Some
existing simulators are powerful, but they are strictly limited to only one of these two types and are
usually designed for professionals. Picasso, however, brings logic circuits and electrical circuits together
to simulate a real circuit. Moreover, Picasso has an intuitive user interface that does not require
advanced knowledge of assembling circuits. The main purpose of Picasso is to help people learn about
and experiment with integrated circuits.
Picasso is available on the Internet and can be accessed with a web browser. Picasso’s website includes
examples and educational information about logic circuits and computer architecture. A standalone
version can be downloaded and used offline. Picasso is written in the Java programming language,
making the software available on many platforms.
Middle school students, high school students, computer science students, and anyone else interested in
circuits and computer architecture are potential users of Picasso.
Environment and System Models
Picasso is a monolithic application that can be run as a standalone program or in a web browser. The
standalone program is an executable Java file. The online version is a Java applet. The standalone
program and the web applet have the same functionality. Picasso’s relatively small file size allows it to
be downloaded quickly, even on slow connections. The Java 1.7 (or newer) runtime environment is
required to use Picasso.
The user interface is similar to an image editor like Adobe Photoshop. A toolbox contains circuit
elements that can be placed on the breadboard. A terminal window displays system output. A toolbar
contains file operations (new, open, save, etc.), edit operations (undo, redo, delete, etc.), and simulation
operations (start, stop, etc.). The majority of the user interface is a workspace displaying a modifiable
breadboard. Users can drag-and-drop circuit elements from the toolbox onto the breadboard.
Picasso will have a real time simulation, that is, the user can modify and build on a circuit while it is
being simulated. Any changes to the circuit will have an immediate effect on simulation. Computations
of simulation will be handled by an independent thread, allowing program’s main thread to handle the
user’s actions on building a circuit. Circuit data will be shared by both threads, but will only be modified
by the main thread as user adds/removes elements to/from the circuit. As soon as there is a change in
circuit structure or in node current, simulation thread will recompute order of execution for circuit
elements, then each element will update its’ outputs accordingly. Also, simulation thread will be able to
detect static circuit (i.e. powerless circuit or circuit with its outputs not varying over time), and pause
computations while circuit remains without a change. Some circuit elements, such as microcontrollers,
will have their own threads running for their entire lifetime on the circuit, unless simulation is
intentionally interrupted by the user. Communicator object will be shared by all circuit elements, so that
any object can output not only to data structures but also directly to GUI.
Picasso web application and standalone Picasso program will have the same functionality. Therefore it is
up to a user to use Picasso the way he prefers.
Functional Requirements
The user can do the following things on PICASSO:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Begin a new project.
Open a previously saved project.
Save the current project.
Export the current project as an image file.
Switch between a “realistic” view and a “diagram” view of their circuit.
o The “realistic” view displays the circuit as it would appear on a real breadboard.
o The “diagram” view displays the circuit as a circuit diagram.
Start and stop the real-time simulation of the circuit.
Place following elements on the breadboard.
o Wires
o Logic gates
 AND
 OR
 XOR
 NOT
 NAND
 NOR
 XNOR
o Resistors
o Sensors
 Temperature sensor
 Sound sensor
 Light sensor
o LED lights
o Microcontrollers
o Capacitors
Change the properties of circuit elements.
Remove circuit elements from the breadboard.
Reposition circuit elements on the breadboard.
View information about the circuit elements on the breadboard.
Write code for a microcontroller to execute during simulation.
PICASSO should be able to do the following:
1. Load the breadboard in different modes.
2. Provide tools for:
2.1 Connecting different elements on breadboard.
2.2 Connect the elements on breadboard with wires/resistors.
2.3 Input the command/programs.
2.4 Simulate and give the output of the user’s commands/programs.
3. Switch between text and real mode depending on the user’s preference and adapt the UI.
4. Monitor the activities of the user and provide information about elements on breadboard.
5. Save and restore the files contain previous sessions/information of the user.
Quality Requirements
Response time: The frame rate of the simulation graphics is at least twenty-five frames per second.
Resource usage: The ratio of memory usage to CPU usage is balanced.
Reliability: Picasso does not crash due to software bugs.
Availability: Picasso is available online from its website. A standalone version of the application can
be downloaded and used offline.
Recovery from failure: Picasso automatically saves changes to a temporary file. If the program is
terminated unexpectedly, the unsaved changes can be recovered.
Maintainability: Picasso is developed using common software engineering conventions to make it
easier for a qualified person to maintain the software in the future.
Reusability : Picasso will be designed with the reusability of its components in mind. Related data and
operations will be grouped together into subsystems and designed to be as independent as possible.
The program’s GUI and functionality subsystems will communicate through a connector subsystem.
Platform Requirements
Picasso can be used in two ways:
1. Picasso can be used as a java applet embedded in a website. The website is compatible with
popular web browsers such as Internet Explorer, Google Chrome, and Mozilla Firefox.
2. Picasso can be used as a standalone program.
Both the Java applet and the standalone version require the Java 1.7 (or newer) runtime environment
and are compatible with recent Linux, Mac, and Windows operating systems.
Process Requirements
Project development will be based on the Agile development model. There will be three cycles of builds
that will incrementally fulfill the milestones and requirements.
Build One:
1. The GUI and basic website is implemented.
2. A set of skeleton classes and data structures is created.
3. Event handling of:
a. Dragging
b. Dropping
c. Mouse clicks
d. Keyboard activities
Build Two:
1. Complete implement functionality of:
a. Hardware simulation
b. Software simulation
2. Combine and streamline GUI with functionality.
Build Three:
1. Test.
2. Debug.
3. Optimize.
4. Further development of website.
Use Cases
Start a new project
1. The user chooses the ‘New’ command.
2. If the current project has unsaved changes, the system prompts the user to save the current
project.
3. The system displays a new project with a blank breadboard.
Open a project from a file
1. The user chooses the ‘Open...’ command.
2. If the current project has unsaved changes, the system prompts the user to save the current
project.
3. The system prompts the user to specify a project file.
4. The system loads the specified project file and displays its breadboard.
Save a project to a file
1. The user chooses the ‘Save’ command.
2. If the current project does not have an associated file, the system prompts the user to specify a
file to associate with the project.
3. The system saves the current project to the project’s associated file.
Save a project to a file
1. The user chooses the ‘Save As...’ command.
2. The system prompts the user to specify a file to associate with the project.
3. The system saves the current project to the project’s associated file.
Save a picture of the project
1. The user chooses the ‘Export...’ command.
2. The system prompts the user to specify a file.
3. The system saves a picture of the current project to the specified file.
Close the application
1. The user chooses the ‘Close’ command.
2. If the current project has unsaved changes, the system prompts the user to save the current
project.
3. The system closes the application.
Create a circuit element
1. The user chooses a circuit element type.
2. The user chooses a valid location on the breadboard for the new circuit element.
3. The system attaches the new circuit element to the breadboard.
View information about a circuit element on the breadboard
1. The user selects a circuit element on the breadboard.
2. The system shows that the circuit element is selected.
3. The system displays information about the selected circuit element.
Change the properties of a circuit element on the breadboard
1.
2.
3.
4.
5.
The user selects a circuit element on the breadboard.
The system shows that the circuit element is selected.
The system lists the properties of the selected circuit element.
The user modifies the value of a property.
The system adjusts the model of the circuit appropriately.
View the paths of electric current for a circuit element on the breadboard
1. The user selects a circuit element on the breadboard.
2. The system shows that the circuit element is selected.
3. The system displays each path, a series of circuit elements through which electric current
passes, that contains the selected circuit element.
Move a circuit element on the breadboard
1.
2.
3.
4.
The user chooses to move a circuit element on the breadboard.
The system detaches the circuit element from the breadboard.
The user chooses a valid location on the breadboard for the circuit element.
The system attaches the circuit element on the breadboard in the new location.
Delete a circuit element from the breadboard
1.
2.
3.
4.
The user selects a circuit element on the breadboard.
The system shows that the circuit element is selected.
The user chooses the ‘Delete’ command.
The system deletes the circuit element from the breadboard.
Delete a circuit element from the breadboard
1.
2.
3.
4.
The user chooses a circuit element on the breadboard to move.
The system shows that the circuit element is detached from the breadboard.
The user places the circuit element outside the breadboard.
The system deletes the circuit element.
Undo a change to the project
1. The user chooses the ‘Undo’ command.
2. The system undoes the last change made to the project.
Redo a change to the project
1. The user chooses the ‘Redo’ command.
2. The system redoes the most recently reversed change.
Change the source code that is executed by a microcontroller
1.
2.
3.
4.
5.
6.
The user selects a microcontroller on the breadboard.
The system shows that the microcontroller is selected.
The user chooses the ‘Change code’ command.
The system asks the user for new source code.
The user provides the new source code.
The system stores the source code for the microcontroller.
Flowcharts:
Wireframe
Download