Skip to content

Commit 58c5f2e

Browse files
committed
Merge branch 'valek-feat-mfb_gen_status_reg_ext' into 'devel'
feat(mfb-generator-mi32): add DST_RDY to status signals See merge request ndk/ndk-fpga!324
2 parents 652a8bb + 2631065 commit 58c5f2e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

comp/mfb_tools/debug/generator/mfb_generator_mi32.vhd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ begin
334334
MI_DRD <= (others => '0');
335335
case (MI_ADDR(6-1 downto 0)) is
336336
when "000000" => MI_DRD(0) <= en_reg;
337-
MI_DRD(1) <= TX_MFB_SRC_RDY; -- read only busy bit
337+
MI_DRD(1) <= TX_MFB_SRC_RDY; -- read only busy bit
338+
MI_DRD(2) <= TX_MFB_DST_RDY; -- read only busy bit
338339
MI_DRD(4) <= clr_reg;
339340
when "000100" => MI_DRD(LENGTH_WIDTH-1 downto 0) <= len_reg;
340341
when "001000" => MI_DRD <= chan_inc_reg;

python/ofm/ofm/comp/mfb_tools/debug/generator/mfb_generator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ def generating(self) -> bool:
7676
"""
7777
return self._comp.get_bit(self._REG_CONTROL, 1)
7878

79+
@property
80+
def stalled(self) -> bool:
81+
"""MFB transmission is blocked.
82+
83+
This returns true if there are valid data (i.e. SRC_RDY is set) but
84+
receiver is not able to accept them (i.e. DST_RDY is cleared).
85+
"""
86+
return self.generating and not self._comp.get_bit(self._REG_CONTROL, 2)
87+
7988
def clear(self):
8089
"""Clear packet counters."""
8190
self._comp.set_bit(self._REG_CONTROL, 4)

0 commit comments

Comments
 (0)