aalto-ele / bag_ecd

Python class to take care of path and variable setups between userspace and python
Other
2 stars 0 forks source link

WIP: Generator param dev #5

Closed sporrasm closed 3 years ago

sporrasm commented 3 years ago

This is still a work in progress: DO NOT MERGE!

This branch aims to make our generators (or, actually init.py files of each module) more Pythonic.

To-Do:

sporrasm commented 3 years ago

@mkosunen This is now ready for review. Check 'generator_param_dev' branches for IDAC and it's "child" generators (cap_gen and TG) for an example. This branch is directly compatible with old style of generators.

Major changes:

  1. Generator parameters are now stored as generator class properties.
  2. Hierarchical generators support proplist as in the SDK
  3. Generator classes now have documentation (using sphinx)
  4. Modified init_bag_module.sh to reflect new changes
  5. Created conversion script to migrate old generators to new ones with ease.
  6. Minor changes to bag_design class (print_log and param_dump functions + handling of parameters)

Note that this doesn't get rid of dictionaries completely. The layout class still wants dictionaries as input. If we want to change this, I think we need to modify BAG core. Additionally, the parameter definitions can now be taken from a configuration file (e.g. JSON) on the SDK side. This avoids declaring the parameters in the testbench (although this could've been implemented without migrating the parameters to properties).

Nevertheless, the added benefit from properties is better documentation, and I personally believe this to be a good enough justification to move to this convention. I hope you agree.