From 5915b43f49e91c6cb55ec5a0274ff2f9db12a031 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 4 May 2019 07:28:29 +0100 Subject: [PATCH] add function unit picker vector --- src/scoreboard/fu_picker_vec.py | 21 +++++++++++++++++++++ src/scoreboard/fu_reg_matrix.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/scoreboard/fu_picker_vec.py 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] -- 2.30.2