Skip to content

Conversation

@zkwinkle
Copy link
Collaborator

This commit implements a CLI in the __main.py__ file to interface with the tool, it provides 2 subcommands:

  • run: Executes one of the tool's ALS methods.
  • generate: Generates a dataset for simulation or training during ALS.

In order to support this CLI the following files were added:

  • configuration.py: Contains a configuration object that validates parameter for execution of an ALS method.
  • runner.py: Provides the run method to execute an ALS method based on configuration.
    • Each ALS method provided by AxLS has a corresponding function the runner.py file with the basic logic for that method's execution.
    • Future methods added to the tool should be supported by this runner and added to the possible configurations in configuration.py and to the CLI options in __main__.py.

These files also provide an API for simplified execution of the tool without having to mess around with each ALS method's API specifically.

Since this commit adds a CLI, a configuration object and a runner function, the following files were deleted:

  • poisonoak.config: Unused file meant to be used for configuration in the future. Removed in favor of configuration.py for API usage or configuration flags in the CLI.
  • poisonoak.help: Unused file meant to hold the CLI's help message in the future. Removed in favor of using the fully fledged CLI library argparse which aids in auto-generating a help message.
  • barcas.py: Unused and out of date InOuts implementation. Removed because it didn't have a purpose. If users of the tool want to use the InOuts implementation the can use the CLI or simplified API, and if they want an example of how to use InOuts directly as a library they can look at the runner.py file; which has examples for all methods.

Some other miscellaneous changes:

  • Greatly improved the netlist parsing to be able to handle more cases. See netlist.py.
  • Fixed miscellaneous bugs in circuit.py and circuiterror.py.
  • Added a shuffle_bag distribution for dataset generation, useful for generating exhaustive datasets for smaller circuits.
  • Added the generate_saif_from_vcd method to circuit.py to be able to generate SAIF files programmatically through AxLS, though the method can take quite long to execute. It's recommended to re-implement it through a faster language in the future.
  • Improved the uniform dataset distribution generator so that it uses all of a circuit's bits when generating outputs for bigger 64bit and 128 bit circuits. Previously the last 50 bits were always 0.

zkwinkle added 30 commits May 20, 2025 20:50
…nerate the SAIF data from a vcd dump for a circuit
… trained with outputs in different order and also testbench was written with outputs being printed in reverse order for some reason
zkwinkle added 30 commits May 20, 2025 20:50
…ods that resynthesize to properly handle the resynthesized circuit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants