April 9, 2026

Explore Our Topics!

Check out the extensive list of topics we discuss: 

  1. Tech and AI Blogs
  2. Communication Protocols:
    USB 
    - RS232 
    Ethernet 
    AMBA Protocol: APB, AHB and ASB 
    UART, I2C AND SPI
  3. Important concepts in VLSI:
    Designing a Chip? Here Are the 12 Important Concepts You Need to Know
    Metastability 
    - Setup time and Hold time
    Signal Integrity and Crosstalk effect
    Skews and Slack 
    Antenna Effect
  4. Semiconductor Memories
  5. Analog vs Digital Electronics
  6. Most Frequently Asked Questions in VLSI
  7. VLSI and Semiconductor Nuggets: Bite-Sized knowledge for Enthusiasts
  8. Common Acronyms in VLSI and Semiconductor Industry
  9. How Your Electricity Meter Really Works
  10. Transistors:
    BJT
    JFET
    MOSFET
    CMOS
    Transmission Gate CMOS
    Dynamic CMOS
  11. Sequential Circuits:
    Registers
    Counters
    Latches
    Flip Flops
  12. FPGA:
    ASIC vs FPGA
    FPGA Insights: From Concept to Configuration
    Full-Custom and Semi-Custom VLSI Designs: Pros, Cons and differences
    From Theory to Practice: CMOS Logic Circuit Design Rules Made Easy with Examples
  13. CMOS Fabrication:
    CMOS Fabrication
    Twin-Tub CMOS Technology
  14. Combinational Circuits
    - Logic Gates 
    - Boolean Algebra and DeMorgan's Law 
    - Multiplexer (MUX) and Demultiplexer (DEMUX) 
    - Half Adder
    - Full Adder
    - Half Subtractor
    - Full Subtractor
    - Encoders
    - Decoder
  15. Analog Electronics
    - Atoms: the Foundation of Electronics
    - Electrons, Protons and Neutrons 
    - Electron Shells, Subshells and Energy Ordering
    - Energy Band: The Key to Conductors, Semiconductors, Insulators and Dielectrics
    - Intrinsic and Extrinsic Semiconductors
    - Electric Charge and Permittivity
    - Electric Potential and Voltage
    - Basic Structure and Working of Battery
    - Understanding Resistor
    - Understanding Resistivity
    - Understanding Capacitor and Capacitance
    - Understanding Inductors and Inductance
    - Understanding Reactance
    - Understanding Impedance
    - Understanding Resonance
    - Laws of Electronics
    - OPAMP
    - Inverting and Non-inverting Amplifiers
    - Characteristics of OPAMP
    - OPAMP Application: Adder, Subtractor, Differentiator, and More!  
    - Filters
    - Hard Disk Drives Explained
    - Passive Components: Capacitors and Resistors Explained
    - LTSpice Tutorial 1: Installation and First Circuit Simulation
  16. Verilog
    - Verilog Datatypes
    - Comments, Numeral Formats and Operators
    - Modules and Ports
    - assign, always and initial keywords
    Blocking and Non-Blocking Assignments
    - Conditional Statements
    - Looping Statements
    - break and continue Statement
    - Tasks and Functions
    - Parameter and generate
    - Verilog Codes
  17. System Verilog: 
    Disable fork and Wait fork.
    Fork and Join.
  18. Project on Intel Quartus Prime and Modelsim:
    Vending Machine Controller
  19. Xilinx Vivado Projects
    1)VHDL
    Counters using Testbench code
    Flip Flops using Testbench code
    Logic Gates using Testbench code
    Full Adder using Half Adder and Testbench code
    Half Adder using Testbench code
    2)Verilog
    Logic Gates using Testbench code
    Counters using Testbench code
    Full Adder using Half Adder and Testbench code
    Half Adder using Testbench code
  20. VLSI Design Flow:
    Design Flow in VLSI
    Y chart or Gajski Kuhn Chart
  21. Projects on esim:
    Step-by-Step guide on how to Design and Implement a Full Adder using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a Half Adder using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a 2:1 MUX using CMOS and sky130nm PDK
    Step-by-Step guide on how to Design and Implement a Mixed-Signal Circuit of 2:1 Multiplexer
  22. IoT based project:
    Arduino
    Step-by-Step guide on how to Interface Load Cell using Arduino
  23. Kmaps:
    Simplifying Boolean Equations with Karnaugh Maps - Part:2 Implicants, Prime Implicants and Essential Prime Implicants. 
    Simplifying Boolean Equations with Karnaugh Maps - Part:1 Grouping Rules.
    Simplifying Boolean Equation with Karnaugh Maps.

