Wednesday, 2022-12-21

*** midnight <midnight!~midnight@user/midnight> has quit IRC05:34
*** midnight <midnight!~midnight@user/midnight> has joined #libre-soc05:35
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC06:35
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC07:26
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc07:28
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC09:42
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc09:42
*** awygle <awygle!~quassel@2604:a880:2:d0::5380:3001> has quit IRC10:13
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC10:20
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc10:20
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC10:42
*** octavius <octavius!> has joined #libre-soc10:53
*** sadoon[m] <sadoon[m]!~sadoonsou@2001:470:69fc:105::2:bab8> has quit IRC11:27
*** programmerjake <programmerjake!~programme@2001:470:69fc:105::172f> has quit IRC11:29
*** cesar <cesar!~cesar@2001:470:69fc:105::76c> has quit IRC11:29
*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC11:29
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc11:47
*** Ritish <Ritish!~Ritish@> has joined #libre-soc12:02
Ritish*lurks* =D12:06
RitishHello Hello!12:06
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc12:09
octaviushi Ritish12:11
RitishHello everyone12:12
RitishI'm Sai Ritish, y'all would've seen me through the mailing list already ^^12:12
RitishI'm working with a few others at Object Automation, India.12:12
RitishHere to learn, understand and help develop LibreSoc Lite :)12:12
*** sadoon[m] <sadoon[m]!~sadoonsou@2001:470:69fc:105::2:bab8> has joined #libre-soc12:12
RitishThanks Luke for taking the effort to write such a long message in the mailing lists.12:13
RitishOh Hello, octavius :)12:13
octaviusAfter New Year we'll be picking up on development, so the next few weeks is a good time to familiarise yourself with the wiki and the code repositories12:13
octaviusWe'll likely have paid tasks that you could do (such as updating unit tests etc.), so an extra insentive :)12:14
octavius(should've mentioned in the email, I'm Andrey btw)12:15
RitishOh, that sounds more interesting o.o, gotta pick up my pace sooner than later then!12:15
RitishGood to know you Andrew! and thanks on all the work B)12:16
Ritishalso the reply on mailing lists ^^12:17
octaviusYour welcome! It's good that you're interested. We need all the help we can get12:17
octaviusIn regards to the SoC design, studying nMigen is *very* important. Have you done Verilog or VHDL before?12:18
RitishYes sir, I have experience with verilog, I wouldnt say I'm a professional though.12:20
RitishJust some lab tasks and courses here and there12:20
octaviusWhen studying nMigen, you can easily compare with equivalent verilog, as well as yosys generated block diagrams. That learning nmigen wiki page shows how to do it. Make sure to always compare the three representations, and you'll catch on quickly12:23
RitishThat's helpful! Will follow that, and if still something is unclear to me, I shall pop up in this chat haha12:24
sadoon[m]Ritish: I guess you and I are on the same page then :p12:26
sadoon[m]I'm also starting to learn nmigen12:26
Ritishahaha, nice to meet you sadoon[m]! Good luck to us! :312:29
sadoon[m]Nice to meet you too :)12:30
*** programmerjake <programmerjake!~programme@2001:470:69fc:105::172f> has joined #libre-soc12:37
*** Ritish <Ritish!~Ritish@> has quit IRC12:39
*** cesar <cesar!~cesar@2001:470:69fc:105::76c> has joined #libre-soc12:43
*** Ritish <Ritish!~Ritish@2401:4900:6288:97e8:5d00:498d:107c:8f6b> has joined #libre-soc13:46
*** Ritish <Ritish!~Ritish@> has joined #libre-soc13:51
RitishIs there a way to permanently stay here and not leave once i close a browser window :/13:54
Ritishor are logs the only way to catch up, hmm, interesting13:55
octaviusYou can install an IRC client (for example HexChat). You also may need to register your nickname (if you haven't already).13:57
octaviusBut the client must remain open if you want to stay online. Also have bookmarked (I have it as my home page)13:58
programmerjakehi Ritish, i'm Jacob Lifshay13:59
programmerjakeyou can also access the chat here via Matrix (if you prefer that over IRC):
programmerjakethat link lets you pick from the list of Matrix clients, i'm using element14:02
programmerjakeif you use matrix, you don't need to have the client open to see old messages, though having the client running is definitely helpful if you want to be notified of new messages quickly14:09
Ritishthanks Andrey ^^14:31
RitishHey Jacob :)14:33
RitishThanks, I'll try that out as well!14:33
*** SaiRitishG[m] <SaiRitishG[m]!~gsritishm@2001:470:69fc:105::2:e2fa> has joined #libre-soc14:47
*** sai <sai!~sai@> has joined #libre-soc14:51
*** Ritish <Ritish!~Ritish@> has quit IRC14:54
*** sai is now known as Ritish14:54
*** Ritish85 <Ritish85!~Ritish@> has joined #libre-soc15:02
*** SaiRitishG[m] <SaiRitishG[m]!~gsritishm@2001:470:69fc:105::2:e2fa> has left #libre-soc15:03
*** Ritish85 <Ritish85!~Ritish@> has quit IRC15:03
RitishAlright, sorry on all those notifications peeps15:04
RitishBut, I think I've got this now :)15:04
RitishI feel pretty comfortable with HexChat15:05
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC15:43
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc15:43
sadoon[m]I'm finding the verilog output files from nmigen hard to read :(16:02
sadoon[m]They include a lot of "src" directives and $ variables16:03
programmerjakeyeah, they're not intended to be readable, they're intended to work.16:04
programmerjake$N variables are temporaries inserted by nmigen or yosys16:04
sadoon[m]What's the best way to understand the flow of a design written in nmigen?16:05
programmerjakesimulate it or use yosys's show command16:06
programmerjakee.g. yosys <<<"read_rtlil; prep; show -stretch -colors 1"16:07
sadoon[m]The output is verilog so I'll have to learn how to compile into "il" first then16:08
programmerjakeno, the output is rtlil, verilog is generated by yosys translating rtlil to verilog16:08
sadoon[m]Hmm the example code did not generate rtlil because it's written to do verilog16:09
sadoon[m]I'll look in the example repo16:09
programmerjakeyou can use nmigen.back.rtlil.convert16:10
programmerjakeor if you're using nmigen's main function just use rtlil or .il instead of verilog or .v16:11
sadoon[m]ah nice16:11
sadoon[m]That is more understanble yes16:13
programmerjakeso you can run `python nmigen/examples/basic/; yosys ...`16:13
programmerjakeactually if you're in the nmigen dir, just do examples/basic/ rather than nmigen/examples/basic/ctr.py16:15
sadoon[m]Let me try that16:15
programmerjakefor an already tested example:
programmerjakenote the python isn't very simple for that clmul example, but you should be able to easily adapt the yosys commands to do what you want16:22
sadoon[m]I noticed that outside of examples there are no "import * " which is the first thing I remember reading about before joining libre-soc :P16:24
sadoon[m]I'm guessing I need to do some python homework if I hope to be able to read anyone's code then16:25
*** Ritish <Ritish!~sai@> has quit IRC16:26
sadoon[m]One last question if I may :)16:27
sadoon[m]Is this code used in libre-soc?16:27
sadoon[m]I ask because I want to know what to expect16:27
lkclsadoon[m], yes, look up "wildcard import" in pretty much any programming language16:34
lkclnow take a look at litex source code and tell me if you can navigate any of it.16:34
sadoon[m]Yes I figured you were the one who wrote the wiki :D16:35
sadoon[m]No I agree it makes sense16:35
lkclwhat classes are imported there?16:35
lkcldo you know?16:35
sadoon[m]lmao no16:36
lkclit gets particularly bad once you realise, on deep investigation, that the *exact same class name* is used in multiple places16:36
sadoon[m]It's actually one of the reasons I find a lot of python code unreadable16:36
sadoon[m]Many people do it16:36
lkclthey have no idea that they're writing unmaintainable code16:37
lkcland they don't care16:37
lkclas in, they *literally* do not care16:37
lkclit's not their problem, it's yours16:37
lkclthey can navigate it16:37
lkcl(because they wrote it)16:37
lkclso what's the problem again?16:37
lkcli worked for a company that had very strict rules about this.  we were not allowed to use "from x import y" *at all*16:38
lkclit had to be just16:38
lkcl"import x.y.z.a"16:38
lkclfollowed by16:39
programmerjakeif you use an ide/text editor with pyls or similar, it can tell you exactly where symbols are defined, so that does help, though i agree that wildcard imports in python are generally bad16:39
lkclinstance = x.y.z.a(xxxxx)16:39
lkclthat's fine (it isn't) for people who actually use IDEs16:39
lkclbut those IDEs are in absolutely no way going to help reading of code that is online16:39
programmerjakenow that (disallowing from x import y) is imho a step too far16:40
lkclwhich if you've observed interactions with other people, is the majority of communication about libre-soc.16:40
lkclproviding links to the git repo files16:40
lkcletc. etc.16:40
lkclnot in any way via any kind of "IDE"16:40
lkclyes, i agree16:40
lkclit was a total pain in the ass16:40
programmerjake> but those IDEs are in absolutely no way going to help reading of code that is online16:41
programmerjakenot completely true, github added ide-like features of following definitions in python16:41
lkclbut i get why they chose to do that, and it was a MASSIVE project.  over half a million lines of complex mathematical python code16:41
lkclwe don't use github16:41
programmerjakei know16:41
lkcland i am not interested in discussing what github does, github provides, github github github16:41
programmerjakethough gitlab might be convinced to add those features...16:42
lkclit is not the be-all and end-all of the sum total of all programming in the world and it would be very stupid of us to depend on it16:42
lkcl(as a Libre Project)16:42
lkclthe pain-in-the-ass of banning "from x import y" at least prevented ambiguity mistakes where two or more classes could be the same name16:43
programmerjakejust cuz github is not open source and has sometimes bad network effects doesn't mean all their ideas are bad...16:43
lkclaliases would have fixed that, but they didn't go for it.16:43
lkclsadoon[m], basically, when you write say one module, use of wildcard imports is "perfect" (it isn't).16:44
lkclwhen you are "learning", or writing non-serious programs, maximum 50-150-200 stand-alone lines of HDL16:45
lkclwhere you are not going to interact with anyone else, not share the code, not cooperate or collaborate with anyone else16:45
lkclnot writing a library16:45
lkclnot designing anything large or serious16:45
lkclwildcard imports are (they're not) "okay"16:46
lkclas in16:46
programmerjakeoh, gitlab already supports goto definition, but you have to setup some config files first:
sadoon[m]<lkcl> "they can navigate it" <- Even that becomes a problem after a few months or so16:46
sadoon[m]Because looking at code you wrote months ago is like looking at new code16:46
lkclthe damage they cause is to you and to you only, i.e. "minimum"16:46
lkclbasically... yes.16:46
lkclin nmigen itself there are locations where there are a staggering 150+ imports from "from nmigen import *", and only two actual things are actually used/needed.16:47
lkclthis is _everywhere_ within nmigen16:47
programmerjakeimho one of the only spots import * is beneficial is when you're duplicating the public interface of another module, so `from xyz import abc` works instead of only `from xyz.a.b import abc`16:50
lkclyes. if there are any code-morph issues, for support purposes of legacy APIs, yes absolutely16:50
lkclwe actually do do this inside libre-soc16:51
lkclwhen openpower-isa was split out16:51
programmerjakethat imho requires setting __all__ in the module you're importing from, to avoid importing extra junk16:51
lkclthe technique helped migrate the codebase to a new module layout, without massive disruption.16:51
lkcland because i know it is so mis-used, i made absolutely sure that every use of wildcard imports was documented.16:52
lkcl(rule-breaking always needs documenting at the point that the rule is broken)16:52
lkcli had all these things drummed in to me over 20+ years by different people. sigh :)16:53
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC17:05
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has joined #libre-soc17:06
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@> has quit IRC17:16
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc17:17
*** ghostmansd[m] <ghostmansd[m]!> has quit IRC19:46
*** ghostmansd[m] <ghostmansd[m]!> has joined #libre-soc20:53
*** octavius <octavius!> has quit IRC21:30

Generated by 2.17.1 by Marius Gedminas - find it at!