Forum Discussion

Kevin26's avatar
Kevin26
Icon for New Contributor rankNew Contributor
2 years ago

NIOS V/m SC.W instruction generating Illegal Instruction Exception

I have ported the RTEMS RTOS over to the NIOS V/m processor. During a context switch, there is a dummy sc.w instruction to clear any reservations. When this instruction is executed, an illegal instruction exception occurs. After reading the processor reference guide, I don't see anywhere that would say this is a problem. Is the SC instruction illegal in the NIOS V/m processor?

8 Replies

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Kevin


    Have you considered using FreeRTOS instead of RTEM RTOS?

    Unfortunately we do not officially support RTEM RTOS but however maybe we could figure it out here.

    Could you share the error message that you are seeing?


    Regards

    Jingyang, Teh


  • Kevin26's avatar
    Kevin26
    Icon for New Contributor rankNew Contributor

    I'm not receiving an error message. I'm just getting an illegal instruction exception when the NIOS V/m is trying to execute a sc.w instruction. I just need to know whether the NIOS V/m supports the LR/SC instructions and if so why would the NIOS V/m generate the exception.

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Kevin


    If you are running LR/SC instruction, the instruction set is part of the Atomic extension set for RiscV.

    Sorry to inform that it is removed from NiosV, and it is the cause of the illegal instruction message that you are seeing now.

    For now there is no plan to add in the RiscV Atomic extension into for NiosV.


    Regards

    Jingyang, Teh


  • Kevin26's avatar
    Kevin26
    Icon for New Contributor rankNew Contributor

    That makes sense now. I just upgraded to Quartus Prime Lite 23.1 when this started happening. I think in 22.1, the atomic instructions were supported.

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Any more follow up question for this case?

    If no, could i close the case?


    Regards

    Jingyang, Teh


  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Since this thread been resolve, I shall set this thread to close pending. If you still need further assistance, you are welcome to reopen this thread within 20days or open a new thread, some one will be right with you. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


    If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 4 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


    Regards

    Jingyang, Teh