Browse Source

Modify in_bits to check in_valid before accessing

Signed-off-by: Abraham Gonzalez <abe.j.gonza@gmail.com>
pull/2228/head
Abraham Gonzalez 2 months ago
committed by GitHub
parent
commit
78762796e8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fesvr/tsi.h

2
fesvr/tsi.h

@ -26,8 +26,8 @@ class tsi_t : public htif_t
uint32_t recv_word();
void switch_to_host();
uint32_t in_bits() { return in_data.front(); }
bool in_valid() { return !in_data.empty(); }
uint32_t in_bits() { return in_valid() ? in_data.front() : 0; }
bool out_ready() { return true; }
void tick(bool out_valid, uint32_t out_bits, bool in_ready);

Loading…
Cancel
Save