Posts

Showing posts with the label Digital Design

VERILOG : 6. Primitives, Gate and Switch Delays in verilog

Image
     When we design digital circuits in Verilog , we often rely on primitives —the building blocks of complex systems. These are the lowest-level components (gates, switches, buffers, etc.) that mimic real hardware behavior. Understanding how to design using primitives is crucial, especially in ASIC (Application-Specific Integrated Circuit) and library development . In this blog, we’ll cover: ✅ What Verilog primitives are ✅ How delays are modeled (rise, fall, turn-off, min/typ/max) ✅ Examples of gate delays with testbenches ✅ N-input and N-output primitives ✅ Building complex circuits (AND gate, D-Flip-Flop, Multiplexer) using primitives Let’s dive in 🚀 🔹 What are Verilog Primitives? Primitives are the basic logic gates and switches provided by Verilog. They are built-in keywords like and , or , not , buf , etc. They do not require module definitions (unlike user-defined modules). ASIC vendors often use User-Defined Primitives (UDP) and standard gate...

VERILOG : 5. Gate-Level Modeling in Verilog

Image
When we think of Verilog , most engineers picture RTL (Register Transfer Level) coding – writing always blocks, designing with if-else or case statements, and abstracting digital logic into behavioral or dataflow descriptions. However, Verilog also provides a lower-level way of modeling hardware, called Gate-Level Modeling . This is where you describe your circuits directly in terms of logic gates , switches , and transistor-level primitives . Even though gate-level coding is rarely used in RTL design , it plays a vital role after synthesis in ASIC and FPGA design flows . Let’s break it down. 🔑 Why Gate-Level Modeling Matters RTL Coding → Synthesis → Gate-Level Netlist In real chip design, RTL code is synthesized into logic gates . The synthesis tool generates a Verilog netlist made of gate primitives and standard cells . Gate-Level Simulation (GLS) This netlist is then simulated (often with back-annotated timing from an SDF file ) to check how the design behaves w...

VERILOG :4. Hierarchical Identifiers, Nets, Registers, and Strings

Image
Verilog is one of the most widely used Hardware Description Languages (HDL) in digital system design . Whether you are building a simple counter or a complex processor, understanding the building blocks like nets, registers, strings, and hierarchical identifiers is essential. In this blog, we’ll dive into these concepts with easy-to-follow explanations, practical examples, and diagrams to support learning. 🔹 1. Hierarchical Identifiers in Verilog In Verilog, a hierarchical identifier allows you to reference variables, nets, or registers inside lower-level modules from a higher-level module (like the testbench). 👉 Why it matters? It helps in debugging and monitoring signals deep inside a design without modifying the module code. Example: Hierarchical Monitoring module full_adder ( input a, b, cin, output sum, cout ); assign {cout, sum} = a + b + cin; endmodule module adder_hier ; wire [3:0] A, B, Sum; wire Cout; full_adder u0 (A[0], B[0], 1'b0, Su...

VERILOG : 3. Modules in Verilog

Image
Modules in Verilog – The Building Blocks of Digital Design When designing hardware in Verilog , everything revolves around modules . Think of a module as a blueprint or block that describes a piece of your circuit. Just like LEGO bricks, modules can be put together to build bigger systems. In this blog, we’ll explore what modules are, how ports connect them, examples of instantiation , and common rules to follow when using them. What is a Module? A module is the fundamental building block of Verilog designs. Every Verilog design is made up of one or more modules, which may represent anything from a simple gate to a full processor . You can instantiate a module inside another module, creating a design hierarchy. Example: A half adder can be one module. A full adder can be built by instantiating two half adders. An adder array can be built by instantiating multiple full adders. This modular approach keeps designs clean and scalable. Ports – Communicating with the ...