April 7, 2026

How Your Electricity Meter Really Works (And What You’re Actually Paying For)



Every time you switch on a light or charge your phone, your electricity meter quietly starts doing calculations in the background. But have you ever wondered what exactly it is measuring — and how that turns into your monthly bill?

When you switch on a light bulb or charge your laptop at home, what you are really doing is using the electrical energy supplied by the electricity distribution system. The power company provides a continuous flow of electric energy, carried by electrons already present in the wires of your home. These electrons don’t come from the power station — they are already in your home wiring — but the power station provides the push, the driving force, that keeps them moving.

Understanding Voltage and Current

That driving force is what we call voltage. In India, for example, our homes typically receive 230 volts AC (alternating current). Voltage is like the electrical pressure that pushes the charges through the circuit.

Along with voltage, we also talk about current, which is the rate of flow of electric charge. So when we say a device consumes 2 amperes, it means electric charge is flowing through it at a rate of 2 coulombs per second, driven by the supply voltage.

What You Are Actually Charged For: Energy

Now, the real physical quantity that your electrical company charges you for is energy, not just current or voltage alone.

Energy (E) is calculated as:

E = P × t

Power (P), in AC systems, is given by:

P = V × I × cosÏ•

Where:
cosϕ = power factor

In AC systems, power depends on the power factor, which accounts for the phase difference between voltage and current.

So, energy can be expressed as:

E = V × I × cosÏ• × t

If you plug in a 100-watt bulb, it draws a certain current at the given voltage such that the total power is 100 watts. If you leave it on for one hour, the energy consumed is 100 watt-hours (Wh).

That’s why electricity bills are measured in kilowatt-hours (kWh), where:

1 kWh = 1000 watts used for one hour

How Your Energy Meter Works

The electric meter in your house keeps track of this continuously.

It measures voltage and current, calculates power internally, and then integrates it over time to determine energy consumption.

So every fan you run, every light you keep on, and every appliance you use contributes to the total energy consumption. At the end of the billing cycle, you are charged based on the total kilowatt-hours used.

Source and Load: The Complete Picture

When we talk about a voltage source, in your home that is the utility grid. It is connected through transformers and distribution lines and provides an approximately 230 V supply.

Think of it as a reservoir that provides the push.

On the other side is the load.

A load is anything that consumes electrical power — such as a light bulb, fan, heater, refrigerator, or any appliance. When voltage is applied across it, the load draws current.

In simple terms:

  • Voltage is provided by the source
  • Current depends on the load (its resistance or impedance)

What is Loading?

Loading refers to how much of the source’s capacity is being used by connected devices.

  • No Load: No devices are ON → almost no current flows → no power consumed
  • Light Load: Only a few small devices are running
  • Full Load: System is operating near its maximum capacity

For example:
If your home supply is rated for 100 A and your appliances draw 80 A, you are operating at 80% load.

What Happens During Overloading?

If the load tries to draw more current than the system can safely supply, the system becomes overloaded.

This can lead to overheating, voltage drops, or tripping of protective devices like circuit breakers.

Putting It All Together

In daily life, your home is always connected to the supply line. The source maintains a voltage ready to drive current.

The moment you switch on a device:

  • The circuit is completed
  • Current begins to flow
  • Power is delivered
  • Energy starts accumulating

Over time, your energy meter adds all these small amounts of energy consumption together.

And that accumulated energy is what shows up in your monthly bill.

Final Thought

Your electricity meter isn’t just counting units — it is continuously calculating how much electrical work is being done in your home every second.

And by understanding this, you’re not just using electricity — you’re understanding it. 

April 6, 2026

Mastering Verilog: Essential Code Samples for Practice

In this blog post, we’ll delve into some fundamental Verilog code examples that are essential for understanding digital design concepts. Whether you’re new to Verilog or looking to refresh your knowledge, these code snippets will serve as a handy reference for building logic circuits.

  1. Logic Gates
  2. Half Adder
  3. 4-bit Full Adder
  4. Half Subtractor
  5. Full Subtractor
  6. 2:1 Mux
  7. 4:1 Mux
  8. 2:4 Decoder
  9. 3:8 Decoder
  10. 4:2 Encoder
  11. Priority Encoder
  12. Barrel Shifter
  13. Comparator
  14. BCD to 7 segment Decoder
  15. SR Flip Flop
  16. D Flip Flop
  17. T Flip Flop
  18. JK Flip Flop

Happy Coding!

April 5, 2026

Mastering Verilog: Implementing a SR Flip Flop

Welcome to another edition of our Verilog series! In this blog post, we’ll explore the implementation of an SR Flip-Flop in Verilog. The SR (Set-Reset) Flip-Flop is one of the simplest sequential circuits used to store a single bit of data.

It has two inputs, S (Set) and R (Reset), which control the output state. This flip-flop forms the basic foundation for more advanced flip-flops like JK and D Flip-Flops.

Below is the Verilog code for an SR Flip-Flop, implemented using a Behavioral Modeling approach:

📊 Block Diagram

In the behavioral modeling approach, we use conditional logic inside a clock-triggered block to define the output behavior.

module sr_flip_flop(input clk, input S, input R, output reg Q);

always @(posedge clk)
begin
  case ({S, R})
    2'b00: Q <= Q;     // Hold
    2'b01: Q <= 1'b0;  // Reset
    2'b10: Q <= 1'b1;  // Set
    2'b11: Q <= 1'bx;  // Invalid state
  endcase
end

endmodule

🧪 Testbench

module tb_top;
  reg clk, S, R;
  wire Q;
  
  sr_flip_flop srff(clk, S, R, Q);
  
  initial begin
    clk = 0;
    forever #5 clk = ~clk;
  end
  
  initial begin
    $monitor("At time %0t: S=%b R=%b Q=%b", $time, S, R, Q);
    
    S = 0; R = 0; #10;
    S = 1; R = 0; #10;
    S = 0; R = 1; #10;
    S = 1; R = 1; #10;
    
    #10 $finish;
  end
endmodule

Explanation:

  • When S = 0 and R = 0, the output remains unchanged (hold condition).
  • When S = 1 and R = 0, the flip-flop sets (Q = 1).
  • When S = 0 and R = 1, the flip-flop resets (Q = 0).
  • When S = 1 and R = 1, it results in an invalid state.
  • The always @(posedge clk) block ensures edge-triggered operation.

Conclusion

This Verilog implementation of an SR Flip-Flop demonstrates the basic storage mechanism in sequential circuits. While simple, it highlights the importance of avoiding invalid input conditions in digital design.

What’s Next?

Now that you’ve explored SR, D, JK, and T Flip-Flops, try comparing their behavior and applications. In the next post, we’ll move toward registers and counters.

Happy Coding! 🚀

April 4, 2026

Mastering Verilog: Implementing a JK Flip Flop

Welcome to another edition of our Verilog series! In this blog post, we’ll explore the implementation of a JK Flip-Flop in Verilog. The JK Flip-Flop is an advanced version of the SR Flip-Flop that eliminates the invalid state and provides more flexibility in sequential circuit design.

Depending on the inputs J and K, the output can set, reset, hold, or toggle, making it highly useful in counters and control circuits.

Below is the Verilog code for a JK Flip-Flop, implemented using a Behavioral Modeling approach:

📊 Block Diagram

In the behavioral modeling approach, we use conditional statements inside a clock-triggered block to define the flip-flop behavior.

