piel.integration.amaranth_cocotb
================================

.. py:module:: piel.integration.amaranth_cocotb


Functions
---------

.. autoapisummary::

   piel.integration.amaranth_cocotb.create_cocotb_truth_table_verification_python_script


Module Contents
---------------

.. py:function:: create_cocotb_truth_table_verification_python_script(module: piel.types.PathTypes, truth_table: piel.types.digital.TruthTable, test_python_module_name: str = 'top_test')

   Creates a cocotb test script for verifying logic defined by the truth table.

   :param module: The path to the module where the test script will be placed.
   :type module: PathTypes
   :param truth_table: A dictionary representing the truth table.
   :type truth_table: TruthTable
   :param test_python_module_name: The name of the test python module. Defaults to "top_test".
   :type test_python_module_name: str, optional

   .. rubric:: Example

   truth_table = {
       "A": [0, 0, 1, 1],
       "B": [0, 1, 0, 1],
       "X": [0, 1, 1, 0]  # Expected output (for XOR logic, as an example)
   }
   create_cocotb_truth_table_verification_python_script(truth_table)


