Giter VIP home page Giter VIP logo

Comments (4)

definelicht avatar definelicht commented on June 26, 2024

Hey there! This is intended: My rationale with the compatibility interface is that it changes nothing from if you had been using hls::stream, such that users would experience no difference in behavior when changing their data type. Rather, the difference comes when using the hlslib API.

I see the argument for either approach, so I'm on the fence. If it's just for the sake of the presentation, I would lean towards not changing the behavior, because it's not really the intended API anyway, so it doesn't seem worth the risk of breaking some existing code :-)

from hlslib.

derpda avatar derpda commented on June 26, 2024

You are right, we certainly shouldn't change it for the sake of a presentation! =D

That being said, I do believe we should change it so let me make my case.
I think the purpose of the dataflow macros combined with hlslib::Stream is the realistic simulation of hardware to decrease development time by catching deadlocks. In particular, hls::Stream can be used as a drop-in replacement without changing the rest of the code. As it stands however, if a user does indeed just replace hls::stream with hlslib::Stream they do not in fact get the realistic behavior - they still get an infinite FIFO, which obviously can't be put into hardware.

Our (can I call it our? :D) readme also states that

[hls::Streams are] bounded, simulating the finite capacity of hardware FIFOs, allowing easier detection of deadlocks in software

A reader would thus expect finite FIFOs, so I would argue that changing the ::write method to behave like ::Push would not break, but indeed fix existing code - paradoxically by potentially causing deadlocks.

As an additional note, I wasn't aware of this difference until I stumbled over the issue I laid out in my first post, and actually read the source code more in depth. The difference is just an additional parameter being passed to the same class method, so it is easy to miss.

from hlslib.

definelicht avatar definelicht commented on June 26, 2024

Okay, sure! Feel free to push a PR :-)

from hlslib.

derpda avatar derpda commented on June 26, 2024

Closing this since its merged!

from hlslib.

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.