Version 4 of bwise applications and examples

Updated 2003-03-19 17:48:24

By Theo Verelst

This page refers to bwise, which can be downloaded via Bwise - a graphical programming setup.

http://195.241.128.75//Diary/Ldi6/flipflop1.jpg See this of my diary pages [L1 ] where I'm making text about this one

 http://195.241.128.75//Diary/ldiary6.html#bwise.

I'll start making a list of bwise examples and applications, the first being show above as an important gedanken experiment. Don't think eigenvalues here, we're not getting into that now.

I made a generator block for AND gate blocks on the bwise canvas, which is a block which generates new blocks when it is fired (Eval-ed). This is the command (can be executed on the console or a bwise shell) for making the generator block:

 set n 1;
 newproc "newproc \"set proc\${genproc.n}.q \\\[expr !(\\\${proc\${genproc.n}.a} && \\\${proc\${genproc.n}.b})\\\]\" proc\${genproc.n} {a b} q  ;set genproc.nlast \${genproc.n}" genproc n nlast

Which (evaluated but not executed ends up in the genproc.bfunc as:

 newproc "set proc${genproc.n}.q \[expr !(\${proc${genproc.n}.a} && \${proc${genproc.n}.b})\]" proc${genproc.n} {a b} q  ;set genproc.nlast ${genproc.n}

Which can also be seen here:

http://195.241.128.75/Diary/Ldi6/genproc1.jpg

The proc1 and proc2 blocks were made by executing 'funprop' from the block menu (middle mouse button on the yellow part of a block), which evaluates the block, passes the current proc index from genproc.nlast to tcl variable Proc1.in, evaluates the Proc1 block function which is stored in tcl variable Proc1.bfunc, which sets Proc1.out to one higher, and finally transfers this values to genproc.n, at which point the funprop functional propagator function stops because it detects it is back where it started.

Of course more basic circuits with nand circuits can be made, such as just one, for instance with an alarm sensor at the door and a window, issueing a 1 when the door or window is open, and 0 otherwise, and a buzzer or siren or slient alarm connected to the output. For that, on would need to read signals from the outside world, and one would have to periodically or when one or more of those signals changes values, recompute the outcome of the AND function, and trgger following blocks dealing with the new alarm state. Of course simply filling in values in the infowindow (use the data popup menu on the and block)

One may want to arm or disable the alarm, or one of the inputs by using another and. At this terminal, I don't have bwise running, so the connections are left as an exercise to the reader.