Giter Club home page Giter Club logo

Comments (5)

Dolu1990 avatar Dolu1990 commented on June 2, 2024

Should be good with d04f565, let's me know if there is any issue left ^^

from spinalhdl.

456Xander avatar 456Xander commented on June 2, 2024

This removed the combinatorial path to the ar.ready.
However, the combinatorial paths in the write logic are still present (see picture below)

axi-lite_comb2

I traced the reason of those to the StreamJoin apply function here:

  /** Join streams, but ignore the payload of the input streams. */
  def apply(sources: Seq[Stream[_]]): Event = {
    val event = Event
    val eventFire = event.fire
    event.valid := sources.map(_.valid).reduce(_ && _)
    sources.foreach(_.ready := eventFire)
    event
  }

This is called on the w and aw streams before creating the register stage with halfPipe, so the ready signal is still combinatoric.

Moving the halfPipe before the StreamJoin removes the remaining combinatoric path.

from spinalhdl.

Dolu1990 avatar Dolu1990 commented on June 2, 2024

Moving the halfPipe before the StreamJoin removes the remaining combinatoric path.

Yes right

The issue i have with that is that it would cost around 64 registers, i'm not realy into spending area just for following the spec (with no purpose)

Does this path create practical issues on your side ?
An option could be added to have the fix as you say.

from spinalhdl.

456Xander avatar 456Xander commented on June 2, 2024

I don't have a practical issue with it right now, as the design I'm working on still early on and only runs in simulation, where I noticed the core not following spec.

As far as I understand, the reason for the no combinatorial paths rule in the spec is, because it may introduce long combinatorial paths is the design, that reduce max clock speed.

You're right that registering data and address with a halfPipe on w and aw uses unnecessary area, especially as the spec guarantees that data and address are stable as long as valid is high.

To follow spec, it would be enough to register the valid signals of both paths, a validPipe should be enough and only cost 2 registers.

I'm also OK with leaving it how it is right now, and testing it again once my design is more complete and see if it causes a practical issue.

from spinalhdl.

Dolu1990 avatar Dolu1990 commented on June 2, 2024

To follow spec, it would be enough to register the valid signals of both paths, a validPipe should be enough and only cost 2 registers.

I forgot that one existed XD. Yes it would work, as long as the BusSlaveFactory haltIt primitive isn't used by the user (as that one may depend on the address.

I'm also OK with leaving it how it is right now, and testing it again once my design is more complete and see if it causes a practical issue.

In general, i tend to integegrate pipelining stages at a more "macro level", meaning between the main memory bus and the shared peripheral bus, which then goes to individual peripherals, that can save a lot of area, especialy if you have many little bus slave factory (ex gpio)

from spinalhdl.

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.