Course: Tcl scripting for FPGA engineers

$59

Learn the quirks of the Tool Command Language (Tcl) and see how to create a GUI widget for controlling a VHDL testbench in Questa/ModelSim.

Category: Tags: , ,

Description

The Tool Command Language (Tcl) is the scripting language that goes hand in hand with VHDL. That’s because most FPGA software tools use this language. For example, Vivado, Quartus, Questa, and ModelSim.

You can create powerful scripts for any of these tools when you know Tcl. But Tcl isn’t like other programming languages. A major point of confusion for new learners is that everything is a string in Tcl, and I will explain what that means in the first lessons.

If you already know Tcl, there are still many things you can take away from this course. For example, the details of how namespaces, variable scopes, and classes work.

Finally, we will use Tcl to create a GUI widget for Questa/ModelSim. And you will see how we can interact with VHDL simulations and visualize the state of the DUT using Tcl as a front-end.

View the video above to see a preview of some of the lessons!

This course is also available in the VHDLwhiz Membership.

The difference is that when you purchase this product, you get permanent access to the course, while the membership charges a monthly fee to access the content.

Software used in the course

I’m using the built-in Tcl shell of the Questa VHDL simulator in the course. The required software is available for free for Windows and Linux:

Course outline

Number of lessons:
18
Average video duration:
11m28s
Total video duration:
3h23m

The overview below shows the lessons you can access after purchasing this course.

video lesson icon/default Created with Sketch.

1 - Why Tcl?

What's Tcl, and what can you gain from learning it?

video lesson icon/default Created with Sketch.

2 - Tcl shells and documentation

Here's how to start coding Tcl with the FPGA tools you already have installed.

video lesson icon/default Created with Sketch.

3 - Everything is a string

In Tcl, every object's name and value is a string.

video lesson icon/default Created with Sketch.

4 - Variables

This is how variable substitution works in Tcl.

video lesson icon/default Created with Sketch.

5 - Namespaces

Use namespaces and the variable keyword to avoid overwriting global variables.

video lesson icon/default Created with Sketch.

6 - Lists

The Tcl list is a versatile data structure for storing objects.

video lesson icon/default Created with Sketch.

7 - Arrays

Arrays in Tcl are hash maps that store key/value pairs.

video lesson icon/default Created with Sketch.

8 - Loops

Let's look at the different loops that Tcl has to offer.

video lesson icon/default Created with Sketch.

9 - Conditional expressions

Learn about Boolean values, If-Then-Elseif-Else, and the Switch statement.

video lesson icon/default Created with Sketch.

10 - Procedures

Learn about Tcl's subprograms and how they relate to global and namespace variables.

video lesson icon/default Created with Sketch.

11 - Classes

It's time to explore Tcl's object-oriented features.

video lesson icon/default Created with Sketch.

12 - GUI: Tcl/Tk in Questa/ModelSim

We'll create a GUI to control and visualize a VHDL testbench.

video lesson icon/default Created with Sketch.

13 - GUI: Layout of the widget

The geometry manager controls the sub-widget positions and appearances.

video lesson icon/default Created with Sketch.

14 - GUI: Interacting with the simulation

You can read VHDL signals and control the simulation using Tcl in Questa.

video lesson icon/default Created with Sketch.

15 - GUI: Tcl callbacks using "when"

Questa's when command can run your Tcl code based on VHDL signal events.

video lesson icon/default Created with Sketch.

16 - GUI: Start and Quit buttons

The buttons will trigger procedure calls when clicked.

video lesson icon/default Created with Sketch.

17 - GUI: Compile and Open Waveform buttons

We can control the ModelSim GUI with Tcl commands and from our widget.

video lesson icon/default Created with Sketch.

18 - GUI: The Run buttons

See how to start and stop the simulation at predefined DUT states.

Reviews

There are no reviews yet.

Be the first to review “Course: Tcl scripting for FPGA engineers”

Your email address will not be published. Required fields are marked *