Giter Club home page Giter Club logo

Comments (8)

alexforencich avatar alexforencich commented on May 28, 2024

Ah yep, there were a couple of bugs there that I have sorted out, will push a fix soon. There aren't really any examples of the AXI/AXI lite slave modules as they are a bit special purpose, normally you'll probably want to use the AXI/AXI lite RAM, which is an extension of the AXI/AXI lite slave.

from cocotbext-axi.

rodrigomelo9 avatar rodrigomelo9 commented on May 28, 2024

Got it, I'm going to try with the AXI/AXIL RAM and let you know.

from cocotbext-axi.

rodrigomelo9 avatar rodrigomelo9 commented on May 28, 2024

I successfully used AxiLiteRAM with my AXI4 Lite master (and I fixed some issues as consequence). Great idea to easily check the basic functionality of a master ;-)

I have a question: whenever I set AxPROT with a value different to 1, 2 or 4, I receive a ValueError:

    13.00ns INFO     test_basic failed
                     ValueError: 011 is not a valid AxiProt

As far I know, any combination is valid, right? I never worry about AxPROT before, but I used it as 000 in the past without problems (Xilinx).

from cocotbext-axi.

alexforencich avatar alexforencich commented on May 28, 2024

Hmm, that's very odd. Is there a line number associated with that exception? AxiProt should be a flag field, and as such all combinations of bits should be valid.

In [1]: from cocotbext.axi import AxiProt

In [2]: AxiProt(0b011)
Out[2]: <AxiProt.NONSECURE|PRIVILEGED: 3>

And the default that you should normally be using is 0b010, as this sets the "nonsecure" bit. Although it won't make a difference unless you're using something like ARM TrustZone, in which case using 0b000 could end up allowing a device to bypass the TrustZone protections. The idea is that the interconnect components can have "secure" devices that are only accessible by operations with the nonsecure bit clear, and the CPU will issue operations with this bit clear only when operating in certain secure execution modes, and with the bit set in non-secure execution modes.

from cocotbext-axi.

rodrigomelo9 avatar rodrigomelo9 commented on May 28, 2024

I am using AxiLiteRAM:

axil_ram = AxiLiteRam(AxiLiteBus.from_entity(dut), dut.aclk)

And here is the exception:

    32.00ns INFO     The core was reset
    36.00ns ERROR    Exception raised by this forked coroutine
    37.00ns INFO     test_burst failed
                     ValueError: 000 is not a valid AxiProt
                     
                     During handling of the above exception, another exception occurred:
                     
                     Traceback (most recent call last):
                       File "/usr/local/lib/python3.8/dist-packages/cocotbext/axi/axil_slave.py", line 110, in _process_write
                         prot = AxiProt(getattr(aw, 'awprot', AxiProt.NONSECURE))
                       File "/usr/lib/python3.8/enum.py", line 339, in __call__
                         return cls.__new__(cls, value)
                       File "/usr/lib/python3.8/enum.py", line 670, in __new__
                         raise exc
                       File "/usr/lib/python3.8/enum.py", line 653, in __new__
                         result = cls._missing_(value)
                       File "/usr/lib/python3.8/enum.py", line 895, in _missing_
                         raise ValueError("%r is not a valid %s" % (value, cls.__name__))
                     ValueError: 000 is not a valid AxiProt

from cocotbext-axi.

alexforencich avatar alexforencich commented on May 28, 2024

Hmm, looks like I need to explicitly convert that to an integer before converting to AxiProt.

from cocotbext-axi.

alexforencich avatar alexforencich commented on May 28, 2024

Try again with the current git version and let me know if you're still seeing the same issue.

from cocotbext-axi.

rodrigomelo9 avatar rodrigomelo9 commented on May 28, 2024

Yes, it works with the current version at master :-D

Based on one of the last logs (Fix AxiLiteSlave wrapper), I re-check axil_slv = AxiLiteSlave(AxiLiteBus.from_entity(dut), dut.aclk) and it also works, so this issue can be closed.

Thanks Alex, I am very happy using cocotbext-axi in the development of AXI masters at my job ;-) I think that is a very valuable project.

Regards,
Rodrigo

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.