From: Luke Kenneth Casson Leighton Date: Sat, 4 May 2019 06:28:29 +0000 (+0100) Subject: add function unit picker vector X-Git-Tag: ls180-24jan2020~1037 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5915b43f49e91c6cb55ec5a0274ff2f9db12a031;p=ieee754fpu.git add function unit picker vector --- diff --git a/src/scoreboard/fu_picker_vec.py b/src/scoreboard/fu_picker_vec.py new file mode 100644 index 00000000..fd44c45f --- /dev/null +++ b/src/scoreboard/fu_picker_vec.py @@ -0,0 +1,21 @@ +from nmigen import Elaboratable, Module, Signal, Cat + + +class FU_Pick_Vec(Elaboratable): + """ these are allocated per-FU (horizontally), + and are of length fu_row_n + """ + def __init__(self, fu_row_n): + self.fu_row_n = fu_row_n + self.rd_pend_i = Signal(fu_row_n, reset_less=True) + self.wr_pend_i = Signal(fu_row_n, reset_less=True) + + self.readable_o = Signal(reset_less=True) + self.writable_o = Signal(reset_less=True) + + def elaborate(self, platform): + m = Module() + m.d.comb += self.readable_o.eq(self.rd_pend_i.bool()) + m.d.comb += self.writable_o.eq(self.wr_pend_i.bool()) + return m + diff --git a/src/scoreboard/fu_reg_matrix.py b/src/scoreboard/fu_reg_matrix.py index efec9d6a..c21cf34e 100644 --- a/src/scoreboard/fu_reg_matrix.py +++ b/src/scoreboard/fu_reg_matrix.py @@ -159,7 +159,7 @@ class FURegDepMatrix(Elaboratable): ] # --- - # connect Dependency Matrix go_read_i/go_write_i to module gr/gw + # connect Dependency Matrix go_read_i/go_write_i to module go_rd/go_wr # --- for fu in range(self.n_fu_row): fup = fupend[fu]