EDiSim
 

  • EDiSim = Emory Digital Simulator; is a circuit simulation system based on the work of Prof. Richard Reid of Michigan State University

  • Bashan Zuo implemented EDiSim under the supervision of Prof. Cheung in 2019.

EDiSim circuit simulation program
 

  • EDiSim is a text-based digital circuit simulation system (not GUI based)

    I.e.:

      • You write a text file that contains the circuit setup that you want to simulate

  • EDiSim provides:

      • Built-in basic digital circuit components
      • User-defined circuit components

The coordinate system used in EDiSim

  • Each circuit component contains a coordinate where the circuit component will be drawn

  • The planar coordinate system used in EDiSim is as follows:

             a    b    c    d    e  	
           +----+----+----+----+----+ ...	
         a | aa | ab | ac | ad | ae |	
           +----+----+----+----+----+ ...
         b | ba | bb | bc | bd | be |	
           +----+----+----+----+----+ ...
           ...
      

Input component used in EDiSim
 

  • Switch: is an user input component that the user can toggle ON(=1) and OFF(=0).

  • The switch has 1 output.

    Syntax:

       Switch Coord outputSignalName 'Key' initState; 
      
           Coord            = grid coordinate
           outputSignalName = name used to make connections in EDiSim    
           Key              = key used to toggle this switch
           initState        = initial state of this switch (0 or 1)
      
       E.g.: Switch aa sw0 'a' ZERO;  
      

When you hit the assigned key 'Key' in the EDiSim circuit window, the Switch assigned to that key will toggle ON/OFF

DEMO: /home/cs355001/demo/circuits/switch

Probing component used in EDiSim
 

  • Probe: is an "signal visualization" component (= a light) that can shows a value of a signal to the user (as a filled or unfilled rectangle)

    Syntax:

       Probe Coord signalName; 
      
              Coord     = Coordinates in grid
              signalName = name of the output being probed by this probe   
      
       E.g.: Probe aa sw0;  
      

If the signal value = 0, the probe will be blank (= not filled).
If the signal value = 1, the probe will be filled.

NO DEMO (because Probe needs an input signal)

Example circuit file: 2 Switches and 2 Probes that probes a switch

Your first EDiSim circuit simulation program:

Switch aa sw0 'a' ZERO;
Switch ba sw1 'b' ZERO;

Probe  ab sw0; // Connects Switch output sw0 to this Probe's input  
Probe  bb sw1; // Connects Switch output sw1 to this Probe's input

How to run the circuit simulation:

 Create a file named 'first'
 containing  the above lines

 Execute: /home/cs355001/bin/cs355sim first 

Comment on coordinates

  • The coordinate (= placement) will not affect the operation (= correctness) of the circuit

  • The coordinate (= placement) will only affect "how nice your circuit looks"

  • Note:

      • In most projects in this course (except in project 1), you don't need to worry about placing your circuit components

      • I.e.: except in project 1, you can (always) use a dummy coordinate (e.g.: aa) as the coordinate for every component

Basic built-in circuit components and their syntax

  • The NOT gate: computes the NOT function on the input signal

         Not  Coord  inputName  outputName;   
      
         Computes:   outputName = NOT(inputName)                 

  • The AND gate: computes the AND function on all its input signals

         And  Coord  in1 in2 ... ink  output;
      
         Computes:   output = in1 AND in2 AND ... AND ink 

  • The OR gate: computes the OR function on all its input signals

         Or  Coord  in1 in2 ... ink  output; 
      
         Computes:   output = in1 OR in2 OR ... OR ink

Sample EDiSim circuit files
 

This is and3 from the /home/cs355001/demo/circuits directory:

Switch aa sw_0 '0' ONE;
Switch ca sw_1 '1' ONE;
Switch ea sw_2 '2' ONE;

And cc sw_0 sw_1 sw_2 out; // out = sw_0 AND sw_1 AND sw_2 

Probe ce out;
   

(The inputs of the And gate are connected to the output of the 3 switches)

Note: you must use Java-syntax identifiers for signal names !!!

We will learn the more advanced features of EDiSim when we need them later in the course.