BHE3233 Digital Systems Design – Week 6 – Running LED, Switch & Testbench Simulation

This week, students in the BHE3233: Hardware Description Language course took on three lab activities using the Altera DE10-Lite FPGA board. These labs were designed to deepen their understanding of digital logic design, from real hardware control to simulation-level debugging using testbenches.

Lab 1 Recap: LED Blinking with Verilog

Students developed a Verilog module to blink the 10 onboard LEDs one at a time in sequence, based on a timing counter. The project introduced:

  • always @(posedge clk)

  • Counter logic for delay generation

  • reg and assign statements for driving output

  • Pin assignment in Quartus

 

Lab 2 Recap: Real-Time LED Control Using Slider Switches

Students mapped the 10 slider switches directly to the 10 LEDs using basic combinational logic. This hands-on activity helped reinforce:

  • Use of continuous assignment (assign)

  • Bit-wise mapping between inputs and outputs

  • How to apply pin mapping in Quartus for SW[9:0] and LED[9:0]

Lab 3 Preview: Writing a Testbench & Understanding Timing Diagrams

To develop a testbench for both Lab 1 (LED Blinking) and Lab 2 (Switch to LED) designs, simulate the behavior using ModelSim, and interpret the timing diagram (waveform) to verify correct functionality.

  1. ModelSim (Intel FPGA Edition) for running simulations

  2. Waveform viewer for analyzing signal transitions over time

To Do

  1. Create a Testbench File for Each Design

    • Instantiate the DUT (Design Under Test)

    • Simulate clk signal (for Lab 1)

    • Apply appropriate test vectors (SW[9:0]) for Lab 2

  2. Run Simulation

    • Launch ModelSim from Quartus

    • Compile and simulate the testbench

    • Observe and save waveform output

  3. Analyze the Timing Diagram

    • For Lab 1: Check the blinking behavior of LED[current_led]

    • For Lab 2: Confirm that LED outputs match the SW inputs at each simulation step

Learning Outcome:

Students will visually interpret digital signal transitions through the waveform viewer in ModelSim, reinforcing:

    1. Propagation delay

    2. Clock edge behavior

    3. Signal assertion and response timing


CO1 Learning Outcome in Practice:

Apply Hardware Description Languages (HDL) to design, simulate, and verify digital circuits at the Register Transfer Level (RTL).

Lab 3 bridges the gap between coding and functional verification. Students now understand how simulation helps confirm logic correctness before moving to hardware.

What’s Next?

Next week, you will begin working on combinational building blocks like adders and multipliers, then explore state machines and RTL synthesis in depth.

and Midterm Test  🙂

Arduino Programming 2024/8 – UMPSA Year 1 (AI Assisted)

Synopsis on AI Assisted Learning @UMPSA STEM Lab module.

Today’s session involves interactive session for 32 first-year Electrical & Electronics Engineering students. These students, in their very first semester, were taking their initial steps into the world of computer programming and physical computing. Despite having no prior experience, they embarked on a journey that introduced them to the power and potential of AI-assisted learning.

The session was designed with a clear objective to demystify the basics of Arduino programming and physical computing while leveraging AI tools to make the learning process more intuitive and accessible. For many of these students, this was their first exposure to the intricacies of coding and the fascinating world of microcontrollers. The use of AI in the learning process provided a significant boost, enabling them to grasp complex concepts more easily and with greater confidence.

The essence of the session was a series of six hands-on activities, each carefully crafted to build upon the previous one, ensuring a gradual yet comprehensive learning experience. These activities were designed not only to teach the basics of programming and electronics but also to illustrate how AI can be a valuable ally in the learning process.

During the session, students were introduced to the Arduino platform, gaining a solid understanding of its components and the vast potential it holds for creating interactive projects. This foundational knowledge was crucial as it set the stage for the more complex tasks that followed. Leveraging AI tools like ChatGPT, students witnessed firsthand how AI could assist in generating and debugging code, making the learning process more efficient. This activity demonstrated the practical benefits of AI, especially in reducing the learning curve for beginners.

As they progressed, the students engaged in the classic “Hello World” of Arduino by writing simple code to control an LED, an experience that built their confidence and deepened their understanding of digital outputs. The next step in their learning journey was the traffic light simulation project, where they applied control structures to manage multiple outputs. This project not only taught them the intricacies of timing and logic but also encouraged them to think critically about how these elements interact in real-world applications.

Further advancing their skills, the students used AI-generated code to integrate sensors like photoresistors into their projects, introducing them to the world of analog inputs and sensor data processing. The session culminated in an activity where they used an ultrasonic sensor to measure distance, with real-time results displayed, helping them grasp the concepts of pulse measurement and the practical application of their coding skills in tangible, real-world scenarios.

To all RE students, nice meeting you and hope to see you again in the future.

Nurul – August 17th