_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
KSmith86 has joined #litex
KSmith86 has quit [Remote host closed the connection]
KSmith has quit [Ping timeout: 245 seconds]
KSmith has joined #litex
<Xesxen_> Heya! I'm trying to build litex for the fomu, but I keep running into this when yosys is being run: ERROR: Module `\IFS1P3BX' referenced in module `\fomu_pvt' in cell `\IFS1P3BX_1' is not part of the design. This is with running "python -m litex_boards.targets.fomu --cpu-type=serv --build" after running "python ./litex_setup.py init install --user" in a clean directory. Does anyone know why? I'm running yosys Yosys 0.9+3619 / c403c984 (which is the latest
<Xesxen_> commit on master currently)
Xesxen_ is now known as Xesxen
_whitelogger has joined #litex
KSmith has quit [Read error: Connection reset by peer]
Degi_ has joined #litex
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
awordnot has quit [Ping timeout: 240 seconds]
awordnot has joined #litex
KSmith has joined #litex
proteusguy has quit [Remote host closed the connection]
<_florent_> Xesxen: hi, sorry, there is still a manual modification needed: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/fomu.py#L85
<tpb> Title: litex-boards/fomu.py at master · litex-hub/litex-boards · GitHub (at github.com)
<sajattack[m]> are there any example programs communicating with the cle215+ over litepcie? At a very basic level. I saw the UART issue and that's about the level of complexity I think I could handle
<sajattack[m]> the linux kernel driver is great, but I don't quite understand how to transfer data back and forth
<tpb> Title: Use Host Bridge to control debug a SoC · enjoy-digital/litex Wiki · GitHub (at github.com)
<_florent_> at least to use the MMAP interface
<_florent_> i should improve the examples, but this will already allow you to access the registers of the SoC from python scripts
<_florent_> if you have a specific use-case on mind, i could try to give directions
<sajattack[m]> I was thinking about a pcie sha1 accelerator interfacing with a rust program running on linux
<sajattack[m]> python looks friendly but might slow things down a bit
<sajattack[m]> correct me if I'm wrong, but I thought mmap was for mapping a file into memory. How do you do transfers back and forth with it?
<_florent_> ok, the MMAP interface is use to access the main bus of the SoC, this can be used to do transfers, but it's indeed slow
<_florent_> for your case, you use the DMAs with minimal modification to the examples
<tpb> Title: litepcie/kc705.py at master · enjoy-digital/litepcie · GitHub (at github.com)
<_florent_> this DMA will have a source for the data coming from the Host and sink for the data going to the Host
<_florent_> on the software side
<sajattack[m]> what does that look like on the linux/software side?
<_florent_> with dma test, we are connecting the source to the sink internally and verifying that we can do a dma loopack in the FPGA: https://github.com/enjoy-digital/litepcie/blob/master/litepcie/software/user/litepcie_util.c#L303
<tpb> Title: litepcie/litepcie_util.c at master · enjoy-digital/litepcie · GitHub (at github.com)
<_florent_> and if you just want to use the source/sink to receive/send data, you can use litepcie_test: https://github.com/enjoy-digital/litepcie/blob/master/litepcie/software/user/litepcie_test.c
<tpb> Title: litepcie/litepcie_test.c at master · enjoy-digital/litepcie · GitHub (at github.com)
<_florent_> ./litepcie_test -c 0 play file.bin will generate file.bin on the source interface in the FPGA
<_florent_> ./litepcie_test -c 0 record file.bin 1024 will save the first 1024 bytes of the sink stream in the FPGA to file.bin
<_florent_> for more information on the streams: https://github.com/enjoy-digital/litex/wiki/Streams
<tpb> Title: Streams · enjoy-digital/litex Wiki · GitHub (at github.com)
<sajattack[m]> yeah I was looking at that litepcie_test but didn't quite understand it
<sajattack[m]> I thought it was for recording bus traffic and playing it back or something
<sajattack[m]> but it looks like maybe I can make my own program and just call litepcie_write and litepcie_read to do dma transfers?
<_florent_> yes sure, litepcie_test is just an example to exercise the DMAs
<sajattack[m]> it's not as simple as calling read and write on the file descriptor is it?
<sajattack[m]> if you could, a simpler example of sending a string and retrieving a response from the fpga would be helpful for my understanding
<sajattack[m]> * it's not as simple as calling linux open, read and write syscalls on /dev/litepcie0 or something is it?
<sajattack[m]> my naive plan is
<sajattack[m]> retrieve sha1 of string
<sajattack[m]> send string
<sajattack[m]> thinking of using this btw https://github.com/secworks/sha1
<tpb> Title: GitHub - secworks/sha1: Verilog implementation of the SHA-1 cryptgraphic hash function (at github.com)
<_florent_> sajattack[m]: it's almost as you are describing, but you still need to control the DMA. you could start by having a poll of strings you want to encode in strings.bin
<_florent_> and do ./litepcie_test -c 0 play string.bin
<_florent_> and in another terminal: ./litepcie_test -c record sha1.bin
<_florent_> -c 0
<sajattack[m]> ok
<_florent_> and in the FPGA integrate the sha1 module between the DMA source and sink
<sajattack[m]> yeah
<_florent_> DMA.source --> SHA1 --> DMA.sink
<_florent_> and you'll just receive the encoded data in sha1.bin
<sajattack[m]> thanks
<sajattack[m]> I wonder, is there a better solution for streaming data in and out than files though? I'm sending quite a lot of strings so I guess I would need to create many files
<sajattack[m]> it's workable but doesn't seem too elegant
<sajattack[m]> I think it's on the order of 10TB of strings 😅
<_florent_> sajattack[m]: yes sure, that's just a first example, you can customize litepcie_test for your need or use pipes
KSmith has quit [Remote host closed the connection]
<st-gourichon-fid> Hi! We use the new CSRField feature here. In a design, when using registers holding several values, we typically need an "extract" function and an "inject" function.
<st-gourichon-fid> "extract" takes a 32bit word and provides a plain value extracted at offset and size.
<st-gourichon-fid> "inject" takes a 32bit word and modifies only the bit between offset (included) and offset+size (excluded) to reflect the value you want to inject.
<st-gourichon-fid> So far so good. I'm pondering whether it is best to generate per-field dedicated extract() and inject() functions in csr.h, or if it is best to create a C-level macro that calls a generic extract() and a generic inject() with preprocessor magic to use the correct FIELDNAME_OFFSET and FIELDNAME_SIZE.
<st-gourichon-fid> In the first case I would provide a PR because I changes litex/soc/integration/export.py . I the second case I can just not share the extract and inject functions and macro.
<st-gourichon-fid> All of this is plain old C-close-to-hardware-level bit handling, just I see the opportunity for litex to provide some convenience... or not?
<st-gourichon-fid> Generating them all has the benefit of autocompletion in IDEs.
kgugala has quit [Ping timeout: 258 seconds]
kgugala has joined #litex
kgugala_ has joined #litex
kgugala has quit [Ping timeout: 265 seconds]
KSmith has joined #litex
xobs has quit [Quit: killed]
sajattack[m] has quit [Quit: killed]
disasm[m] has quit [Quit: killed]
CarlFK[m] has quit [Quit: killed]
leons has quit [Quit: killed]
abeljj[m] has quit [Quit: killed]
DerFetzer[m] has quit [Quit: killed]
xobs has joined #litex
leons has joined #litex
CarlFK[m] has joined #litex
sajattack[m] has joined #litex
disasm[m] has joined #litex
nrossi has joined #litex
DerFetzer[m] has joined #litex
mibus[m] has joined #litex
abeljj[m] has joined #litex
<sajattack[m]> is a 512 bit CSR possible and/or a bad idea?
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
alanvgreen has joined #litex
alanvgreen has quit [Client Quit]
alanvgreen has joined #litex
indy has joined #litex
<sajattack[m]> I get this error when trying to build the acorn_cle_215 target `python acorn_cle_215.py --build` `litex.build.generic_platform.ConstraintError: Resource not found: serial:None`
lf has quit [Ping timeout: 240 seconds]
lf has joined #litex