module jk_flip_flop(input clk, input J, input K, output reg Q);

always @(posedge clk)
begin
  case ({J, K})
    2'b00: Q <= Q;     // No change
    2'b01: Q <= 1'b0;  // Reset
    2'b10: Q <= 1'b1;  // Set
    2'b11: Q <= ~Q;    // Toggle
  endcase
end

endmodule

🧪 Testbench

module tb_top;
  reg clk, J, K;
  wire Q;
  
  jk_flip_flop jkff(clk, J, K, Q);
  
  initial begin
    clk = 0;
    forever #5 clk = ~clk;
  end
  
  initial begin
    $monitor("At time %0t: J=%b K=%b Q=%b", $time, J, K, Q);
    
    J = 0; K = 0; #10;
    J = 0; K = 1; #10;
    J = 1; K = 0; #10;
    J = 1; K = 1; #10;
    J = 1; K = 1; #10;
    
    #10 $finish;
  end
endmodule

Explanation:

  • When J = 0 and K = 0, the output remains unchanged.
  • When J = 0 and K = 1, the flip-flop resets (Q = 0).
  • When J = 1 and K = 0, the flip-flop sets (Q = 1).
  • When J = 1 and K = 1, the output toggles.
  • The always @(posedge clk) block ensures edge-triggered operation.

Conclusion

This Verilog implementation of a JK Flip-Flop demonstrates how multiple operations like set, reset, hold, and toggle can be achieved within a single sequential circuit. It is widely used in designing counters and control logic.

What’s Next?

Try implementing counters using JK Flip-Flops and observe state transitions. In the next post, we’ll explore more advanced sequential circuits and their Verilog implementations.

Happy Coding! 🚀

Mastering Verilog: Implementing a T Flip Flop

Welcome to another edition of our Verilog series! In this blog post, we’ll explore the implementation of a T Flip-Flop in Verilog. A T Flip-Flop (Toggle Flip-Flop) is a sequential circuit that changes its state whenever the input T is high and a clock edge occurs.

It is commonly used in counters and frequency division circuits, where toggling behavior is required.

Below is the Verilog code for a T Flip-Flop, implemented using a Behavioral Modeling approach:

📊 Block Diagram

In the behavioral modeling approach, we use clock-triggered logic to toggle the output based on the input condition.

module t_flip_flop(input clk, input T, output reg Q);

always @(posedge clk)
begin
  if (T)
    Q <= ~Q;
end

endmodule

🧪 Testbench

module tb_top;
  reg clk, T;
  wire Q;
  
  t_flip_flop tff(clk, T, Q);
  
  initial begin
    clk = 0;
    forever #5 clk = ~clk;
  end
  
  initial begin
    $monitor("At time %0t: T=%b Q=%b", $time, T, Q);
    
    T = 0; #10;
    T = 1; #10;
    T = 1; #10;
    T = 0; #10;
    
    #10 $finish;
  end
endmodule

Explanation:

  • The T Flip-Flop toggles its output when T = 1 at the rising edge of the clock.
  • If T = 0, the output remains unchanged.
  • The always @(posedge clk) block ensures edge-triggered behavior.
  • Non-blocking assignment (<=) is used for sequential logic.
  • The testbench verifies the toggling behavior under different input conditions.

Conclusion

This Verilog implementation of a T Flip-Flop demonstrates how toggling behavior can be achieved using sequential logic. It is widely used in designing counters and frequency dividers in digital systems.

What’s Next?

Try implementing a JK Flip-Flop or counters using this T Flip-Flop. In the next post, we’ll explore more sequential circuits and their Verilog implementations.

Happy Coding! 🚀

April 3, 2026

Mastering Verilog: Implementing a D Flip-Flop

Welcome to another edition of our Verilog series! In this blog post, we’ll explore the implementation of a D Flip-Flop in Verilog. A D Flip-Flop is a fundamental sequential circuit used to store a single bit of data and is widely used in registers, memory elements, and synchronous systems.

