Bench: Diffusion Layer#
This module contains the documentation for the diffusion layer model and testbench.
Diffusion Layer Model#
diffusion_layer_model.py#
Library for the DiffusionLayerModel class.
It contains the Python model used to verify the Diffusion Layer module.
@author: Timothée Charrier
- class diffusion_layer_model.DiffusionLayerModel[source]#
Model for the Diffusion Layer module.
This class defines the model used to verify the Diffusion Layer module.
Methods
assert_output
(dut[, state])Assert the output of the DUT and log the input and output values.
rotate_right
(value, num_bits)Rotate the bits of a 64-bit integer to the right.
Test Diffusion Layer#
test_diffusion_layer.py#
Testbench for the Diffusion Layer module.
This module tests the Diffusion Layer module by comparing the output of the Python implementation with the VHDL implementation.
@author: Timothée Charrier
- async test_diffusion_layer.diffusion_layer_test(dut: HierarchyObject) None [source]#
Test the Diffusion Layer module.
- Parameters:
dut (HierarchyObject) – The device under test (DUT).
- Raises:
RuntimeError – If the DUT fails to compute the correct output.
- async test_diffusion_layer.initialize_dut(dut: HierarchyObject, inputs: dict) None [source]#
Initialize the DUT with the given inputs.
- Parameters:
dut (HierarchyObject) – The device under test (DUT).
inputs (dict) – The input dictionary.