Giter Site home page Giter Site logo

Comments (4)

ekiwi avatar ekiwi commented on September 26, 2024

Actually, it is throwing the same value again and again.

You are always adding 5 and 6 and thus the result is always 11.

from chiseltest.

BhattSoham avatar BhattSoham commented on September 26, 2024

Thanks for the reply. Actually, I want to know like if I am passing 5 & 6, I will get the same answer of 11. I just want to know that, suppose there's two conditions, x = x+ 1 & y = y+2 and I want to work it in a loop. I don't want to add manually every time to the chisel test. i want that to be done with the loop. Is that possible in chisel? But whenever I am working on it, it is giving the same result always. Can you please help me with a code?

To be precise, suppose x = 2, y = 3
So, 1st step : x = x + 1 = 3
y = y + 2 = 5

The next step which will be x = 3 + 1 = 4 & y = 5 + 2 = 7. I want this in a loop (not adding it up in chisel test manually). Can it be done?

from chiseltest.

schoeberl avatar schoeberl commented on September 26, 2024

from chiseltest.

BhattSoham avatar BhattSoham commented on September 26, 2024

Actually, I have used the register. But the value is coming as it is. Basically, when I am using a loop like

val io = IO(new Bundle {
val x_in = Input(FixedPoint(32.W, 16.BP))
val y_in = Input(FixedPoint(16.W, 8.BP))
val h = Input(FixedPoint(32.W, 16.BP))
val y_out = Output(FixedPoint(32.W, 16.BP))
})
val mx = Reg(FixedPoint(32.W, 16.BP))
for(i<-0 until 5) {
mx := io.y_in + io.x_in
io.x_in := mx
}
io.y_out := mx

}

My question is that it is throwing the same result. and the loop is not rolling. But point is just like in C, we have to denote the 'i' in statement within the loop, but in chisel, it is throwing we cannot use it as because it is fixed point. Any idea?

from chiseltest.

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.