sonar/interfaces/axi4_lite_slave.py
def init_signals(
        self, mode, data_width=None, addr_width=None, upper_case=True
    ):
        """
        Initialize the signals associated with this AXILite interface.
        Initialize means to specify the names, types and widths of all the
        signals.

        Args:
            mode (str): Name of a signal preset to use. Options are:
                'default': standard AXI-Lite without cache or prot
            data_width (number): Width of the data signal (r/w)
            addr_width (number): Width of the addr signal (r/w)
            upper_case (bool, optional): Defaults to True. Assume that
                the signal names are the uppercase versions of their type,
                which is the default for an HLS module. Setting it to False
                sets the name identical to the type (i.e. lowercase)

        Raises:
            NotImplementedError: Unhandled exception if bad mode entered
            ValueError: Error in mode/argument association
        """
        if mode == "default":
            if addr_width < 12:
                addr_width = (
                    12  # Minimum required by AXI standard for 4K memory
                )
            signals = {
                "awvalid": sonar.base_types.Signal("awvalid", 1),
                "awready": sonar.base_types.Signal("awready", 1),
                "awaddr": sonar.base_types.Signal("awaddr", addr_width),
                "wvalid": sonar.base_types.Signal("wvalid", 1),
                "wready": sonar.base_types.Signal("wready", 1),
                "wdata": sonar.base_types.Signal("wdata", data_width),
                "wstrb": sonar.base_types.Signal("wstrb", int(data_width / 8)),
                "arvalid": sonar.base_types.Signal("arvalid", 1),
                "arready": sonar.base_types.Signal("arready", 1),
                "araddr": sonar.base_types.Signal("araddr", addr_width),
                "rvalid": sonar.base_types.Signal("rvalid", 1),
                "rready": sonar.base_types.Signal("rready", 1),
                "rdata": sonar.base_types.Signal("rdata", data_width),
                "rresp": sonar.base_types.Signal("rresp", 2),
                "bvalid": sonar.base_types.Signal("bvalid", 1),
                "bready": sonar.base_types.Signal("bready", 1),
                "bresp": sonar.base_types.Signal("bresp", 2),
            }
        if upper_case:
            signals = base.to_upper_case(signals)
        self.add_signals(signals)

        Initialize the signals associated with this AXILite interface.
        Initialize means to specify the names, types and widths of all the
        signals.

        Args:
            mode (str): Name of a signal preset to use. Options are:
                'default': standard AXI-Lite without cache or prot
            data_width (number): Width of the data signal (r/w)
            addr_width (number): Width of the addr signal (r/w)
            upper_case (bool, optional): Defaults to True. Assume that
                the signal names are the uppercase versions of their type,
                which is the default for an HLS module. Setting it to False
                sets the name identical to the type (i.e. lowercase)

        Raises:
            NotImplementedError: Unhandled exception if bad mode entered
            ValueError: Error in mode/argument association
        
Initialize the signals associated with this AXILite interface.
Initialize means to specify the names, types and widths of all the
signals.
Initialize the signals associated with this AXILite interface . Initialize means to specify the names types and widths of all the signals .
def init_signals(
        self, mode, data_width=None, addr_width=None, upper_case=True
    ):
        if mode == "default":
            if addr_width < 12:
                addr_width = (
                    12  
                )
            signals = {
                "awvalid": sonar.base_types.Signal("awvalid", 1),
                "awready": sonar.base_types.Signal("awready", 1),
                "awaddr": sonar.base_types.Signal("awaddr", addr_width),
                "wvalid": sonar.base_types.Signal("wvalid", 1),
                "wready": sonar.base_types.Signal("wready", 1),
                "wdata": sonar.base_types.Signal("wdata", data_width),
                "wstrb": sonar.base_types.Signal("wstrb", int(data_width / 8)),
                "arvalid": sonar.base_types.Signal("arvalid", 1),
                "arready": sonar.base_types.Signal("arready", 1),
                "araddr": sonar.base_types.Signal("araddr", addr_width),
                "rvalid": sonar.base_types.Signal("rvalid", 1),
                "rready": sonar.base_types.Signal("rready", 1),
                "rdata": sonar.base_types.Signal("rdata", data_width),
                "rresp": sonar.base_types.Signal("rresp", 2),
                "bvalid": sonar.base_types.Signal("bvalid", 1),
                "bready": sonar.base_types.Signal("bready", 1),
                "bresp": sonar.base_types.Signal("bresp", 2),
            }
        if upper_case:
            signals = base.to_upper_case(signals)
        self.add_signals(signals)
