From b22de92414d64e5d959c2418945693ad067bab54 Mon Sep 17 00:00:00 2001 From: Kia <kia@special-circumstanc.es> Date: Thu, 30 Apr 2020 12:33:52 -0600 Subject: [PATCH] renames for the double-stack --- combinatorial_LR_parser.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/combinatorial_LR_parser.py b/combinatorial_LR_parser.py index b6e3709..7337b56 100644 --- a/combinatorial_LR_parser.py +++ b/combinatorial_LR_parser.py @@ -653,8 +653,8 @@ class MasterStateMachine(Elaboratable): m.d.comb += rex.match_index_in.eq(rule_matcher.match_index_out) - m.d.comb += rule_matcher.occupancy_bitmap_in.eq(stack.occupancy_bitmap) - for idx, x in enumerate(stack.perm_out): + m.d.comb += rule_matcher.occupancy_bitmap_in.eq(doublestacks.occupancy_bitmap) + for idx, x in enumerate(doublestacks.bigperm_out): m.d.comb += rule_matcher.stack_view_in[idx].eq(x) m.d.comb += rex.stack_view_in[idx].eq(x) @@ -677,9 +677,9 @@ class MasterStateMachine(Elaboratable): with m.State("INITIALIZE"): m.next = "SHIFTREDUCE" m.d.comb += fsm_ready.eq(0) - m.d.comb += stack.command_in_strobe.eq(1) - m.d.comb += stack.push_port.eq(0x5a00) - m.d.comb += stack.command_in.eq(2) + m.d.comb += doublestacks.command_in_strobe.eq(1) + m.d.comb += doublestacks.big_push_port.eq(0x5a00) + m.d.comb += doublestacks.command_in.eq(2) with m.State("SHIFTREDUCE"): @@ -687,23 +687,23 @@ class MasterStateMachine(Elaboratable): with m.If(rule_matcher.internal_fault == 1): m.next = "ABORT" m.d.comb += fsm_ready.eq(0) - m.d.comb += stack.command_in_strobe.eq(0) + m.d.comb += doublestacks.command_in_strobe.eq(0) with m.If(rule_matcher.invalid_item == 1): m.next = "ABORT" m.d.comb += fsm_ready.eq(0) - m.d.comb += stack.command_in_strobe.eq(0) + m.d.comb += doublestacks.command_in_strobe.eq(0) with m.If(rule_matcher.force_shift == 1): - m.d.comb += stack.command_in.eq(2) - m.d.comb += stack.command_in_strobe.eq(1) - m.d.comb += stack.push_port.eq(new_item) + m.d.comb += doublestacks.command_in.eq(2) + m.d.comb += doublestacks.command_in_strobe.eq(1) + m.d.comb += doublestacks.big_push_port.eq(new_item) m.d.comb += fsm_ready.eq(1) with m.If((rule_matcher.force_shift == 0) & (rule_matcher.match_index_out == 0)): m.next = "ABORT" m.d.comb += fsm_ready.eq(0) - m.d.comb += stack.command_in_strobe.eq(0) + m.d.comb += doublestacks.command_in_strobe.eq(0) with m.If(rule_matcher.match_index_out != 0): m.next = "REDUCE" @@ -714,8 +714,8 @@ class MasterStateMachine(Elaboratable): m.d.sync += number_to_pop.eq(rex.number_to_pop - 1) m.d.sync += execution_result.eq(rex.created_item) with m.If(rex.number_to_pop != 0): - m.d.comb += stack.command_in.eq(1) - m.d.comb += stack.command_in_strobe.eq(1) + m.d.comb += doublestacks.command_in.eq(1) + m.d.comb += doublestacks.command_in_strobe.eq(1) with m.If(rule_matcher.endofparse_reached == 1): m.next = "SUCCESS" @@ -734,20 +734,20 @@ class MasterStateMachine(Elaboratable): # FIXME XXX make this into an FSM with m.If(number_to_pop != 0): - m.d.comb += stack.command_in.eq(1) - m.d.comb += stack.command_in_strobe.eq(1) + m.d.comb += doublestacks.command_in.eq(1) + m.d.comb += doublestacks.command_in_strobe.eq(1) m.d.sync += number_to_pop.eq(number_to_pop - 1) with m.If(number_to_pop == 0): - m.d.comb += stack.command_in.eq(2) - m.d.comb += stack.push_port.eq(execution_result) - m.d.comb += stack.command_in_strobe.eq(1) + m.d.comb += doublestacks.command_in.eq(2) + m.d.comb += doublestacks.big_push_port.eq(execution_result) + m.d.comb += doublestacks.command_in_strobe.eq(1) # m.d.comb += fsm_ready.eq(1) m.next = "SHIFTREDUCE" with m.State("ABORT"): m.d.comb += fsm_ready.eq(0) - m.d.comb += stack.command_in_strobe.eq(0) + m.d.comb += doublestacks.command_in_strobe.eq(0) m.d.comb += self.internal_fault.eq(1) m.d.comb += self.parse_success_out.eq(0) -- GitLab