diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-08 00:19:49 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-08 00:19:49 -0600 |
| commit | ac0d6f4e068ff0ff08f05e04053ebd53ba20bcb8 (patch) | |
| tree | 8c2019cb296f94b2fd39894a245a4aac899d2371 /rtl/core/control/branch.sv | |
| parent | 942461c315db3269fcbe9a9ca18beee9afa78d9c (diff) | |
Refactor decode signals into unified insn_decode struct
Diffstat (limited to 'rtl/core/control/branch.sv')
| -rw-r--r-- | rtl/core/control/branch.sv | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/rtl/core/control/branch.sv b/rtl/core/control/branch.sv index 3f8160e..59a4f54 100644 --- a/rtl/core/control/branch.sv +++ b/rtl/core/control/branch.sv @@ -2,24 +2,23 @@ module core_control_branch ( - input logic clk, + input logic clk, - input datapath_decode dec, - input branch_decode dec_branch, + input insn_decode dec, - input ctrl_cycle next_cycle, - input logic issue, - input ptr next_pc_visible, + input ctrl_cycle next_cycle, + input logic issue, + input ptr next_pc_visible, - output logic branch, - output ptr branch_target + output logic branch, + output ptr branch_target ); always_ff @(posedge clk) begin branch <= 0; if(next_cycle == ISSUE && issue) begin - branch <= dec.branch; - branch_target <= next_pc_visible + dec_branch.offset; + branch <= dec.ctrl.branch; + branch_target <= next_pc_visible + dec.branch.offset; end end |