def init_signals ( self , mode , data_width = None , addr_width = None , upper_case = True ) : if mode == "default" : if addr_width < 12 : addr_width = ( 12 ) signals = { "awvalid" : sonar . base_types . Signal ( "awvalid" , 1 ) , "awready" : sonar . base_types . Signal ( "awready" , 1 ) , "awaddr" : sonar . base_types . Signal ( "awaddr" , addr_width ) , "wvalid" : sonar . base_types . Signal ( "wvalid" , 1 ) , "wready" : sonar . base_types . Signal ( "wready" , 1 ) , "wdata" : sonar . base_types . Signal ( "wdata" , data_width ) , "wstrb" : sonar . base_types . Signal ( "wstrb" , int ( data_width / 8 ) ) , "arvalid" : sonar . base_types . Signal ( "arvalid" , 1 ) , "arready" : sonar . base_types . Signal ( "arready" , 1 ) , "araddr" : sonar . base_types . Signal ( "araddr" , addr_width ) , "rvalid" : sonar . base_types . Signal ( "rvalid" , 1 ) , "rready" : sonar . base_types . Signal ( "rready" , 1 ) , "rdata" : sonar . base_types . Signal ( "rdata" , data_width ) , "rresp" : sonar . base_types . Signal ( "rresp" , 2 ) , "bvalid" : sonar . base_types . Signal ( "bvalid" , 1 ) , "bready" : sonar . base_types . Signal ( "bready" , 1 ) , "bresp" : sonar . base_types . Signal ( "bresp" , 2 ) , } if upper_case : signals = base . to_upper_case ( signals ) self . add_signals ( signals )
Initialize the signals associated with this AXILite interface.
Initialize the signals associated with this AXILite interface .
"""
        Initialize the signals associated with this AXILite interface.
        Initialize means to specify the names, types and widths of all the
        signals.

        Args:
            mode (str): Name of a signal preset to use. Options are:
                'default': standard AXI-Lite without cache or prot
            data_width (number): Width of the data signal (r/w)
            addr_width (number): Width of the addr signal (r/w)
            upper_case (bool, optional): Defaults to True. Assume that
                the signal names are the uppercase versions of their type,
                which is the default for an HLS module. Setting it to False
                sets the name identical to the type (i.e. lowercase)

        Raises:
            NotImplementedError: Unhandled exception if bad mode entered
            ValueError: Error in mode/argument association
        """ # Minimum required by AXI standard for 4K memory
Unhandled exception if bad mode entered
Unhandled exception if bad mode entered
NotImplementedError
Error in mode/argument association
Error in mode / argument association
ValueError
self
mode
Name of a signal preset to use. Options are:
'default': standard AXI-Lite without cache or prot
Name of a signal preset to use . Options are : ' default ' : standard AXI - Lite without cache or prot
data_width
Width of the data signal (r/w)
Width of the data signal ( r / w )
addr_width
Width of the addr signal (r/w)
Width of the addr signal ( r / w )
upper_case
Defaults to True. Assume that
the signal names are the uppercase versions of their type,
which is the default for an HLS module. Setting it to False
sets the name identical to the type
Defaults to True . Assume that the signal names are the uppercase versions of their type which is the default for an HLS module . Setting it to False sets the name identical to the type