Giter Site home page Giter Site logo

Comments (2)

caryr avatar caryr commented on July 19, 2024

There are a couple things here. At the moment the vec2 constructor that takes a vec4 is documented to return is_NaN when given a vector with undefined values. The issue is that the routine that copies the bits does not actually do this. This may be what we want and the constructor documentation needs to be changed and then in the vvp_arith_pow::recv_vec4() code the checks for undefined bits can use common code like what is done for a signed power (e.g. move the signed undefined check code outside of the if statement). Someone needs to spend some time checking which is the correct fix (change the constructor or change the power routine).

from iverilog.

martinwhitaker avatar martinwhitaker commented on July 19, 2024

I've just pushed a fix for this bug to the git master branch.

Note to the Icarus developers: I've changed the vvp_vector2_t constructor that takes a vvp_vector4_t value to take an optional second parameter that selects whether NaN or standard Verilog (XZ -> 0) semantics are used, as both behaviours are needed. I've made the default be standard Verilog semantics, otherwise there is a nasty gotcha where

vvp_vector2_t bit2 = bit4;

and

vvp_vector2_t bit2;
bit2 = bit4;

give different behaviour.

from iverilog.

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.