Bug 359 - cut down on wires between decode and function units
Summary: cut down on wires between decode and function units
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
: 454 (view as bug list)
Depends on:
Blocks: 383
  Show dependency treegraph
 
Reported: 2020-05-31 18:46 BST by Luke Kenneth Casson Leighton
Modified: 2020-09-07 16:14 BST (History)
2 users (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2020-05-31 18:46:17 BST
subsets of decoded instructions are passed to function units.  unfortunately the expansion of wires is vast.

a solution involves passing the instruction to each pipeline and having the *FU* perform the decode... *at the FU*.

to do this, decode2 should take the subset of fields to be decoded, rather than assuming that all fields should always be decoded.

this can be done dynamically.
Comment 1 Luke Kenneth Casson Leighton 2020-07-12 23:14:48 BST
data structure for the static fields has been split out.  registers etc remain in Decode1ToExecuteType.

what is now needed is two things:

1. to be able to specify a row filter function on PowerDecoder.  only the subset of instructions that pass the row filter are put into switch statements

2. a *column* filter that selects a subset of PowerOp, dynamically.

the PowerOp subsetting is important to be able to cut down the amount of fields created in the main instruction decode phase.

the most minimal subset needed would be the Function Unit (fn_unit). however there are other fields needed (register numbers particularly implicit SPRs when OP_B* are used) and also "privileged instruction detection" that mean it is not such a small subset.

however specific fields such as the immediates, link register, update mode, sign extend etc, all of these can be decoded at the Function Unit as needed instead of globally in PowerDecode2.

when doing so it ia not necessary to re-decode the SPR, RA, RB etc fields, hence the subsets.
Comment 2 Luke Kenneth Casson Leighton 2020-08-08 21:26:23 BST
*** Bug 454 has been marked as a duplicate of this bug. ***
Comment 3 Cole Poirier 2020-08-08 21:39:06 BST
*** Bug 454 has been marked as a duplicate of this bug. ***
Comment 4 Luke Kenneth Casson Leighton 2020-09-06 21:16:04 BST
commit 7d9479fcb2449363851ab690fc97d1940da88f36 (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 21:15:32 2020 +0100

    pass col_subset throughout PowerDecoder

commit bad13c4ad7027b200c498bb8398bc1a6e584da65
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 20:59:48 2020 +0100

    reorganise PowerOp to be dynamic

commit ecdbe3dc7df2e5fc79ef419f52bf7e9ecc6ed77b
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 20:33:16 2020 +0100

    reorg of PowerOp to be able to dynamically subset it
Comment 5 Luke Kenneth Casson Leighton 2020-09-06 21:43:21 BST
commit a42f84b31c3ac3733ac10201eb0a12680704dc49 (HEAD -> master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 21:42:51 2020 +0100

    add row subset selector for PowerDecode.
    allows functions to be used to create subset decoders
Comment 6 Luke Kenneth Casson Leighton 2020-09-06 22:21:27 BST
commit dd54b3e59c048f447f158be1d4a62c50cbf903e0 (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 22:21:09 2020 +0100

    decoder immediate b split out to DecodeBImm

commit a9dfea89015c63c7cd4117789cf3f13b0f6acbcd
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Sep 6 22:16:00 2020 +0100

    decoder immediate a split out to DecodeAImm
Comment 7 Luke Kenneth Casson Leighton 2020-09-07 16:14:32 BST
commit ec3d17992123c7311892fe79b604ac030628d4ca (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Mon Sep 7 16:14:11 2020 +0100

    split out PowerDecode2 into PowerDecodeSubset