Node modeling in Internet

     This article is about modeling nods assembled on the basis of integrated circuits in Internet.
The author believes that:
  • In Internet there can be created systems for modeling nodes of devices, for example, integrated circuit based ones;
  • In Internet there can be created expandable libraries of device models.
     To perform these tasks, it was created this software – let us call it modeling environment, that enables:
  • Drawing logic circuit of a node directly in the browser window with the capability of editing IC list and interconnections between the ICs;
  • Forming input pulse sequences by pulse oscillators;
  • Calculations of values for all points of the node modeled;
  • Mapping all oscillograms of input and output pulse consequences in any points of the node being modeled;
  • Saving the node drawn in Internet by using Windows standard dialogue function Save File;
  • Reading the circuits saved before through Open File dialogue function.
The software can be loaded “From here” (139 êá).      Select item “Open” in “File” menu of the modeling environment, and Open File window will open:

Fig. 1

     In the window Open File choose the name of the node to be modeled, for example, circuit_1.chi, to do that, click at the item of the list by the left button of the mouse, and then press the button Open. Some time after, there will be loaded from the server the node function circuit, oscillator, oscilloscope, and “Chart” panel with input and output sequences:


     You can open any other file in the list in Open File window. The first four files contain examples for node modeling software. These are:
  • circuit_1.chi - simple combined circuit;
  • circuit_2.chi - oscillator, assembled from an odd number of inverters;
  • circuit_3.chi - example, with using tm2 ICs;
  • circuit_4.chi - pulse counter based on ICs ie5.
     Writing in these files is not admitted. Writing is allowed only in the other files of the list. In other words, the user can write his/her functional circuits in any files except the mentioned above.
     Let us examine the read functional circuit. To the left there is an oscillator window. It is a four-channel source of pulse sequences for the node. To the right from the node there is a four-channel oscilloscope. This device is designed to receive pulses from the node modeled. “Charts” window is designated for representing oscillator and oscilloscope charts.
     Input sequences and delay times of ICs, as shown below, can be modified. According to ICs’ operating logics, also the node’s outputted values will undergo changes, which will be displayed on the charts. For example, if you move NumericStepper “Length 0”, you will see that input pulses through the first channel of the oscillator and the output pulses of the node, coming to the first output of the oscilloscope, start to change. Please, pay attention, that this happens on-line, that is, not depending on your computer calculating power, the modeling (calculating) delay is practically negligible.
     However, it should be noted, that modeling time depends on many parameters:
  • the complexity of the node’s circuitry;
  • your computer power;
  • availability of generation in your node;
and on some other parameters. For simpler nodes a middle-range power computer is quite enough.
     What could be considered as a start for beginning of the node modeling? If the circuit is read from a server, then modeling is launched automatically, and all output values are calculated against the input values taken by default. In all other cases modeling is launched when changing:
  • Input pulse sequences;
  • ICs’ operating delay time;
  • Switching on channels at the oscillator or at the oscilloscope.
     Special button for launching modeling mode is not available, though maybe, it is worth introducing such. See more about running the software in the section “Tooling”.      The modeling environment features:
  • IC selecting panel;
  • Four-channel pulse oscillator;
  • Four-channel oscilloscope;
  • Chart representation panel;
  • Possibility of node circuit editing;
  • Possibility of saving and restoring the circuits.
IC selection panel.
     This window is named “Integrated Circuits”. The panel is designated for selecting the needed ICs and dragging them to the work desk. It is done the following way. Click the mouse left button at the chosen IC in the window “Integrated Circuits”, move the mouse cursor to any location of the work desk and click once more. Watch the IC appearance. ICs at the work desk and integrated-circuit selection panel can be moved without limitation within the software main window.
Node Circuit Editing.
     Any integrated circuit, placed at the modeling work desk can be deleted from it. To delete an integrated circuit select the item “Delete Component” from its context menu. If the deleted IC contains links, then they shall be deleted as well.
     Links between the ICs can be also established. To estsblish a link, simply put the mouse cursor at a needed contact pad, press the left button, and without releasing it, move the mouse towards to a contact pad of another IC, and then release the mouse button. Check establishment of the connection between the contacts. If your monitor’s resolution is too high and drawing might be difficult, turn on the Zoom option..
      The node’s circuit can be zoomed in many times or zoomed out in its dimensions. This can be done from the work desk menu through choosing between the items:
  • Zoom In;
  • Zoom Out;
  • Show All.
     The links can be leveled out. Please, be aware of the fact that all the links can be edited in such a manner that they can be executed only in parallel or perpendicular to coordinate axis. This operation should be executed at significant zooming in. To level out, put the mouse cursor at on line, highlight it by pressing the left mouse button, and draw the cursor until formation of an angle, rationed to the direct one, between the contact pad and the mouse cursor. When the line edited reddens, release the mouse left button.
     A link can be deleted. To delete a link, select “Delete Line” item in its context menu.
Pulse oscillator.
     The oscillator is designated for generating input pulse sequences. It features four channels, each of those can be set up and switched on or switched off separately.
     A channel setup includes selection of a pulse sequence setting the length of logic one and logic zero. To choose pulse sequence you should do the following:
  • Select item “Setup impulse” in the oscillator’s context menu;
  • Select the right RadioBox corresponding to the channel in the window that is going to open, and then select the right pulse sequence in the drop-out list;
  • To confirm selection, press ”Ok” button.
     To set “one” and “zero” length you should choose the right channel number in the column “Setup” of the oscillator’s panel, and then set the necessary values by using NumericStepper with labels “0” Length” or “1”Length”.
     Switching on/switching off an oscillator’s channel is performed by setting/unsetting a mark in the appropriate CheckBox of the field “Switching on” of the oscillator panel. Then the pulse sequences of the switched on channels are represented at “Charts” panel.
     The oscilloscope is designated for reception of output pulse sequences of the modeled node. It features four channels. Each channel can be linked to any output point of the modeled node. Switching on/switching off an oscilloscope’s channel is performed by setting/unsetting a mark in the appropriate CheckBox of the field “Switching on” of the oscillator panel. Then the pulse sequences of the switched on channels are represented at “Charts” panel.
