sonar/interfaces/axi4_stream.py
def file_to_stream(
        self, thread, filepath, parsing_func=None, endian="little"
    ):
        """
        Converts the provided file into a series of AXI4Stream transactions.

        Args:
            thread (Thread): Thread to stream the file in
            filepath (str): Path to the file to stream
            parsing_func (Func, optional): Defaults to None. Function that
                determines how the file is parsed. Must return a list of dicts
                representing valid AXI4Stream transactions. The default function
                assumes a binary file containing only tdata
            endian (str, optional): Defaults to 'little'. Must be little|big

        Returns:
            dict: Dictionary representing the data transaction
        """

        with open(filepath) as f:
            data = f.read()
        self.data_to_stream(thread, data, parsing_func, endian)

        Converts the provided file into a series of AXI4Stream transactions.

        Args:
            thread (Thread): Thread to stream the file in
            filepath (str): Path to the file to stream
            parsing_func (Func, optional): Defaults to None. Function that
                determines how the file is parsed. Must return a list of dicts
                representing valid AXI4Stream transactions. The default function
                assumes a binary file containing only tdata
            endian (str, optional): Defaults to 'little'. Must be little|big

        Returns:
            dict: Dictionary representing the data transaction
        
Converts the provided file into a series of AXI4Stream transactions.
Converts the provided file into a series of AXI4Stream transactions .
def file_to_stream(
        self, thread, filepath, parsing_func=None, endian="little"
    ):
        with open(filepath) as f:
            data = f.read()
        self.data_to_stream(thread, data, parsing_func, endian)
def file_to_stream ( self , thread , filepath , parsing_func = None , endian = "little" ) : with open ( filepath ) as f : data = f . read ( ) self . data_to_stream ( thread , data , parsing_func , endian )
Converts the provided file into a series of AXI4Stream transactions.
Converts the provided file into a series of AXI4Stream transactions .
"""
        Converts the provided file into a series of AXI4Stream transactions.

        Args:
            thread (Thread): Thread to stream the file in
            filepath (str): Path to the file to stream
            parsing_func (Func, optional): Defaults to None. Function that
                determines how the file is parsed. Must return a list of dicts
                representing valid AXI4Stream transactions. The default function
                assumes a binary file containing only tdata
            endian (str, optional): Defaults to 'little'. Must be little|big

        Returns:
            dict: Dictionary representing the data transaction
        """
Dictionary representing the data transaction
Dictionary representing the data transaction
dict
self
thread
Thread to stream the file in
Thread to stream the file in
filepath
Path to the file to stream
Path to the file to stream
parsing_func
Defaults to None. Function that
determines how the file is parsed. Must return a list of dicts
representing valid AXI4Stream transactions. The default function
assumes a binary file containing only tdata
Defaults to None . Function that determines how the file is parsed . Must return a list of dicts representing valid AXI4Stream transactions . The default function assumes a binary file containing only tdata
endian
Defaults to 'little'. Must be little|big
Defaults to ' little ' . Must be little|big