Not to me.
If it hasn't been delegated, then how can any SEIP bit get set at all, either in mip or in sip?
But, if it is not delegated, then the trap is taken in MMode, and not in S-mode, so .SEIP should never be set.
The mip.MEIP bit could get set, but not the mip.SEIP, right?
So perhaps the labels are wrong?
If it has been delegated, then shouldn't this looks correct: sip.SEIP and mip.SEIP will have the same value (assuming you're looking at it from M-mode)
>
>> The architecture spec implies, but does not mention explicitly that when
>> mideleg.SEI is 1, if mip.SEIP is 1, sip.SEIP will be 1 too.
>> And the M-mode mip.SEIP interrupt will be masked out and only generate
>> S-mode sip.SEIP interrupt.
>>
>
>The intended behavior is that there is only one IP register, which can
>be read in its entirety as MIP but accessing it as SIP hides
>interrupts not delegated to S-mode.
(or Umode, I would think).
So reading sip from M-mode will give the same result as if it were being read from S-mode.
> > As for the read and write behavior of the sip.SEIP bit field,
>> In section 4.1.5 of v1.10 architecture spec (page 52), it has the following
>> sentence:
>> ------------------
>> All bits besides SSIP, USIP, and UEIP in the sip register are read-only.
>> ------------------
>> This implies that sip.SEIP is read-only.
>>
>> But in the RISC-V Reader book, page 109~110, the last 2 sentences say that:
>> ----------------
>> The sie and sip CSRs are S-mode CSRs that are subsets of the mie and mip
>> CSRs. They have the same layout as
>> their M-mode counterparts, but only the bits corresponding to interrupts
>> that have been delegated in mideleg are readable
>> and writable through sie and sip. The bits corresponding to interrupts that
>> haven't been delegated are always zero.
>> ----------------
>> This implies that sip.SEIP is a R/W bit field, if mideleg.SEI is 1. And this
>> conflicts with the read-only definition in the architecture spec.
>>
>> Which is correct? The spec or the RISC-V Reader book?
>
>If your core doesn't implement SEIP virtualization then it doesn't
>matter. Otherwise I'm not sure.
>
>-s
>
>--
>You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to
isa-dev+u...@groups.riscv.org.
>To post to this group, send email to
isa...@groups.riscv.org.
>Visit this group at
https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
>To view this discussion on the web visit
https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CADJ6UvMxRDtdYcsjj0eLHr3C_fezeku9TXW8nbuHRRcizfXTXA%40mail.gmail.com.
--
**************************************************
* Allen Baum tel. (908)BIT-BAUM *
* 248-2286 *
**************************************************