A DATA-FLOW PROGRAMMING METHOD AND SYSTEM.
FIELD OF THE INVENTION
The present invention relates to the field of developing systems for
integrated circuits. The present invention is a method and system for
developing software for microprocessors using data-flow programming
wherein the programming is done on a screen by using graphical editor.
BACKGROUND OF THE INVENTION
Integrated circuits are devices, which contain components and
electrical circuits packaged for used as one unit. One of these units is the
microprocessor. The microprocessor is an integrated circuit, which
contains digital computation circuits, an internal memory, and built-in
software. To impart the microprocessor the capability of performing
actions according a program determined in advance, for a specific
purpose into a specific circuit, designated software must be developed.
In circuits or devices in which a microprocessor is integrated, the
microprocessor performs all of the work and controls all of the units in
the circuit or the device. Therefore, all activity of the microprocessor
must be planned, as well as the algorithms of its work, such that the work
will be carried out with maximal rapidity and efficiency. The
microprocessor has analog and digital inputs and outputs, the option of
hooking up to an additional external memory, and serial and parallel
communications ports. This fact seriously complicating the programming
work, which is done in order to achieve designated software for a
microprocessor to be operated in a specific circuit. At last, the
programming work, which takes a long time, achieves designated
software for operating the microprocessor in the specific circuit and this
software is written in a machine language.
In a known programming method, a user draws first a block
diagram of the program system and then writes the code for each block of
the diagram, then the user links the codes together. The code is written in
a text based languages and thus, there is no link between the written code
and the drawn block diagram. After writing the codes, the user links all
modules - according to the diagram block - together and runs the
program on a target microprocessor or simulates the run. This textual
representation of the software makes it hard for non-programmers to
understand and thus creates communication problems between managers
and programmers.
There is therefore a recognized need for, and it would be highly
advantageous to have, a new method and system for an on screen
programming, based on data flow instead of command flow that are
simple, easy to use and understand and makes the programming short in
time and more optimized.
SUMMARY OF THE INVENTION
The present invention is a data-flow-programming method, the
method is for software on-screen programming and said method includes
of the following steps:
a) creating a bulk of graphical block (GB), wherein each of the
GB represents a one-function-module either hardware,
mathematical function, software module or any other function
and wherein the one-function-module performs its function
on an incoming data and offers the result as an output and
wherein each of the GB can be open for changing the function
parameters;
b) selecting a GB on a screen according to the needed process;
c) selecting a next GB on a screen according to the next needed
process;
d) when a need arises, a new GB can be built and can be add to
the bulk;
e) connecting - on screen - the GB to the next GB according to
the program data-flow by the manner of connecting the output
of the GB, which is the result of its function, to one of the
inputs of the next GB for performing the next function; and
f) repeating steps "c" and "e" until the program is ended, having
a data-flow-diagram.
By a preferred embodiment the method, according to the present
invention, further includes:
g) compiling the data-flow-diagram into an intermediate
language, the intermediate language is a unique
implementation of a common three address and wherein the
compilation is saved as an intermediate code file, the file
contains a list of three address code statements and a list of
variables wherein the variables has a reference number to be
use by the three address code statements; and
h) using a linker to link all codes of the intermediate code file
together, optimize the use of data memory and save the linked
codes as a linked-code file.
By another preferred embodiment the method, according to the
present invention, further includes:
i) generating the linked-code file into a machine language,
according to a target processor.
By another aspect of the present invention, it is provided a system
for data-flow-programming, including:
a) a computing system with a display;
b) a bulk of graphical blocks (GB), the GBs are held in the
memory of the computing system;
c) a programming software to run on the computing system,
wherein the programming software comprising:
i) a graphical editor, enables to draw - on the screen - a
data-flow diagram of a program, wherein the diagram is
drown by selecting GB from the bulk and drawing a
connection between the GB according to the flow of the
data in the program;
ii) a compiler for compiling the GB diagram into a
intermediate code;
iii)a linker for creating a file of GBs intermediate codes,
wherein the codes are linked according to the diagram;
iv) a machine language compiler for compiling the linked
codes into a language machine program, according to a
target processor;
By a preferred embodiment the system, according to the present
invention, further includes a graphical simulator for simulate and
optimize the linked codes.
BRIEF DESCRIPTION OF THE FIGURES
The invention is herein described, by way of example only, with
reference to the accompanying drawings. With specific reference now
to the drawings in detail, it is stressed that the particulars shown are by
way of example and for purposes of illustrative discussion of the
preferred embodiments of the present invention only, and are presented
in the cause of providing what is believed to be the most useful and
readily understood description of the principles and conceptual aspects
of the invention. In this regard, no attempt is made to show structural
details of the invention in more detail than is necessary for a
fundamental understanding of the invention, the description taken with
the drawings making apparent to those skilled in the art how the several
forms of the invention may be embodied in practice.
In the figures:
Figure 1 illustrates the known programming method (A) and the
programming method of the present invention (B).
Figure 2 illustrates a block diagram of the programming system,
according to the present invention.
Figure 3 illustrates a preferred embodiment of an on screen
graphical drawing.
DESCRIPTION OF THE PREFERED EMBODIMENTS
The present invention is a data-flow programming method and
system.
The present invention provides an on-screen programming method,
wherein the programmer draws a block diagram of the program in a new
method. For each step of the program, the programmer selects a graphical
block (GB) from a bulk of GBs - that created and saved in the computing
system in advance. A GB is a graphical block that represents a function
wherein the function is performed on the inputs and the result is offered
in the output of the GB. The programmer connect between the GBs
according to the data flow in the program e.g., for multiplying A and B
the programmer select a multiplexing GB, connect A to one of the inputs
of the GB and B to an other input and the result is offered in the output of
the GB for flowing to other GB, for printing or any other purpose. The
programmer can see the underlying structure of each GB, which can be a
predefine GB or a new GB that the programmer writes for his own use.
When the block diagram is completed, a compiler creates a code file
contains the functions of the GBs and the flow connection, then a linker
links between GB functions and creates a linked file that can be test and
optimize by using a simulator. At last, a machine code generator creates a
machine language file to download into the processor.
The principles and operation of the data-flow programming method
and system according to the present invention may be better understood
with reference to the drawing and the accompanying description.
Referring now to the drawing, Figure 1 illustrates the known
programming method (A) and the programming method of the present
invention (B).
In the known method the programmer draws the A draw, then he
use text editor to write an order for each block and connection according
to a programming language syntax. In the method of the present
invention the programmer draws the B draw and the computing system
transfers the draw into a machine language program.
The two figures A and B represent a block diagram of the
following task: "read variables A and B, multiply them and compare to 5,
if the value is great or equal to 5, add 2 otherwise add 3"
In the known method - figure 1A - the block diagram 10 is made
of command blocks 11 and control connections 12. The blocks do not
represent the function, but the command that will be written by the
programmer by a text editor. Some blocks represent more then one
command e.g., the comparison block 13 represents the command of
comparison and the commands of the control directions to one of the next
blocks 14 in the diagram 10.
In the data-flow method - Figure IB - the block diagram 10 is the
program itself. For programming the illustrated task, the programmer
selects Gbs from the offered bulk or creates his own GB. In the figure
main GBs are selected - a multiplying GB 21, a comparison GB 22, two
adding GBs 23&24 and a printing GB 29. Now, constant or variable GBs
are selected and connected according to the data flow. Variable GBs for
A and B 25 are connected to the inputs 26 of the multiplying GB 21, the
result is available in the output 27. By connecting the output 27 to the
input of the comparison GB 22, the result flows from the multiplying GB
21 to the comparison GB 22 that perform the comparison according to
the reference GB 28, which connected to other input of the comparison
GB 22 and in this case is "5". If the result from the multiplying GB 21 is
equal or grater then 5, the comparison GB 22 flows the result to a first
adding GB 23 that adds to the result as defined in a value GB 29 — in this
case "2" - and flows the new result to a printer 31 for printing. If the
result of the multiplying GB 21 is smaller then 5, than the comparison
GB 22 flows the result to a second adding GB 24, which adds to the
result as defined in the value GB 30 - in this case "3"- and flows the new
result to a printer 31.
Figure 2 illustrates a block diagram of the programming system,
according to the present invention. A bulk of GBs 31 is located in the
computing system with a screen 32. A program is drawn on the screen of
the computing system 32 using a graphical editor 33, a compiler 34
converts the drawn program into a file contains the GBs functions and
the connection between the function according to the flow of the data. A
linker 35 links the GBs functions together. A simulator 36 is used for
simulate and optimize the program and feedback the graphical editor 33.
According to a command of the programmer, when the program is
finished and optimized, a machine code generator 37 convert the linked
file to a program in a machine language of the target microprocessor, and
the program can be downloaded 38 to a microprocessor.
Figure 3 illustrates a preferred embodiment of an on screen
graphical drawing. For programming a program for the same task of
figure 2, the programmer selects two reading GBs 25 for reading the
variables A and B. The reading GBs 25 connected to a multiplying GB
21 that multiplies the variables A and B and flows the result to a
comparison GB 22, which compares the result with a value GB 28 that
holds the value decimal 5. Now the programmer selects two conditioned
GBs, a truth conditioned GB 32 and a false conditioned GB 33. These
GBs perform a function or functions that defined by subGBs, depending
to a truth or false input. If the comparison GB 22 indicates "truth" then
the truth conditioned GB 32 gets the result of the multiplied A and B into
an adding GB 23, which add the connected value GB 29 that contains -
in this case - decimal 2 and offers a new result D in an input 36. If the
comparison GB 22 indicates "false" then the false conditioned GB 33
gets the result of the multiplied A and B into its adding GB 24, which
add the connected value GB 30 that contains - in this case - decimal 3
and offers a new result D in an input 36.
As used herein in the specification and in the claims section that
follows, the term "GB" (Graphical Block) and the like refer to the
graphical block that represents a function. This function can be change
by the user or creates in an empty GB.
Although the invention has been described in conjunction with
specific embodiments thereof, it is evident that many alternatives,
modifications and variations will be apparent to those skilled in the art,
accordingly, it is intended to embrace all such alternatives, modifications
and variations that fall within the spirit and broad scope of the appended
claims.