From d615168af91c03ba45114e356432d88b20efed2b Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Fri, 15 May 2020 15:04:22 -0400 Subject: [PATCH] Begin implementing conditional branch --- src/soc/branch/main_stage.py | 19 +++++++++++++++++-- src/soc/branch/test/test_pipe_caller.py | 15 +++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/soc/branch/main_stage.py b/src/soc/branch/main_stage.py index 9bb4b2b5..4e98aff2 100644 --- a/src/soc/branch/main_stage.py +++ b/src/soc/branch/main_stage.py @@ -64,8 +64,15 @@ class BranchMainStage(PipeModBase): bi = Signal(b_fields['BI'][0:-1].shape()) comb += bi.eq(b_fields['BI'][0:-1]) + # The bit of CR selected by BI cr_bit = Signal(reset_less=True) - comb += cr_bit.eq((self.i.cr & (1<