Giter Site home page Giter Site logo

masterplayer / adxl345-sv Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 2.29 MB

FPGA implemented component for realize register file in FPGA resources with request and sends data to ADXL345 device

License: MIT License

SystemVerilog 18.23% VHDL 7.62% C 63.83% TeX 9.52% Tcl 0.80%
adxl345 axi-lite axi-stream fpga i2c interrupts systemverilog zynq

adxl345-sv's People

Contributors

masterplayer avatar

Stargazers

 avatar  avatar

Watchers

 avatar

adxl345-sv's Issues

FIFO interrupt processing support

There are needed for special processing for FIFO interrupts, because sw must read series of samples.
Possible mechanism may be realized as next scheme:

Software API can perform calibration process

Calibration includes next steps :

  1. Read current data N times
  2. Calculate average for this times
  3. Round them
  4. Update OFSX, OFSY, OFSZ registers in device

Calibration completed

or not?

Add mechanism for output rules

Output rules may be next :

  1. X, Y, Z as int16 values, readed directly from device
  2. X, Y, Z as float value, msmt in gravity values
  3. roll & pitch values

add this functional for axi_adxl structure and realize changing procedure on API

Need FSM correction

Because Reading data [0x32..0x37] or reading INT_SOURCE[0x30] register makes clear the data

Interrupt can work only when hw device not request data.

Solution :
After device configuration, we need disable request (reading data from device), but stay in ability to send the data independently of ENABLE signal in configuration register.
And DISABLE in CTL reg not reset the internal device memory.

New Issue: need_update memory in adxl345 component isn't deassert after sending data to device

it causes a next events :

  1. new data for sending received
  2. update_request asserts to 1
  3. FSM in IDLE_ST and analyzes need_update_reg
  4. internal logic sending request to device when need_update_req[address] = 1
  5. internal logic analyze other bits in memory
  6. internal logic sends old requests to device

solution :
maybe, after new command was sended, need_update_reg[address] has no deassertion event.

Interrupt processing in hardware extension

Need add support for interrupt processing in hardware, it might be additional state in finite state machine

Algorithm: (hardware)

  1. INTR signal asserted
  2. FSM goes from IDLE to send request for reading
  3. await for read data finalize
  4. Process interrupt : AND INT_SOURCE and INT_ENABLE. Different interrupts can be processed differently : some of reading registers 0x32-0x37, some as send INT_SOURCE registers for clean up interrupts
  5. Generate interrupt signal for processing system

software :

  1. await for interrupt
  2. if interrupt, read device registers
  3. make actions for processing interrupts(printing, accumulation, etc)
  4. send ack to configuration bank for deassertion irq signal from ip core

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.