From: Luke Kenneth Casson Leighton Date: Tue, 9 Jun 2020 10:50:51 +0000 (+0100) Subject: map LDST len directly, rather than go through a switch statement X-Git-Tag: div_pipeline~455 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2ddc0a7c5d1063d0456211b13688e32ecd55f06;p=soc.git map LDST len directly, rather than go through a switch statement --- diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 7cb353b7..9ff553fa 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -589,16 +589,6 @@ class PowerDecode2(Elaboratable): comb += dec_cr_out.sel_in.eq(op.cr_out) comb += dec_cr_out.rc_in.eq(dec_rc.rc_out.data) - # decode LD/ST length - with m.Switch(op.ldst_len): - with m.Case(LdstLen.is1B): - comb += e.data_len.eq(1) - with m.Case(LdstLen.is2B): - comb += e.data_len.eq(2) - with m.Case(LdstLen.is4B): - comb += e.data_len.eq(4) - with m.Case(LdstLen.is8B): - comb += e.data_len.eq(8) comb += e.nia.eq(0) # XXX TODO (or remove? not sure yet) fu = op.function_unit @@ -638,6 +628,7 @@ class PowerDecode2(Elaboratable): comb += e.write_cr_whole.eq(dec_cr_out.whole_reg) # decoded/selected instruction flags + comb += e.data_len.eq(op.ldst_len) comb += e.invert_a.eq(op.inv_a) comb += e.invert_out.eq(op.inv_out) comb += e.input_carry.eq(op.cry_in) # carry comes in diff --git a/src/soc/decoder/power_enums.py b/src/soc/decoder/power_enums.py index cdf5c591..9170359f 100644 --- a/src/soc/decoder/power_enums.py +++ b/src/soc/decoder/power_enums.py @@ -212,8 +212,8 @@ class LdstLen(Enum): NONE = 0 is1B = 1 is2B = 2 - is4B = 3 - is8B = 4 + is4B = 4 + is8B = 8 @unique