Giter Club home page Giter Club logo

Comments (6)

stevobailey avatar stevobailey commented on July 28, 2024

Perhaps to correct my nomenclature, I think an array with 8-bit data is never misaligned. Because the data are 8 bits, any starting address in bytes is valid. So the above example still holds, but the data are not misaligned.

from vicuna.

michael-platzer avatar michael-platzer commented on July 28, 2024

Unfortunately, the address alignment constraints for vector loads and stores are currently very restrictive. Although 8-bit data is never misaligned, any vector load or store with a base address that is not aligned to the width of the memory interface will result in a misaligned memory request. Currently, the memory requests of Vicuna are directly handled by the memory bus, which is incapable of handling misaligned requests.

The current draft for the CORE-V-XIF standardized co-processor interface for RISC-V cores intends to route memory requests of a co-processor through the main core and to handle misaligned memory requests in the main core. However, that functionality is not implemented yet (and the specification might still change).

The current workaround is to ensure that the base address of any vector load and store is aligned to the width of the memory interface (e.g.., if the memory interface is 64 bits wide, the base address should be a multiple of 8).

from vicuna.

stevobailey avatar stevobailey commented on July 28, 2024

Hey, any updates on this? I saw the merge happened. Thanks for your work on it!
openhwgroup/cv32e40x#440

from vicuna.

michael-platzer avatar michael-platzer commented on July 28, 2024

Hi @stevobailey! Yes, with the latest commit I just lifted the requirement that the base address of vector loads and stores needs to be aligned to the width of the memory interface when using the XIF memory interface. Currently, this interface can only be used when CV32E40X is the main core and the memory interface width (VMEM_W) is configured to 32 bits (although in the future CV32E40X should gain the capability to support an XIF memory interface with arbitrary data width).

Unfortunately, the vector CSR cannot be accessed when using CV32E40X as the main core yet. I will focus on this next.

from vicuna.

stevobailey avatar stevobailey commented on July 28, 2024

Thanks! Are you planning on porting this fix to Ibex as well?

from vicuna.

michael-platzer avatar michael-platzer commented on July 28, 2024

That would require implementing the XIF interface for Ibex (including the XIF memory interface). There has been some work to add support for this to Ibex here: https://github.com/lowRISC/ibex/commits/cvxif . However, it appears that there are still issues with this implementation, as most CI checks are failing. Also, it was based on an earlier version of the XIF spec that did not include the memory interface.

Unfortunately, the fix cannot be ported unless the Ibex core gains an up-to-date XIF interface. While I would love to see support for the XIF interface added to Ibex, I do not have resources to work on this right now.

from vicuna.

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.