Saturday, July 24, 2010

Mux Synthesis

One day one of my friends asked me why on synthesis some of the intended mux logic is synthesized as mux itself and some are replaced by gate combinations, in any case final implementation is the same. For example in case of a 2:1 mux with inputs A & B, select line S and output Y what finally gets implemented is
Y = (A&S^) + (B&S) ; where S^ is the inverted S line.
i.e. the mux will also have two AND gates and an OR gate.

The problem here is he is limiting his thoughts to the gate level implementation forgetting that there is a lower transistor available. Just to give an idea of how a mux can be actually much better than the AND:OR structure I have provided below an example mux implementation at transistor level.

I'm not sure of the practical feasibility of the above structure and 100 percent confident we have much better implementations available. Still you will be able to appreciate the reduction in area and delay achieved by modeling the logic at transistor level instead of gate level. Hence if the mux is at a time critical path make sure at synthesis it always get replaced by a mux itself.

Thursday, July 22, 2010

Bidirectional Flyback Converter

The above diagram depicts a compact bidirectional fly-back converter. The operation of the converter can be explained as follows: while drawing power from the battery to the load the switch T1 is driven by the PWM signal of appropriate duty cycle and T2 will be permanently off. The secondary current flows through the diode D2. The current path for this condition is shown with a solid red line in the figure. When the current flows through T1 (during active state of PWM signal) energy will be stored in L2. When T1 is off (during inactive state of PWM), because of the polarity of stored potential in L2 current flows through D2.

The dashed blue line shows the current flow when energy is put back into the battery i.e. when there is energy transfer in the reverse direction. In this case switch T2 and the diode D1 comes into action. Duty cycle and/or frequency of PWM signal can be varied to control the battery recharge voltage/current.

Advantages:
1. More than one flyback converter can be connected in parallel at the DC bus with all the battery terminals floating w.r.t each other.
2. The transistor-diode configuration (or IGBT-diode) is available in market as a single piece.
3. The flyback structure is very compact

You can also refer to the ieee paper "Multiphase Bidirectional Flyback Converter Topology for Hybrid Electric Vehicles" for further reference.

Friday, July 16, 2010

Memory and Corporate Hierarchy

Why do we have the memory architectures i.e. hard disk, DRAMs, cache and other layers of memory?

The simplest and precise answer to this may be so that we can get the best available performace (cache memory) at the lowest cost per bit (HDD). Now what is the connection between memory hierarchy and corporate hierarchy??

This observation was brought about by one of the senior and intelligent guys in our company. According to him Principal engineers are the CACHE, very costly to the company but at the same time have a lot of knowledge and experience (performance). The junior engineers are the HDD, cheap and less experienced. The senior engineers and others in between acts as buffers like the DRAMs. Thus when the company looks down, it sees the best knowledge and experience at the cheapest cost!!

This is just one example, if you look carefully you may find similar analogies in your daily life to most of the engineering solutions :)

Wednesday, July 14, 2010

Logical Operations Using Mathematical Operands

How do you implement logical operations using mathematical operands? (Considering logic 0 and 1 to be numerical values)

2 Input AND:
This is one of the simplest ones; considering I1 and I2 as inputs and Y as output
Y = I1 x I2
Only when both I1 and I2 are equal to 1 shall the output be 1.

Now lets try to implement for other logic gates as well

2 Input OR:
Y = I1 + I2 - (I1 x I2)

NOT Gate:
Y = 1 - I

2 Input NOR:
Y = (1 - I1) x (1 - I2)

2 Input NAND:
Y = 2 - (I1 + I2) + {(1 - I1) x (1 - I2)}

2 Input XOR:
Y = (I1 x I2) + {(1 - I1) x (1 - I2)}

2 Input XNOR:
Y = {I1 x (1 - I2)} + {(1 - I1) x I2}

Saturday, July 3, 2010

Simple LC Circuit

I consider that anyone who can analyse correctly circuits involving inductors is an electronics guru. Inductors (and their by products like transformers) are one of the most dreaded circuit elements in electronics. Here I would like to share one of my favourite and innocent looking circuits: an inductor and capacitor connected in series to a battery through a switch. What is the voltage and current waveforms when the switch is closed?

Before you check the answer please try if you can get it yourself. Check out if your basics are correct!!

Since this is a series resonant circuit, the waveforms are going to be sinusoidal with the frequency being the resonant one.

Help Points:
1. Inductor opposes a change in its current. Hence Ibat at t = 0 is 0 amps.
2. At any time Vc + VL = Vbat.
3. Average voltage across inductor = 0 and so the average voltage across capacitor = Vbat

The inductor voltage VL is sinusoidal varying between +Vbat and -Vbat and 90 degree leading Ibat.

Capacitor voltage is sinusoidal with a DC shift, varying between 2Vbat and 0 and 90 degree lagging Ibat.