From 7fc6574c19c4dd8ce2dac41b3793ee4667182edc Mon Sep 17 00:00:00 2001 From: Kia <kia@special-circumstanc.es> Date: Thu, 22 Apr 2021 10:31:30 -0600 Subject: [PATCH] remove command_width as parameter --- unoptimized_lr/simple_lr_stack.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/unoptimized_lr/simple_lr_stack.py b/unoptimized_lr/simple_lr_stack.py index 976b296..577a500 100644 --- a/unoptimized_lr/simple_lr_stack.py +++ b/unoptimized_lr/simple_lr_stack.py @@ -10,7 +10,8 @@ from skidbuffer import RegisteredSkidBuffer class StackLayout(Layout): - def __init__(self, *, data_width, index_width, command_width): + def __init__(self, *, data_width, index_width): + command_width = 3 super().__init__([ # INPUTS ("command_in", unsigned(command_width)), # FROM SOURCE @@ -29,8 +30,8 @@ class StackLayout(Layout): ]) class StackBus(Record): - def __init__(self, *, data_width, index_width, command_width): - super().__init__(StackLayout(data_width=data_width, index_width=index_width, command_width=command_width)) + def __init__(self, *, data_width, index_width): + super().__init__(StackLayout(data_width=data_width, index_width=index_width)) class Stack(Elaboratable): PUSH = 0 @@ -61,7 +62,7 @@ class Stack(Elaboratable): # read stack pointer outputs the stack pointer on the aux port dummy_index = Signal(range(depth)) - self.bus = StackBus(data_width = width, index_width=len(dummy_index), command_width=3) + self.bus = StackBus(data_width = width, index_width=len(dummy_index)) self.mem = Memory(width=self.width, depth=self.depth) -- GitLab