Giter Site home page Giter Site logo

bitfield.py's Introduction

bitfield.py

Example

$ ./bitfield.py format/mstatus64.json 0x0000000a00300180
0x   0   0   0   0   0   0   0   a   0   0   3   0   0   1   8   0
0b0000000000000000000000000000101000000000001100000000000110000000
  x-----------------------xxxx<><>---------xxxxxx<><><><>xxxx-x-x-
  |                       |||| | |         |||||| | | | ||||| | '-- [1]     SIE = 0
  |                       |||| | |         |||||| | | | ||||| '---- [3]     MIE = 0
  |                       |||| | |         |||||| | | | ||||'------ [5]     SPIE = 0
  |                       |||| | |         |||||| | | | |||'------- [6]     UBE = 0
  |                       |||| | |         |||||| | | | ||'-------- [7]     MPIE = 1
  |                       |||| | |         |||||| | | | |'--------- [8]     SPP = 1
  |                       |||| | |         |||||| | | | '---------- [10:9]  VS = 0x0 (Off)
  |                       |||| | |         |||||| | | '------------ [12:11] MPP = 0x0 (User)
  |                       |||| | |         |||||| | '-------------- [14:13] FS = 0x0 (Off)
  |                       |||| | |         |||||| '---------------- [16:15] XS = 0x0 (Off)
  |                       |||| | |         |||||'------------------ [17]    MPRV = 0
  |                       |||| | |         ||||'------------------- [18]    SUM = 0
  |                       |||| | |         |||'-------------------- [19]    MXR = 0
  |                       |||| | |         ||'--------------------- [20]    TVM = 1
  |                       |||| | |         |'---------------------- [21]    TW = 1
  |                       |||| | |         '----------------------- [22]    TSR = 0
  |                       |||| | '--------------------------------- [33:32] UXL = 0x2 (rv64)
  |                       |||| '----------------------------------- [35:34] SXL = 0x2 (rv64)
  |                       |||'------------------------------------- [36]    SBE = 0
  |                       ||'-------------------------------------- [37]    MBE = 0
  |                       |'--------------------------------------- [38]    GVA = 0
  |                       '---------------------------------------- [39]    MPV = 0
  '---------------------------------------------------------------- [63]    SD = 0
$ ./bitfield.py format/satp64.json 0xa0000000000810db
0x   a   0   0   0   0   0   0   0   0   0   0   8   1   0   d   b
0b1010000000000000000000000000000000000000000010000001000011011011
  <==><==============><==========================================>
     |               |                                           '- [43:0]  PPN = 0x810db
     |               '--------------------------------------------- [59:44] ASID = 0x0
     '------------------------------------------------------------- [63:60] Mode = 0xa (Sv57)

bitfield.py's People

Contributors

dramforever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.