Giter Club home page Giter Club logo

Comments (5)

alexforencich avatar alexforencich commented on September 23, 2024

Not sure what the best solution would be here. I don't think using signed_integer is a good idea though - first, it isn't going to work as expected if byte_lanes isn't 1 (and I think the bit masking is going to remove the sign information anyway even if you swap integer for signed_integer). Second, bytes doesn't accept signed integers, you get an exception if there is anything outside of 0-255, at least when byte_size is 8.

I'm thinking maybe the "right" solution would be to add a config option somewhere (probably to the constructor) to control sign bit handling in the RX direction. This would also force anything with 8 bit bytes to use list instead of bytes so the sign information is preserved.

from cocotbext-axi.

thenameisT avatar thenameisT commented on September 23, 2024

Thank you for the quick reply.
I am using byte_size=12
Could you please let me know how exactly to do it?

from cocotbext-axi.

thenameisT avatar thenameisT commented on September 23, 2024

And another issue, the input sample is around 80,000 and the output samples I receive using axistreamsink is 160,000(almost double ). Any idea where I might be wrong ?
But its right when i just use AXIStremSource to drive samples to dut and collect it using my own logic.(without sink)

from cocotbext-axi.

alexforencich avatar alexforencich commented on September 23, 2024

Wrong number of outputs makes me thing you're not implementing the AXI stream handshake correctly somehow. If your logic works when it's talking to another piece of your own logic, my guess is you may have misunderstood some aspect of the AXI stream spec. I would have to see a waveform dump to get to the bottom of whatever is going on.

Also, I suppose it might make sense to add some additional assertions, for example if tvalid is high but tready is low, no signals are allowed to change until tready goes high. This would probably help catch a few bugs.

from cocotbext-axi.

alexforencich avatar alexforencich commented on September 23, 2024

Also, to manually recreate the sign bit, I think the simplest thing to do is something like this, assuming your data bus is 16 bits wide (so the sign bit is bit 15):

data = [(x ^ 2**15) - 2**15 for x in data]

from cocotbext-axi.

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.