From bf516a927db6a4f30d1fea56a83b22265568e713 Mon Sep 17 00:00:00 2001 From: Sam Crow Date: Tue, 13 Jun 2023 13:44:32 -0700 Subject: [PATCH] add skeleton for delay chain sizing --- compiler/modules/control_logic_delay.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/compiler/modules/control_logic_delay.py b/compiler/modules/control_logic_delay.py index 09b0bf37..49d91d3b 100644 --- a/compiler/modules/control_logic_delay.py +++ b/compiler/modules/control_logic_delay.py @@ -99,12 +99,16 @@ class control_logic_delay(control_logic_base): self.nand2 = factory.create(module_type="pnand2", height=dff_height) - # TODO: is this needed? Should this be used or inferred from the pinout_list? - debug.check(OPTS.delay_chain_stages % 2, - "Must use odd number of delay chain stages for inverting delay chain.") + self.calculate_delay_chain_size() self.delay_chain = factory.create(module_type="multi_delay_chain", - fanout_list=29 * [OPTS.delay_chain_fanout_per_stage], # TODO: generate this programatically - pinout_list=[2, 12, 13, 15, 29]) # TODO: generate this list programatically + fanout_list=self.delay_chain_fanout_list, + pinout_list=self.delay_chain_pinout_list) + + def calculate_delay_chain_size(self): + self.delay_chain_pinout_list = [] + # calculate it... dummy values for now + self.delay_chain_pinout_list = [2, 12, 13, 15, 29] + self.delay_chain_fanout_list = self.delay_chain_pinout_list[-1] * [OPTS.delay_chain_fanout_per_stage] def setup_signal_busses(self): """ Setup bus names, determine the size of the busses etc """