Code Monkey home page Code Monkey logo

Comments (6)

shunshou avatar shunshou commented on September 13, 2024

@chick @grebe do you have opinions on how to deal with this?

from dsptools.

shunshou avatar shunshou commented on September 13, 2024

Ok, I fixed the problem for DspReal and DspComplex. Now their components show up as Lits if they're meant to be Lits.

For Vec, I guess, b/c it's supposed to be dynamically addressable, you wouldn't consider its constituents Lit's anymore. Which is weird b/c that logic is inconsistent with the Verilog that's printed out... Dynamically addressable stuff that's not considered a Lit should be implemented more like the stuff in the pdf.

Otherwise, it makes no difference to use Seq or IndexedSeq instead for a LUT?

from dsptools.

grebe avatar grebe commented on September 13, 2024

I believe this is related to chipsalliance/chisel3#418 and to an extent chipsalliance/chisel3#417. @ducky64 talked about it at the recent chisel meeting. It's not at all clear to me what the right thing to do is, especially with Vecs (which I think are inconsistent in dealing with literals). @ducky64, can you chime in?

from dsptools.

ducky64 avatar ducky64 commented on September 13, 2024

There's currently no resolution to those issues (and we didn't get around to discussing those at the last meeting). If you can come up with a consistent solution, that would be great. But I think it's a hard problem.

from dsptools.

shunshou avatar shunshou commented on September 13, 2024

I think the best way to go about it is:
Vec of all Lits -> ROM (!)
Where the ROM output looks more like example 5.10 in http://www.csee.umbc.edu/%7Etinoosh/cmpe415/slides/Rom-LUT-verilog.pdf
If you construct it like that, then it matches with the behavior of doing lut(0).isLit reporting false and therefore having peek/poke tester crap out. :D

For the DspReal and DspComplex cases, I'd argue that they just weren't designed to be super compatible with the intention of Chisel UInt, etc. Lits... but that's fixed in my PR.

from dsptools.

ducky64 avatar ducky64 commented on September 13, 2024

The main problem (as per the linked issues) is that it's not possible given the current structure to statically resolve whether a Data is a literal. cloneType makes this especially difficult since it returns this.type, whereas you want ULit.cloneType (for example) to return a UInt.

It would seem reasonable for a Vec of Lits to generate a ROM, perhaps as a FIRRTL pass? @azidar ?

Your link also gives me a forbidden error...

from dsptools.

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.