LATEST NEWS
Special Offers for Simulation Software.
Recently launched for the new Karnataka Polytechnic Syllabus

Offer valid till 31st August only.

Biege Bag latest B2Spice V5.1.6 with mixed mode simulation. more
Defense Technology
Visualizing the global terrorist threat to human life & property a decade
ago, we at CODE tied up with SESP Limited of Israel..
T & M Instruments
Since its very inception CODE, has been the worldwide distributor
of ADM Group of Companies, India for their world famous Integrated Pattern Generator & Logic Analyzer..
 
BEIGE BAG v.5.1.6 RELEASE NOTES
Some of the things we've worked on are listed below:  
Non-Linear Controlled Sources (extension):
Names: arbitrary voltage source, arbitrary current source
category: virtual: voltage sources and virtual: current sources
We have implemented If then else expressions and direct digital and logical expressions.
Here are some examples:
B1 nplus nminus V = if(v(2) > v(1), 5, 0) // comparator, pspice syntax
B2 nplus nminus V = v(2) > v(1) ? 5 : 0 // comparator, ISspice syntax
B3 nplus nminus V = !(v(2) & v(1)) // nand gate
B4 nplus nminus V = (v(2) > v(1)) \ (v(2) > v(3)) // '\' is the logical or

These types of expressions can be used for sophisticated modeling within your circuits. I've included more details on these expressions and operators at the end of this article.
 
Virtual table
The "table" output from a simulation was previously a memory hog. We didn't notice this until a customer ran a transient simulation that generated hundreds of thousands of time points and generated a table containing data from 11 signals, which resulted in the program crashing. To fix the problem, we developed a "virtual" table that only stores the data that is shown on the screen. It now takes up very little memory. By the way, there is a second way to view the graph of simulation results as a table. Click on the leftmost button in the toolbar when the graph is active, and it converts the view into a table view. This table view shows the index signal data next to each signal's data, and it does not synchronize the rows to a shared index signal, which is why I prefer the separate table window. Also, you can generate a table from a graph by going to the graph's special menu and choosing "Create graph from table".
 
Large netlists
Most of you probably don't run simulations from netlists, but for those of you that do, the netlist window now supports netlists that are greater than 32K. This was an embarrassing bug to find, but it's fixed now. Also, in case you do use netlists, add a line of the following form to automatically generate a graph and plot v(1) and v(2) when you run the simulation.
.plot tran v(1) v(2)
     
Speed with large PWLs
Large PWL voltage sources used to be slow to edit and circuits with them used to be slow to run. We have improved the code so that you can have PWL sources with hundreds of thousands of data points with wait times of only a few seconds. In case you didn't know, you have a text file of two columns of data for time and voltage, you can load it directly into a voltage source.
 
Graph signal vs another signal (instead of vs. time)
Now you can change the x-axis for a signal, which is useful for I-V curves or eye-plots. To get to this option, go to the Edit Plots panel using the button of that name on the left side of the screen, then choose the Edit Plot page if it isn't already active, then select the plot whose y-axis you want to change in the list-box at the top, then choose its x-axis from the list of graph signals in the X-axis signal combo-box. Originally in v5.1.5, this did not work just right. The signal's data points were being reordered to make the x-axis's data go from low to high. This problem has been corrected
 
User defined parameters
Did you know that you can set global variables and then use them within expressions for part parameters. For example, if you had two resistors that you wanted to keep in a 2 to 1 ratio, you could define the resistance of one as 2*R, and the other as R. Then define R as a user-defined parameter using the menu item by that name in the Schematic's Edit menu. You can also sweep that parameter when setting up a sweep of transients, for example. We have now added the capability to also vary it as a Monte Carlo parameter.
 
Y-Axis title reflects the current plot
You can now specify that the axis' name is the same as that of the selected plot. To get to this option, go to the Edit Axes panel using the button of that name on the left side of the screen, then choose the Left Axis from the Select Axis combo-box, then choose the Title page below, then check the Use Selected Signal checkbox
 
Persistence of axis settings upon "next" run
Have you ever zoomed in on an interesting portion of a plot, then changed a parameter and re-run the simulation and been frustrated that the graph rescales to fit the new plots. You can now force the axes to be persistent with a checkbox named "keep persistent" in the Scale page of the Edit Axes panel.
 
Show zero crossings
Show zero crossings for a plot on the graph now interpolates to find an approximation of the zero crossing, rather than showing the closest generated point.
 
Cross-Probing
We spent a lot of time testing and fixing and retesting voltage and current probes. There were problems in v5.1.5 and earlier in some extreme cases, and some of these problems even caused crashes.
Did you know that you can add probes to the schematic before or after a simulation is done, and it adds the corresponding plots to the front-graph. If you later delete the probe, the corresponding plot(s) get deleted. This works for families of swept or Monte Carlo plots also. And it also works if the front "graph" is actually a table.
 
 
More notes on If-Then-Else (ITE) expressions
Within the ITE condition, change nothing... except fix up operator precedence bug, and add exclusive-or.
Logical operators supported:
&: and
|: or
#: xor
!, ~, ': not
 
Comparison operators:
>, <, = for greater than, less than, and equal.

These ITE expressions can be nested, e.g.
If((v(1) > v(2)) & (v(1) > v(3)), v(1), if(v(2) > v(3), v(2), v(3))) // pspice syntax
((v(1) > v(2)) & (v(1) > v(3))) ? v(1) : (v(2) > v(3)) ? v(2) : v(3))) // isspice syntax
Will return the maximum of v(1), v(2), and v(3)

More notes on logical and digital expressions outside of the ITE
Comparison operators: >, <, =.
These take real inputs and generate logical (0,1) outputs.

 
Digital Operators:
&: and
|: or
#: xor
!, ~: not
These take real analog inputs, convert them to digital signals and perform the operation, then convert the outputs back to analog again. The conversions from digital to analog, and back from digital to analog, use the parameters in the digital simulation options (bb_ad* and bb_da*) for threshold levels and for high and low voltages.
e.g. v(1) & v(2) // will return 5V (bb_daOutHigh) if both v(1) and v(2) are greater than 2.5V (bb_adInHigh), else return 0 (bb_daOutLow).
 
Logical operators: (THIS IS NEW)
These take logical inputs (0,1) and generate logical outputs (0,1).
' : invert (this is the apostrophe that's with the quotation mark)
$ : and
\ : or (backslash, not division symbol)
@ : exclusive-or

e.g. (v(1) > 0) $ (v(2) > 0) // will return 1 if both v(1) and v(2) are greater than 0, else return 0.