Hi Eros,
I understand that you want to implement a Photonic Circuit with several blocks. Here are some resources for you to leverage:
1) MatlabGDSPhotonicsToolbox: A library of functions to facilitate the design of Photonics Integrated Circuits GDS layouts. It offers the following:
- A PDF presentation for a smooth hands-on.
- Tutorial projects displaying all the features offered.
- Check out the ‘Reviews’ and the ‘Discussions’ page in the above link, to solve some common errors faced by others.
2) Additionally, you may use ‘SIMULINK‘ if you are looking for a model-based design approach. However, if your workflow requires you to code some functionality, SIMULINK also offers ‘Function Block’ to implement MATLAB functions in a SIMULINK Model.