Digital and Analog Circuit Simulation with Ksimus
I took a Computer Logic Design class in college, so when I stumbled upon the Ksimus Circuit Simulator, I was intrigued. At the risk of waxing nostalgic, I remember what it was like to build circuits in school. We'd spend hours the night before the lab designing our circuit, being careful to list each interconnection. We had to keep track of which pin numbers on each chip were to be connected. Then, we took our design and our box of parts to the lab. When we got to the lab, we were given a breadboard and a power supply. Then began the tedium of connecting everything up.
I will admit to miswiring at least one circuit and burning up a chip or two. Those little buggers can get hot! Then, there were times when our original design just simply didn't work. In those cases, we had to redesign our project and get it built in time to be graded. Even though the class was fun, the labs were very stressful. Fortunately, we have better tools now.
Ksimus is a circuit simulator that allows you to build digital and analog circuits with discrete components and simulate them in real time. Ksimus does have its limitations though. Ksimus doesn't supply any of the larger circuits like addressable memory or 8-bit adders, but you can build one for yourself and package it up as a Ksimus module. Also, because Ksimus provides only discrete logic components, you're probably not going to be designing a quad-core microprocessor or anything moderately complex. That said, you certainly can use Ksimus to learn about computer logic design, and you even can use it to simulate basic logic circuits. But, best of all, it's just fun to play with!
Ksimus' user interface is fairly straightforward. You have a list of components on the left side of the window and a canvas on the right side. To place a component on the canvas, you click on the component and then click on the canvas where you want the component to appear. Making a connection between two devices is also intuitive. You place your cursor on the first pin, and you'll notice that the cursor changes. Then, you hold the left mouse button down and drag the cursor to the second pin and release the button. I had been playing with Ksimus for some time before I realized what the cursor was changing to when I made an interconnection; it was turning into a tiny wire wrap tool! Ksimus is smart enough not to let you connect two inputs or two outputs, so you don't need to worry about burning up your virtual logic gates!
When you've built a design you want to test, you can start the simulation from the menu bar at the top.
The Ksimus program is easy to use, and there are lots of components available for use in your designs. Obviously, any digital logic simulator will have the typical AND, OR, NOT and XOR gates.
Many of the components are configurable. For example, the counter component can be configured to be anything from a 3-bit counter to a 16-bit counter. There also is a variety of Flip Flops included in Ksimus, including JK, RS and D Flip Flops. In fact, there are two different D Flip Flops: one is a single gate, and the other is a module with anywhere between 1 and 26 gates. With the addition of some extra addressing logic, which is included with Ksimus, you can build your own addressable memory almost trivially. Ksimus also provides both a variable size Muliplexer as well as a Demultiplexer.
Ksimus allows you to provide input for your circuits from various sources. One of the most basic input sources is the clock generator. The clock generator allows you to configure initial startup delay as well as on-time and off-time duty cycle. You also can include buttons that can be “pushed” by the user during simulation. Ksimus includes both a momentary contact/disconnect switch and a latching switch, and these switches don't bounce like real switches do! Of course, there also are the boolean true and false values that can be provided as constant inputs to your circuit.
Logic circuits wouldn't be any fun if they didn't produce any output, and Ksimus provides users with the LED output as well as a 7 Segment Display, with built-in decoder. To use the 7-Segment Display, you simply provide the appropriate binary value on its four input lines, and it displays the appropriate number. You also can use the Data Recorder and Text Recorder as outputs for your circuit. The Data Recorder is essentially a multi-channel logic probe. You simply add (and connect) input channels to the Recorder and run your simulation. Then, you can open up the probe's graph and watch the display in real time. The Text Recorder performs the same function, except that it logs to an external file for later analysis.

Figure 1 shows a simple circuit I built in just a couple minutes. This circuit uses a clock signal to drive a counter. The output of the counter is used as an address for a demultiplexer that simply drives a row of LEDs. The circuit simply strobes the LEDs in order—a simple but effective demonstration.
So far, you've seen a pretty detailed rundown on the digital capabilities of Ksimus, but the program also has quite a few floating-point or analog capabilities. Using the wave-form generator and various arithmetic operators, I was able to build up some fairly complex wave-forms to supply to my circuit. Using these functions would let you create a model of a physical phenomenon and interface it with your digital circuit for simulation.
The floating-point arithmetic components include adders, subtractors, dividers and multipliers. You also can use exponential, log and trigonometric functions in your simulation.
The floating-point comparison components allow you to compare two analog signals and output an appropriate digital logic level. The Data Selector component lets you use a digital address to select one of many analog signals. You also can create inputs that have a constant analog value. From these components, it's easy to see how you could build an Analog-to-Digital converter or a Digital-to-Analog converter.
The only variable input I found useful for analog input was the Slider. The Slider allows you to vary the output voltage manually during the simulation. You can configure the upper and lower limits of the output too.

As you can see, Ksimus' analog capabilities are fairly complete. Figure 2 shows an analog circuit I built to demonstrate the Slider input as well as the Data Recorder. In this circuit, I have a sine wave and an analog slider that ranges from -1 to 1. I send these two outputs into the two comparison operators and get a digital output that I use to drive a couple LEDs. I've also included a label that displays the actual value being output by the slider. Finally, you can see the various wave forms and logic states in the graph windows. When the simulation is running, I can adjust the slider to change the relative duty cycle of the two LEDs.
So, there you have it. Ksimus is a great laboratory for exploring digital logic as well as analog interfacing problems. And like I said earlier, it's a lot of fun to play with!
Mike Diehl is a freelance Computer Nerd specializing in Linux administration, programing, and VoIP. Mike lives in Albuquerque, NM. with his wife and 3 sons. He can be reached at mdiehl@diehlnet.com
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- Tech Tip: Really Simple HTTP Server with Python
- New Products
- Trying to Tame the Tablet
- git-annex assistant
3 hours 24 min ago - direct cable connection
3 hours 47 min ago - Agreed on AirDroid. With my
3 hours 57 min ago - I just learned this
4 hours 1 min ago - enterprise
4 hours 31 min ago - not living upto the mobile revolution
7 hours 23 min ago - Deceptive Advertising and
7 hours 58 min ago - Let\'s declare that you have
7 hours 59 min ago - Alterations in Contest Due
8 hours 39 sec ago - At a numbers mindset, your
8 hours 1 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.



Comments
giubbotti moncler, moncler kids
accessorio per un certo numero di anni. Naturalmente questo
sono solo uno dei molti nomi di marchi che sono trasportati da queste aziende. Molte delle linee di fascia alta sono anche in corso di fabbricazione a un prezzo
che è acquistabile a uomini d'affari più medio non importa quale compagnia
With the addition of some
With the addition of some extra addressing logic, which is included with Ksimus, you can build your own addressable memory almost trivially.
www.superwatches.net
ksimus vs ktechlab
what about ktechlab? anyone know the differences?
Thanks
I am an electrical engineer and use ONLY Linux and FOSS for my purposes. I have never head of this application. Thanks for bringing it up. I will definitely give this a try.
hmmm . . what do you
hmmm . . what do you normally use then ?