Giter Club home page Giter Club logo

Comments (6)

secworks avatar secworks commented on June 11, 2024

Digging through the code for the PicoRV32: https://github.com/tillitis/tillitis-key1/blob/main/hw/application_fpga/core/picorv32/rtl/picorv32.v

One can see that if the CATCH_ILLINSN option is set (it is set by default), but no IRQs are enabled (they are not enabled by default), the CPU will move to the cpu_state_trap (see line 1491). In this state, the CPU will set the trap signal (which is an external port), and then stay in the state until reset. This means that in our instance of the CPU, any illegal instructions will hang the CPU at the instruction that was decoded. Not really clear what happens if CATCH_ILLSN is not set. The CPU probably executes something. Which we don't want.

What we could do is have hardware that observes the trap signal, and if being set starts flashing the LEDs.

from tillitis-key1.

secworks avatar secworks commented on June 11, 2024

The following commit contains functionality to look at the trap signal being set. And if it is set will flash the LEDs until the device is reset. The cost of the HW functionality is 63 LCs. The design meets timing,

main...trap_indicator

The design needs to be tested.

from tillitis-key1.

quite avatar quite commented on June 11, 2024

I've tried executing 0x0000cafe and got a nice red flash!

from tillitis-key1.

secworks avatar secworks commented on June 11, 2024

I'd say we merge this into main.

from tillitis-key1.

quite avatar quite commented on June 11, 2024

@secworks agreed

from tillitis-key1.

secworks avatar secworks commented on June 11, 2024

Merged.

from tillitis-key1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.