It captures the input value (D) on the rising edge of the clock and holds it until the next clock event.

Below is the Verilog code for a D Flip-Flop, implemented using a Behavioral Modeling approach:

📊 Block Diagram

In the behavioral modeling approach, we use clock-triggered always blocks to define how data is stored.

module d_flip_flop(input clk, input D, output reg Q);

always @(posedge clk)
begin
  Q <= D;
end

endmodule

🧪 Testbench

module tb_top;
  reg clk, D;
  wire Q;
  
  d_flip_flop dff(clk, D, Q);
  
  initial begin
    clk = 0;
    forever #5 clk = ~clk;
  end
  
  initial begin
    $monitor("At time %0t: D=%b Q=%b", $time, D, Q);
    
    D = 0; #10;
    D = 1; #10;
    D = 0; #10;
    D = 1; #10;
    
    #10 $finish;
  end
endmodule

Explanation:

  • The D Flip-Flop stores the input value (D) on the rising edge of the clock.
  • The always @(posedge clk) block ensures edge-triggered behavior.
  • Non-blocking assignment (<=) is used for sequential logic.
  • The output Q updates only on the clock edge, not immediately with input changes.
  • The testbench generates a clock signal and verifies different input conditions.

Conclusion

This Verilog implementation of a D Flip-Flop demonstrates how sequential circuits store and synchronize data using a clock signal. It is a key building block in digital design and forms the basis of registers and memory systems.

What’s Next?

Try adding features like reset or enable to this flip-flop to explore more advanced sequential designs. In the next post, we’ll dive deeper into sequential circuits and their Verilog implementations.

Happy Coding! 🚀

March 25, 2026

Mastering Verilog: Implementing a Full Subtractor

Welcome to another edition of our Verilog series! In this blog post, we’ll explore the implementation of a Full Subtractor in Verilog. A full subtractor is a combinational circuit used to subtract three bits: two significant bits and a borrow-in, producing a Difference and a Borrow-out.

It is an essential component in digital arithmetic circuits and forms the basis for multi-bit subtraction.

Below is the Verilog code for a Full Subtractor, implemented using a Behavioral Modeling approach:

📊 Block Diagram

Press enter or click to view image in full size

In the behavioral modeling approach, we define the outputs using logical expressions based on the inputs.

module full_subtractor(input a, b, Bin, output D, Bout);
assign D = a ^ b ^ Bin;
assign Bout = (~a & b) | (~(a ^ b) & Bin);
endmodule

🧪 Testbench

module tb_top;
reg a, b, Bin;
wire D, Bout;

full_subtractor fs(a, b, Bin, D, Bout);

initial begin
$monitor("At time %0t: a=%b b=%b, Bin=%b, difference=%b, borrow=%b",$time, a,b,Bin,D,Bout);
a = 0; b = 0; Bin = 0; #1;
a = 0; b = 0; Bin = 1; #1;
a = 0; b = 1; Bin = 0; #1;
a = 0; b = 1; Bin = 1; #1;
a = 1; b = 0; Bin = 0; #1;
a = 1; b = 0; Bin = 1; #1;
a = 1; b = 1; Bin = 0; #1;
a = 1; b = 1; Bin = 1;
end
endmodule

Explanation:

  • The Difference (D) is calculated using XOR operations among ab, and Bin.
  • The Borrow-out (Bout) is generated when subtraction requires borrowing, based on input conditions.
  • The design is purely combinational, meaning outputs change instantly with inputs.
  • The testbench verifies all possible input combinations.

Conclusion

This Verilog implementation of a Full Subtractor demonstrates how multi-bit subtraction can be handled using combinational logic. It is a key building block for more complex arithmetic units.

What’s Next?

Try extending this to a multi-bit subtractor and observe borrow propagation across stages. In the next post, we’ll explore more arithmetic circuits and their Verilog implementations.

Happy Coding! 🚀

Explore Our Topics!

Check out the extensive list of topics we discuss:  Tech and AI Blogs Communication Protocols: -  USB   - RS232   -  Ethernet   -  AMBA Prot...