Giter Site home page Giter Site logo

Comments (6)

pascalgouedo avatar pascalgouedo commented on September 25, 2024

Hi @Silabs-ArjanB
Don't understand your point.
rD = rs1 is just an exceptional case than needs to be explained to understand what is the design behaviour and to align the reference model to the design.
But when rD != rs1 the instruction is just doing its job...
Moreover adding illegal instruction decoding for that case would bring some complexity because it needs to compare registers contents (so using Register File and Forwarding paths). And surely timing degradation as well as this decoding would finish in cancellation signals.
And the C compiler should not generate this case anyway as it is useless.
But it could happen with randomly generated verification tests as it was discovered this way.

from cv32e40p.

Silabs-ArjanB avatar Silabs-ArjanB commented on September 25, 2024

Hi @pascalgouedo

Moreover adding illegal instruction decoding for that case would bring some complexity because it needs to compare registers contents (so using Register File and Forwarding paths).

I don't think you need to compare register contents at all. This is just about comparing indices.

For example cv.lb x2, (x2), Imm 'could' (and I think 'should') have been declared as illegal (as Rd == RS1 == x2). There is no need to actually read from x2 to figure this out.

And surely timing degradation as well as this decoding would finish in cancellation signals.

Declaring such instructions as illegal would not cause timing degradation in a core like the CV32E40P.

And the C compiler should not generate this case anyway as it is useless.

It is useless indeed and therefore I think it is wasteful to eat up encoding space and complicate the writeback mechanism and add additional verification effort (to check that the priority is handled correctly for a scenario that is not considered useful).

from cv32e40p.

pascalgouedo avatar pascalgouedo commented on September 25, 2024

Yes you're right indices are enough.

About eating encoding space I don't get it because you can't reuse the "lost" case when rd = rs1 to put another instruction.

And no added design complexity either as pointer increment writeback is done from EX when load is granted while destination writeback is done from WB with loaded data.

from cv32e40p.

Silabs-ArjanB avatar Silabs-ArjanB commented on September 25, 2024

Although not a lot of opcode space is lost there is still some space lost. Other extensions normally treat such space as illegal instructions and it is not imaginary that these spaces get filled.

An example is the following instructions where two source operands are not allowed to be the same register: https://github.com/riscv/riscv-code-size-reduction/blob/main/Zc-specification/cm_mvsa01.adoc

It is especially not nice as now we have an encoding that has the same functionality as original RV32I loads.

from cv32e40p.

pascalgouedo avatar pascalgouedo commented on September 25, 2024

I asked to Embecosm some precisions about generic and pulp load and about post-increment as well.

The answer is:

  • CORE-V specific instructions have priority over the generic RISC-V instructions.
  • Those post-incremented loads using same pointer and destination register could be generated in some cases and it would require some additional work to forbid them.

from cv32e40p.

Silabs-ArjanB avatar Silabs-ArjanB commented on September 25, 2024

@pascalgouedo Thank you for following up.

from cv32e40p.

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.