Bug 334

Summary: POWER decode A=zero needs to be set as a flag in Execute1Type
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   
See Also: https://bugs.libre-soc.org/show_bug.cgi?id=356
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:
Bug Depends on:    
Bug Blocks: 336, 305    

Description Luke Kenneth Casson Leighton 2020-05-21 02:57:16 BST
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/power_decoder2.py;h=3b9beba954a2f0f7ebefc7a731d8eddcb3705698;hb=HEAD

detection of zero RA reg (src1) needs to be passed through the pipelines (via the CompUnits - see bug 336) just like B (src2) being used as an immediate.

this therefore needs to be done in the pipeline unit tests (test_pipe_caller.py), qemu to check the simulation, then HDL unit tests detect RA_OR_ZERO and likewise set A to zero.

a flag "a_is_zero" or such would be set in power_decode2 in the execute phase.
Comment 1 Luke Kenneth Casson Leighton 2020-05-21 17:48:51 BST
added the flag,
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=e0088f72dbd8b53acc587fa2ec2fb9fa4aeb17c5

commit 65aceac3fa2cdc1bc34120551c23a9dff681c02e (HEAD -> master, origin/master)
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Thu May 21 17:48:20 2020 +0100

    add zero_a flag to CompALUOpSubset

commit e0088f72dbd8b53acc587fa2ec2fb9fa4aeb17c5
Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Date:   Thu May 21 17:44:21 2020 +0100

    add zero_a flag to Decode2ExecuteType