Chart representation panel.
     This is a window named “Charts”. The panel is designated to represent pulse sequences coming from the oscillator and oscilloscope, it has four channels. The channels are hard-fixed according to the location of chart representation. In other words, the first chart represented will be the first one switched on the oscillator or oscilloscope. The charts are numerated from above towards below.
Possibility of saving and restoring the circuits.
     These possibilities are performed in a dialogue mode through Open File and Save File options and are described in detail in the sections “Modeling a Ready Node” and “Saving the Model”.      Let us draw a new node circuit:
  • Place the needed integrated circuits on the work desk, locate them in the necessary positions. Excessive integrated circuits should eliminated from the work desk. To remove them, select item “Delete Component” in the context menu for the integrated circuit deleted;
  • Place onto the work desk the oscillator and the oscilloscope, and locate them in the appropriate positions;
  • Establish the links between the integrated circuits, oscillator and oscilloscope. The links can be leveled out, though it is not obligatory. Leveling out the links should be performed at substantial zooming in.
     Let us set parameters:
  • Set the right operation times for the node’s integrated circuits. This can be done by selecting item “Delay Time” in the context menu for every integrated circuit. Then set the required time period and press the button “Ok”;
  • Set input pulse sequences for the node modeled. This can be done from the oscillator context menu by selecting item “Setup impulse’. When the window appears, you should choose the channel number and the sequence corresponding to it. Please, pay attention to the fact, that zero and one lengths in the selected sequence should be set on the front panel of the oscillator with previously selecting the channel in the column “Setup”.
  • Switch on the chosen output channels of the oscillator by setting marks in CheckBox, corresponding to the channels;
  • Switch on input channels of the oscilloscope by setting marks in CheckBox, corresponding to the channels.
  • Input and output sequences of the modeled node can be watched in window “Charts”. You can change operation time of every integrated circuit, input pulse sequence, zero or one lengths, and the software will respond by calculating and displaying the node’s output sequences.
     A drawn or loaded node circuit and set input effects can be saved on the server. To do that, you should select in menu “File” item “Save As” and the dialogue window Save File will be opened:


In window Save File click at any file from the list of offered ones, make sure that it’s name appeared in field “File Name”, press the button “Write”. The circuit will be saved on the server.
Notice 1. The first four files named circuit_1.chi - circuit_4.chi are used to demonstrate the software operation, and therefore writing is not admitted in them. Your can write your circuit into any other file, offered in the list.

Notice 2. By default, the browser can use cash memory for reading data. Therefore, if you read some circuit, then modify it and write again in the file with the same name, you may find at reading it again, that the circuit is not modified. To avoid this, you should set in Internet Explorer the following:
Service-> Observer Properties -> Parameters-> Check Renew Availability -> At Every Visiting the Page.
     The modeling method is rather simple and contains:
  • Integrated circuit classes.
    Objects are created dynamically based on IC classes. Object creation takes place when an integrated circuit is moved to the work desk or when reading a node’s model from the server.
  • Link Array.
    The author believes that any circuit can be represented as an array of links of the kind: Output – Input. A link array is formed while links between integrated circuits are established during the process of drawing a node or when a ready circuit is read from the server.
  • Event Array.
    This is a dynamic array of the kind: Time – Source – Value. What does it mean? It is known that the sources of events in a node are:
    • External source, for example, outputs of an external node;
    • Internal source, for example, operation of some component inside the node.
         The set of external events is supposed to be defined in some finite time period. In other words, at first in the event array it is written the external sequence of effects of the kind: Time – Oscillator Output – Value. It is done before the start of modeling, when a user sets input pulses from the oscillator. Of course, external effects even can be missing at all.
         With the node modeling going on, into the event array are additionally written output values of the integrated circuits with calculated time of the expected event. Note, please, that at one moment many events can happen in the node. And on the contrary, if no events happen in the node, then nothing is written in the array – this is the way how event-based principle works.
  • Modeling Algorithm.
    The author believes that the start point at modeling a node is the scale of events – this is the main factor. To put it simple, the algorithm considering external effects looks like this:
    • Set the current time of modeling at “0”;
    • Find the nearest event in the event array and identify the source of event;
    • Analyze the link array and identify the integrated circuit’s contact, to which the event has entered;
    • Load the model of the integrated circuit. We form the output effect, considering the operation delay and internal state we write it into the event array.
    • Arrange the event array according to timing and return to search of the event next in the queue in time.
         But the actual algorithm is substantially more complicated, because some more factors are to be considered, for example:
    • If two opposite in the value signals enter the integrated circuit’s input in the time period shorter, than its operation time;
    • If an integrated circuit contact is “hung up”;
    • If the internal state of the integrated circuit is not defined;
    • If generation is started in a node.
     This program is written in ActionScript 2.0 language and contains about two thousand lines. TimeLine Flash effects and Windows *.dll libraries are not used.
10/06/2005 Yegeniy Veresov.
© Argument Ltd, 2018 ãîä,  òåë: 8-921-215-45-70,   e-mail