<commit_before>from hwtLib.amba.axi_comp.builder import AxiBuilder
from hwtLib.mi32.axi4Lite_to_mi32 import Axi4Lite_to_Mi32
from hwtLib.mi32.sliding_window import Mi32SlidingWindow
from hwtLib.mi32.to_axi4Lite import Mi32_to_Axi4Lite
from hwtLib.amba.axi4Lite import Axi4Lite


class _Mi32Buff():
    """Mi32Buff constructor which ignores interface in constructor"""
    def __init__(self, intfCls):
        super(_Mi32Buff, self).__init__()


class Mi32Builder(AxiBuilder):

    BuffCls = _Mi32Buff
    BuffCdcCls = NotImplemented

    def sliding_window(self, window_size: int, new_addr_width: int):
        """
        Instanciate a sliding window with an offset register which allows to virtually
        extend the addressable memory space
        """
        end = self.end
        u = Mi32SlidingWindow()
        u.ADDR_WIDTH = end.ADDR_WIDTH
        u.DATA_WIDTH = end.DATA_WIDTH
        u.WINDOW_SIZE = window_size
        u.M_ADDR_WIDTH = new_addr_width

        setattr(self.parent, self._findSuitableName("mi32_2_axi"), u)<commit_msg>fix Mi32Builder.buff<commit_after>from hwtLib.amba.axi_comp.builder import AxiBuilder
from hwtLib.mi32.axi4Lite_to_mi32 import Axi4Lite_to_Mi32
from hwtLib.mi32.sliding_window import Mi32SlidingWindow
from hwtLib.mi32.to_axi4Lite import Mi32_to_Axi4Lite
from hwtLib.amba.axi4Lite import Axi4Lite
from hwtLib.mi32.buff import Mi32Buff


class _Mi32Buff(Mi32Buff):
    """Mi32Buff constructor which ignores interface in constructor"""
    def __init__(self, intfCls):
        super(_Mi32Buff, self).__init__()


class Mi32Builder(AxiBuilder):

    BuffCls = _Mi32Buff
    BuffCdcCls = NotImplemented

    def sliding_window(self, window_size: int, new_addr_width: int):
        """
        Instanciate a sliding window with an offset register which allows to virtually
        extend the addressable memory space
        """
        end = self.end
        u = Mi32SlidingWindow()
        u.ADDR_WIDTH = end.ADDR_WIDTH
        u.DATA_WIDTH = end.DATA_WIDTH
        u.WINDOW_SIZE = window_size
        u.M_ADDR_WIDTH = new_addr_width

        setattr(self.parent, self._findSuitableName("mi32_2_axi"), u)
{'fraction_non_alphanumeric': 0.07219375873311598, 'fraction_numerical': 0.036329762459245456, 'mean_word_length': 3.5605095541401273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3790209', 'n_tokens_mistral': 767, 'n_tokens_neox': 720, 'n_words': 160}