Overview#

In this tutorial, we’ll walk through how to use some of the key features mentioned, including shortcuts for schematic editing, understanding schematic elements in YAML, and utilizing the file watcher for automatic rebuilds.

1. Schematic in YAML Format#

The schematic of a design can be represented in a human-readable YAML format. Here’s an overview of the key components of a YAML schematic:

  • Instances: These are the individual components or blocks in your design. Each instance represents a unique piece of the system you’re building.

  • Placements: This section defines where each component is placed in the layout. It includes location coordinates and orientations.

  • Connections: This part details how components are connected to each other.

  • Routes: Defines a route between two ports.

  • Ports: These represent the external interfaces of the component. Ports are usually used to interact with other components or systems outside the current design or running simulations.

You can read more about this in GDSFactory documentation.

2. File Watcher: Rebuild and Monitor Errors#

The file watcher is a powerful tool that automatically tracks changes to your files and takes actions such as rebuilding your components and monitoring errors in real-time. This means you don’t need to manually trigger a rebuild every time you make a change; the system takes care of it for you.

How it Works: When you save a file, the file watcher detects the change, rebuilds the component, and reports any errors in real-time.

Example Workflow:

  • You are editing a schematic file.

  • As soon as you save the file, the file watcher kicks in, rebuilding the component.

  • If there are errors, they will be highlighted immediately for you to fix.

Implementation Example:

Benefits:

  • Saves time by automatically rebuilding your code or components on each save.

  • Reduces errors by providing immediate feedback on any issues during the development process.