GithubHelp home page GithubHelp logo

Comments (2)

Dolu1990 avatar Dolu1990 commented on May 26, 2024

Hi,
The Verilog generator of SpinalHDL always assign the result of a shift operator into a variable to resize the result to the wanted size. (There is the list of all expression for which it do that : https://github.com/SpinalHDL/SpinalHDL/blob/dev/core/src/main/scala/spinal/core/internals/ComponentEmitterVerilog.scala#L1092)

So it isn't an issue, but a generator coding style ^^
Is that an issue in some cases ? Is that linting config standard ?
(I'm not used to linting tools)

from vexriscv.

secworks avatar secworks commented on May 26, 2024

Ok, if I look at the Verilog code I see:

On line 4422: assign zz_164 = (IBusCachedPlugin_fetchPc_output_payload >>> 2);
zz_164 is defined on row 2036 to "wire [29:0] zz_164;". So the assignment looses two bits.
But then on row 2064 the wire is used: "assign zz_330 = zz_164[9:0];" So we are actually only using the lowest 10 bits. No problem.

It is possible to disable these types of warnings, or build a list of known false errors to be ignored. In general I find that these warnings where the LHS and RHS widths of an assignment don't match usually points to some real issue. And esp if LHS width < RHS width you do loose info. So disabling lint checking assignment width mismatch should not be done. Generally.

I'm closing this issue.

BTW: We are looking at using VexRisc in the Cryptech Open HSM project. I'll be trying to use it at first as a SW controlled DMA/local master. So first core will be smallish, but include the debug port.
https://cryptech.is/

from vexriscv.

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.