Bug 409

Summary: deal with illegal instruction in simulator and hardware
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: 100
budget (EUR) for this task, excluding subtasks' budget: 100 parent task for budget allocation: 383
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:
"lkcl"={amount=100, paid=2020-08-21}
Bug Depends on: 415, 325    
Bug Blocks: 383    

Description Luke Kenneth Casson Leighton 2020-07-01 14:27:37 BST
from microwatt execute1.vhdl: illegal instructions need to generate a trap that sets bit 44 in SRR1

this in both ISACaller and power_decoder2

exception := '1';
v.f.redirect_nia := std_logic_vector(to_unsigned(16#700#, 64));
-- Since we aren't doing Hypervisor emulation assist (0xe40) we
-- set bit 44 to indicate we have an illegal
ctrl_tmp.srr1(63 - 44) <= '1';
report "illegal";
Comment 1 Luke Kenneth Casson Leighton 2020-07-14 16:13:56 BST
sorted.  PowerDecode2 now detects illegal instructions and sets the
instruction *to* trap, and as a result it is the TRAP pipeline that
deals with it.