Skip to content
Snippets Groups Projects
Closed Fix unfolding
  • View options
  • Fix unfolding

  • View options
  • Closed Issue created by Oscar Gustafsson
    from b_asic.sfg_generators import direct_form_fir
    
    # Works, the test example, more or less
    sfg = direct_form_fir([0.4, 0.3])
    sfg.unfold(2)
    
    # Does not work
    sfg = direct_form_fir([0.4, 0.3, 0.2])
    sfg.unfold(2)

    leads to

    Traceback (most recent call last):
    
      Cell In[26], line 1
        sfg.unfold(2)
    
      File /git/B-ASIC/b_asic/signal_flow_graph.py:1536 in unfold
        return SFG(inputs=all_inputs, outputs=all_outputs)
    
      File /git/B-ASIC/b_asic/signal_flow_graph.py:264 in __init__
        self._add_operation_connected_tree_copy(
    
      File /git/B-ASIC/b_asic/signal_flow_graph.py:1067 in _add_operation_connected_tree_copy
        raise ValueError("Unconnected input port in SFG")
    
    ValueError: Unconnected input port in SFG

    A guess is that it is related to several delay elements in sequence as

    from b_asic.sfg_generators import transposed_direct_form_fir
    
    sfg = transposed_direct_form_fir([0.4, 0.3, 0.2])
    sfg.unfold(2)

    works

    Edited by Oscar Gustafsson

    Linked items 0

  • Link items together to show that they're related or that one is blocking others.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading