HDL2Chips

Interactive Hardware Design Platform

LOADING...
Initializing HDL workspace...

Master Verilog & SV

HDL2Chips is the premier interview prep platform for hardware engineers. Solve industry-standard FPGA and ASIC design problems.

Interactive Preview

Experience our Pro IDE

top.v
LIVE

D Flip-Flop

Medium
top d clk q

Problem Statement

Build a module that captures the sensor value at the clock tick and holds it until the next tick. When the clock rises, q takes d. Between ticks, q stays unchanged.

Input/Output Examples:
clk=0, d=0 -> q=0
clk=0, d=1 -> q=0 (mid-cycle change ignored)
clk=↑, d=1 -> q=1
clk=0, d=0 -> q=1 (still holds)

Constraints

  • Module name: top
  • Inputs: clk, d (1-bit each)
  • Output: q (1-bit)
  • Use always @(posedge clk)
  • Use non-blocking assignment (<=)
Execution Output
Console ready. Click Run or Submit to see outputs...
Cursor: 0 ns
SIGNAL VALUE
clk 0
d 0
q 1

No Waveform Yet

Click ▶ Run to compile your code
and generate the signal waveform.

Verilog
123456789
module top (
    input  clk,
    input  d,
    output reg q
);

    // Write code here...

endmodule
TESTIMONIALS

What engineers say about HDL2Chips

★★★★★

"The Fundamentals of Verilog course was very helpful and easy to understand. The explanations, examples, and exercises made learning Verilog and FSM design much easier. I especially liked the hands-on coding practice."

Dinesh Gujjula Mohan Babu University
★★★★★

"Completed 30 problems focusing on core Verilog and digital logic concepts. This practice strengthened my understanding of how digital circuits are described using HDL and improved my RTL design thinking."

Omkar Jadhav Vishwakarma Institute of Technology
★★★★★

"Successfully completed the HDL2Chips Logic Design Program with 200+ Verilog problems. The hands-on approach significantly strengthened my understanding of RTL design principles and digital system design."

Tirumala Maddasani SRKR Engineering College
★★★★★

"Successfully completed all 130 problems in the Basic Logic Gates track. The hands-on practice strengthened my foundation in Verilog and sharpened my understanding of Boolean logic and HDL coding."

Vignesh N St. Joseph's Institute of Technology
★★★★★

"The concepts were explained clearly with relevant examples, making it easier to understand and apply. The hands-on exercises helped reinforce learning effectively."

S
Srinitha Chittaboina
★★★★★

"It has been very helpful for me to improve my syntax and debugging skills. Thank you for creating such a useful platform!"

P
Praveen Kumar Yadav Rajkiya Engineering College, Sonbhadra
★★★★★

"I liked the way it explained each concept before the problem. Keynotes helped me revise a few concepts. I will definitely recommend this to my juniors."

D
Dousik
★★★★★

"The UI is absolutely good and the quality of this platform is at its peak."

C
Chandrasekhar
★★★★★

"I learned the proper basics and advanced level in Verilog, and also learned how to analyze waveforms effectively."

T
Tulam Shanmukha
★★★★★

"Very helpful. Thanks for providing this at free of cost."

N
Naveen Kumar Pamisetty
★★★★☆

"The one and only web for mastering Verilog."

A
Abhilash Kumar Reddy
WHY HDL2CHIPS

Master the skills for top-tier hardware roles.

Interactive Waveforms

High-contrast, zoomable signal viewing—just like industry-standard logic analyzers.

Split-Pane IDE

A pro-grade 3-pane IDE: Detailed Specs | Smart Editor | Simulation Console.

Instant Verification

Lightning-fast simulation with real-time pass/fail feedback and success animations.

Career Path Ranks

Progress from Trainee to Silicon Master through our comprehensive 10-level hardware curriculum.

Global Leaderboard

Compete with a global community of engineers and track your standing in real-time.

Activity Heatmap

Visualize your consistency and dedication with our GitHub-style practice tracker.