Bug 478

Summary: MFOCR and MCROF need to be one-hot
Product: Libre-SOC's first SoC Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: Source CodeAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: RESOLVED FIXED    
Severity: enhancement CC: libre-soc-bugs
Priority: ---    
Version: unspecified   
Hardware: Other   
OS: Linux   
NLnet milestone: NLNet.2019.10.043.Wishbone total budget (EUR) for completion of task and all subtasks: 200
budget (EUR) for this task, excluding subtasks' budget: 200 parent task for budget allocation: 383
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:
lkcl = { amount = 200, submitted = 2020-12-06, paid = 2020-12-06 }
Bug Depends on:    
Bug Blocks: 383    

Description Luke Kenneth Casson Leighton 2020-08-27 22:09:31 BST
the FXM field needs to go through a one-hot "PriorityPicker" because using the fullmask is producing the wrong results.
Comment 1 Luke Kenneth Casson Leighton 2020-08-27 23:17:16 BST
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_regspec_map.py;h=1e6cf3af2356ab7e6f290290823dac4a1cf2a93c;hb=HEAD#l63

change read_cr_whole to be a Data(8)

power_decode2.py use a PriorityPicker if bit 20 is 1 otherwise set equal to FXM straight.

this uses full_cr read enable as a madk, directly. 

cr main_stage.py no longer expands FXM mask because full_cr only contains necessary fields.

write full cr mask likewise same thing.
Comment 2 Luke Kenneth Casson Leighton 2020-08-27 23:22:36 BST
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/cr/main_stage.py;h=e81f77f7dbeaa9449b10b7159699504b063a5177;hb=HEAD#l116

no longer need to do read modify write because FXM (or onehot) is inherently the write enable, directly onto the full_cr.
Comment 3 Luke Kenneth Casson Leighton 2020-08-30 14:38:00 BST
commit 05bf9da9a9f4b9be556e28a8b0468009c639e1ae (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Sun Aug 30 15:45:03 2020 +0100

    reversal of FXM mask for one-hot selection in OP_MTCR decode