Wednesday, 2020-12-09

*** tpb has joined #litex00:00
*** lf has quit IRC00:07
*** lf has joined #litex00:07
*** ranzbak has quit IRC00:28
*** ranzbak has joined #litex00:33
*** scientes has quit IRC00:52
*** scientes has joined #litex00:53
*** Degi has quit IRC01:26
*** Degi has joined #litex01:28
*** CarlFK has joined #litex03:07
*** m4ssi has joined #litex04:47
*** Dolu_ has quit IRC04:52
*** scanakci has quit IRC05:27
*** davidlattimore has quit IRC05:27
*** _florent_ has quit IRC05:27
*** scanakci has joined #litex05:27
*** _florent_ has joined #litex05:28
*** sorear has quit IRC05:28
*** davidlattimore has joined #litex05:29
*** sorear has joined #litex05:30
*** m4ssi has quit IRC05:44
*** SpaceCoaster has quit IRC05:46
*** SpaceCoaster has joined #litex05:47
*** CarlFK has quit IRC06:11
*** CarlFK has joined #litex07:00
*** kgugala_ has joined #litex07:13
*** kgugala has quit IRC07:14
*** kgugala has joined #litex07:15
*** kgugala_ has quit IRC07:20
*** Bertl_zZ is now known as Bertl07:37
*** m4ssi has joined #litex07:43
josengHi all,07:52
josengcan anybody help me to understand the Streams in litex? I have a gateware design with classic FIFOs and now I wanted to try to move over to Streams between my modules and therefore use the stream.AsyncFIFO.07:52
josenghttps://gist.github.com/Wardstein/4d3004c2a91f8fbb9594f49d8f3aea5707:52
josengThis is what I currently have. But I get never any data at the output side of the FIFO. Did I get the sources/sinks the wrong way round? Can't I pass an endpoint as a parameter? Or did I connect the FIFO wrong?07:52
acathla_florent_, good, removing the line 937 of soc.py fixed the reboot (I still have to understand how's everything is connected)09:53
acathlaand flash works now!09:54
acathlawith vexriscv or serv!09:57
acathlawell, uploading worked, flashing...not yet10:27
zypjoseng, I think you've got lines 27-28 the wrong way around, IIRC it should be sink.connect(source), not source.connect(sink)10:34
_florent_Hi, I just tried to write a new LiteX's Wiki guide to prepare the Acorn CLE 215+ and use it with LiteX: https://github.com/enjoy-digital/litex/wiki/Use-LiteX-on-the-Acorn-CLE-21510:47
_florent_Hoping it will be useful for those who want to use it as a FPGA development board10:49
_florent_acathla: thanks for the feedback, I'll try to fix the reset today10:50
*** Dolu_ has joined #litex11:05
trabucayre_florent_: I've received my acorn. I've just a question about power supply: 3.3V is enough or an external one (PCIe) is required11:11
zyptrabucayre, which acorn? the cle-215? it gets all the power it needs from the m.2 slot11:25
trabucayrezyp: yep cle-215+11:26
trabucayreargg :-/11:29
trabucayrepower supply for m.2 m key  is only 3.3V no?11:32
zypyes11:32
trabucayrein fact I've received the cle-215 but forgot to order m.2 <-> PCIe so if it's possible to provide 3.3V through Pico-ZEMate it's allow me to start before receiving adapter11:35
zypah, it probably is but I can check the schematic11:36
zypyeah, the pico-ezmates are connected directly to the same 3.3V rail as the m.2 edge11:38
trabucayreyes!!!11:38
trabucayrethanks11:39
*** Bertl is now known as Bertl_oO12:36
*** lkcl has quit IRC13:47
*** lkcl has joined #litex14:00
st-gourichon-fidQuick survey (re regarding https://github.com/enjoy-digital/litex/pull/725 I guess you _florent_ replied ):  we chose "extract" and "inject" rather than "get" and "set" that seemed "generic"/"vague".14:32
st-gourichon-fidCan anyone provide kind of "prior art" where a convenience function would extract an integer value from a multi-field words?  How is it typically called?14:33
st-gourichon-fidSame question for a convenience function that takes a word and an integer, and returns the word with some bit range changed from the integer value.  How it this typically called?14:34
daveshahit's called extract in yosys: https://github.com/YosysHQ/yosys/blob/master/kernel/rtlil.h#L660-L66614:35
daveshahI'm not sure about a good term for the other way round though14:35
*** lkcl has quit IRC14:42
st-gourichon-fidthanks daveshah, interesting.  We are open to using any wording, it's best if we follow some existing common practice.14:42
st-gourichon-fidIn book "The Art of Assembly Language" Randall Hyde uses "extract" and "insert" https://flylib.com/books/en/1.330.1.30/1/ . https://www.plantation-productions.com/Webster/www.artofasm.com/Windows/HTML/BitManipulationa2.html14:52
tpbTitle: 3.7 Packing and Unpacking Data | The Art of Assembly Language (at flylib.com)14:52
st-gourichon-fidI guess "get" and "set" suggested by _florent_ may feel familiar, like setting and getting variables in an object, something lightweight?14:53
_florent_st-gourichon-fid, daveshah: thanks, I was also going to suggest extract/insert14:53
st-gourichon-fid"Insert" did not come to mind because it usually suggests moving existing things (e.g. insert in list), not changing in-place.14:55
*** lkcl has joined #litex14:56
_florent_st-gourichon-fid: I think extract was fine on my side but can't explain why I was not satisfied by inject. set/get are maybe indeed too generic and vague14:56
st-gourichon-fidTo be fair, the meaning of "inject" also kind-of suggests displacement.  It just avoids "insert" which already has a specific meaning of moving existing thing to make room for the new thing.14:59
st-gourichon-fidHow about "extract"/"set"?15:00
st-gourichon-fidOr "field2int"/"int2field"?   All seem kind of awkward.  Perhaps "set" and "get" are food after all.  Choose what you wish, I will adjust the PR according to your preference.  ¯\_(ツ)_/¯15:04
st-gourichon-fids/food/good/15:04
_florent_if we use set, then I have  preference for get /set :)15:05
_florent_in fact I think the context is a bit different than Yosys here15:05
st-gourichon-fidhttps://www.wordreference.com/definition/inject When injecting something, it's inside but you don't see obvious displacement.15:05
tpbTitle: inject - WordReference.com Dictionary of English (at www.wordreference.com)15:05
* st-gourichon-fid is interested in difference of context with Yosys.15:06
_florent_because we are creating C functions for each CSR registers and then here CSR fields15:06
_florent_so it's a bit equivalent to the function we could write in Python for a class15:07
_florent_reg.write(), reg.read()15:07
_florent_field.set(), field.get()15:08
_florent_in Yosys, with the extract function, the offset and len are argument, here the offset/len will not be arguments since will be provided as part of the function15:11
*** kgugala has quit IRC15:28
*** kgugala has joined #litex15:29
*** Melkhior has joined #litex15:51
MelkhiorNot sure but I think this is similar to "2.5    Bit Extract/Deposit (bext, bdep)" in B ? https://raw.githubusercontent.com/riscv/riscv-bitmanip/master/bitmanip-draft.pdf15:52
Melkhiorso extract/deposit could be an appropriate terminology ?15:52
st-gourichon-fidThanks Melkhior for the reference.16:16
_florent_Melkhior: thanks that's indeed interesting. set/get is simple but it's not clear if it's operating directly on the hardware or a value. Inject/Insert sounds like something cumulative  (if you inject/insert twice you expect result to be different), so yes it could be extract/deposit.16:16
st-gourichon-fidThis is interesting.  I read the C-equivalent code.  Factually, "extract" is capable of doing exactly what we are talking about.  But "deposit" only does the "bit shifting" part, not "inserting" the shifted bit in the existing word value.  To say it another way, "deposit" produces a word where all bits outside of the mask are zero, which is not what "inject" does..16:16
st-gourichon-fidWe can live with that and call "deposit" what we do, still.16:16
st-gourichon-fidhttps://en.wikipedia.org/wiki/Bit_manipulation_instruction_set#Parallel_bit_deposit_and_extract16:19
tpbTitle: Bit manipulation instruction set - Wikipedia (at en.wikipedia.org)16:19
st-gourichon-fidWhat about "extract" and "replace" ?    We "extract" an integer from a specific field in the word, and we "replace" the field in the word with the value of an integer.16:22
st-gourichon-fid"Extract" exactly matches existing bit manipulation terminology, "deposit" is lower level.16:25
st-gourichon-fid"replace" fixes the issue "if you inject/insert twice you expect result to be different".  Indeed, if you replace something twice, the result is expected to be the same.16:25
_florent_st-gourichon-fid: I like it, this is indeed representative to what we are doing here16:27
st-gourichon-fidI like it too.  I can adjust the PR now if it suits you.16:28
st-gourichon-fidThat's the exact terminology used in this question https://stackoverflow.com/questions/39684162/how-to-extract-values-in-bits-from-a-register-and-use-them-to-replace-bits-in-a  (answer says "merge").16:30
tpbTitle: mips32 - How to extract values in bits from a register and use them to replace bits in a different register? (MIPs assembly language) - Stack Overflow (at stackoverflow.com)16:30
st-gourichon-fidSame terminology in question and answer here: https://stackoverflow.com/questions/63967399/extract-certain-bits-from-a-and-replace-only-those-extracted-bits-in-b-at-a-cert16:31
tpbTitle: c - Extract certain bits from A and replace only those extracted bits in B at a certain position - Stack Overflow (at stackoverflow.com)16:31
st-gourichon-fidSame here https://stackoverflow.com/questions/42755704/bits-manipulation-mips-assembly16:32
tpbTitle: Bits Manipulation MiPS Assembly - Stack Overflow (at stackoverflow.com)16:32
_florent_st-gourichon-fid: if @daveshah @Melkhior are also fine with this, let's use extract/replace16:36
daveshahsgtm16:36
Melkhiorworks for me16:46
st-gourichon-fidPR updated https://github.com/enjoy-digital/litex/pull/72516:46
_florent_thanks all16:47
*** m4ssi has quit IRC17:21
*** jevinskie[m] has joined #litex17:25
*** key2 has quit IRC18:23
*** key2 has joined #litex18:23
*** Melkhior has quit IRC22:27
*** lkcl has quit IRC22:51
*** lkcl has joined #litex23:05
*** lkcl has quit IRC23:18
*** lkcl has joined #litex23:31

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!