whitequark[cis] changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings: Amaranth each Mon 1700 UTC, Amaranth SoC each Fri 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
sugarbeet has quit [*.net *.split]
ovf has quit [*.net *.split]
Abhishek_ has quit [*.net *.split]
crzwdjk has quit [*.net *.split]
V has quit [*.net *.split]
bob_twinkles has quit [*.net *.split]
FireFly has quit [*.net *.split]
miek has quit [*.net *.split]
josuah has quit [*.net *.split]
notgull has quit [*.net *.split]
anuejn has quit [*.net *.split]
vup has quit [*.net *.split]
sugarbeet has joined #amaranth-lang
Abhishek_ has joined #amaranth-lang
nak has quit [*.net *.split]
electronic_eel has quit [*.net *.split]
mindw0rk has quit [*.net *.split]
tucanae47 has quit [*.net *.split]
key2 has quit [*.net *.split]
TD-Linux has quit [*.net *.split]
miek has joined #amaranth-lang
tucanae47 has joined #amaranth-lang
nak has joined #amaranth-lang
ovf has joined #amaranth-lang
key2 has joined #amaranth-lang
FireFly has joined #amaranth-lang
crzwdjk has joined #amaranth-lang
FireFly has quit [Changing host]
FireFly has joined #amaranth-lang
electronic_eel has joined #amaranth-lang
bob_twinkles has joined #amaranth-lang
vup has joined #amaranth-lang
anuejn has joined #amaranth-lang
notgull has joined #amaranth-lang
V_ has joined #amaranth-lang
mindw0rk has joined #amaranth-lang
TD-Linux has joined #amaranth-lang
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 260 seconds]
Degi_ is now known as Degi
<_whitenotifier-f> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/fc7b3a4154b6...c1b12cfd7181
<_whitenotifier-f> [YoWASP/yosys] whitequark c1b12cf - Update dependencies.
<_whitenotifier-f> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/21957e33ef3d...e8e470b370c3
<_whitenotifier-f> [YoWASP/nextpnr] whitequark e8e470b - Update dependencies.
jn has quit [Ping timeout: 245 seconds]
jn has joined #amaranth-lang
jn has joined #amaranth-lang
V_ is now known as V
cr1901_ has joined #amaranth-lang
cr1901_ has quit [Remote host closed the connection]
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #amaranth-lang
David17 has joined #amaranth-lang
<David17> Good morning everyone! I'm new to amaranth, I'm having problems with setting up my environment. I have done the installation following the installation guides from the Github. When i try to run the code I'm getting this error ```Traceback (most recent call last):
<David17>   File "/home/darwinist/amaranth/amaranth.py", line 1, in <module>
<David17>     from amaranth import *
<David17>   File "/home/darwinist/amaranth/amaranth.py", line 4, in <module>
<David17>     class UpCounter(Elaboratable):
<David17>                     ^^^^^^^^^^^^
<David17> NameError: name 'Elaboratable' is not defined``` I do not what i have to do because the example i used is from the official documentations. Kindly assist me.
<galibert[m]> Don’t call your source file amaranth.py because it ends up importing itself
David17 has quit [Ping timeout: 245 seconds]
<galibert[m]> Hope it's a connection issue, because otherwise that person waited for a whole minute for the answer before quitting
David5 has joined #amaranth-lang
<omnitechnomancer> Classic python problem
<urja> hm, an another david has since joined... just in case it's the same one:
<urja> 08:44 <galibert[m]> Don’t call your source file amaranth.py because it ends up importing itself
<David5> Yes I'm the same one, i joined as a guest . How do i resolve this problem? Is it that that amaranth was not installed on the system?
<urja> rename your source file
<David5> I'm having this now, ⦗OSS CAD Suite⦘ darwinist@darwinist-Lenovo-V15-IGL:~/amaranth$ python3 ama.py
<David5> Traceback (most recent call last):
<David5>   File "ama.py", line 1, in <module>
<David5>     from amaranth import *
<David5> ModuleNotFoundError: No module named 'amaranth' How can i successfully install amaranth?
<galibert[m]> now it's that amaranth is not installed
<galibert[m]> either you install it in your system from the git, or you use Catherine 's nice packaging
<David5> I'm kindly asking for the link
<galibert[m]> for the installation documentation. I'm not sure where the packaged version is. Note that you really want a development version, the latest release was a while ago and the language has changed significantly for the better since
<David5> Thank you
<David5> When i run the file, I'm not getting any error related to module, however, in the code pylance is reporting this "Import "amaranth" could not be resolvedPylancereportMissingImports" I'm totally lost.
<galibert[m]> pylance I know nothing about (I don't use windows)
<David5> I'm using linux ubuntu , but I'm using visual studio code and python extension.
<whitequark[cis]> David5: you need to set the VSCode Python executable (lower right corner) to whichever Python you used to install Amaranth
<whitequark[cis]> ("which python" should print that)
<David5> the newest version "python3.11.4.64"
<whitequark[cis]> that's a very strange python version
Guest67 has joined #amaranth-lang
David5 has quit [Quit: Ping timeout (120 seconds)]
Guest67 has quit [Ping timeout: 245 seconds]
<_whitenotifier-f> [amaranth] sporniket opened pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919
<_whitenotifier-f> [amaranth] codecov[bot] commented on pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919#issuecomment-1738830423
<_whitenotifier-f> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to gh-readonly-queue/main/pr-919-8c56b2033f57c612eba3c5a209e23798f69a9633 [+0/-0/±1] https://github.com/amaranth-lang/amaranth/commit/0c3ada625033
<_whitenotifier-f> [amaranth-lang/amaranth] sporniket 0c3ada6 - Reference to my series of articles
<_whitenotifier-f> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-919-8c56b2033f57c612eba3c5a209e23798f69a9633 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-f> [amaranth] sporniket commented on pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919#issuecomment-1738841217
<_whitenotifier-f> [amaranth] whitequark commented on pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919#issuecomment-1738843322
<_whitenotifier-f> [amaranth] sporniket commented on pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919#issuecomment-1738844366
<_whitenotifier-f> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/8c56b2033f57...0c3ada625033
<_whitenotifier-f> [amaranth-lang/amaranth] sporniket 0c3ada6 - Reference to my series of articles
<_whitenotifier-f> [amaranth-lang/amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-919-8c56b2033f57c612eba3c5a209e23798f69a9633
<_whitenotifier-f> [amaranth] whitequark closed pull request #919: [doc] tutorial : reference to my series of articles - https://github.com/amaranth-lang/amaranth/pull/919
<_whitenotifier-f> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-919-8c56b2033f57c612eba3c5a209e23798f69a9633 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-f> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±36] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/4980c1b12cbc...2e40cb9e1cb8
<_whitenotifier-f> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 2e40cb9 - Deploying to main from @ amaranth-lang/amaranth@0c3ada62503359900f185a9b2d8f122b2d952013 🚀
notgull has quit [Ping timeout: 260 seconds]
notgull has joined #amaranth-lang
<_whitenotifier-f> [amaranth] jalcim opened issue #920: agregate Signal() - https://github.com/amaranth-lang/amaranth/issues/920
<_whitenotifier-f> [amaranth] whitequark commented on issue #920: agregate Signal() - https://github.com/amaranth-lang/amaranth/issues/920#issuecomment-1738928371
<_whitenotifier-f> [amaranth] whitequark closed issue #920: agregate Signal() - https://github.com/amaranth-lang/amaranth/issues/920
FireFly has quit [Quit: Leaving]
FireFly has joined #amaranth-lang
josuah has joined #amaranth-lang
<mcc111[m]> So, I got my Colorlight i9 (the ext board here) https://github.com/wuxx/Colorlight-FPGA-Projects#ext-board yesterday, this morning I'm trying to mess with it... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/yvvPFgmaWiPCSvsBkUUzObPX>)
<zyp[m]> white electricians tape or similar tends to work well on overly bright leds
<zyp[m]> 2: openFPGALoader supports CMSIS-DAP and might worth with the DAPLink
SpaceCoaster has quit [Quit: Bye]
<zyp[m]> 3: you'll have to make a UART instance hooked to the pins, and hook it to something to talk to
SpaceCoaster has joined #amaranth-lang
<zyp[m]> 4: yes, although I don't think it's got enough RAM to usefully run linux, but you can absolutely run baremetal risc-v code on it
<mcc111[m]> "I believe" this sentence fragment was meant to continue "I believe amaranth has some capability for installing firmware but I only find on amaranth-lang the docs for the ice version"
<zyp[m]> 5: yes, you need an addon with jacks and magnetics
<mcc111[m]> zyp[m]: 2MB durable storage and 8MB RAM. I *absolutely* in the late 90s ran Linux off a floppy disk on a machine with 8 MB of RAM, but I don't know if current Linux can match that >_>
<zyp[m]> 6: if you want to do USB, it's easier to just add a second USB port hooked to two regular IO
<zyp[m]> 7: IIRC the daplink is a plain stm32 running a daplink firmware build that might even be opensource, you should be able to program it with any SWD adapter
<whitequark[cis]> mcc111[m]: 8MB RAM is not enough these days; 16MB is just about the bare minimum, 32-64 is what many mid and high end SOHO routers use
<whitequark[cis]> 2MB storage will require heavy compression with squashfs to be usable and even then barely
<whitequark[cis]> like you get busybox and that's about it
<whitequark[cis]> if you want tcpdump? too bad, tcpdump takes like 800K
<mcc111[m]> Thanks zyp
<mcc111[m]> Wait so this board has an stm32 running on it?
<zyp[m]> yeah, just dug out mine, it's got a stm32f103c6
<mcc111[m]> Huh
<mcc111[m]> I wonder which is faster the 72 MHz STM controller or a RISCV on the colorlight
<mcc111[m]> 72 MHz
<mcc111[m]> whitequark[cis]: yeah i was hoping for a c compiler but in 2MB probably not
<whitequark[cis]> tcc might ift
<whitequark[cis]> * tcc might fit
<whitequark[cis]> mcc111[m]: > <@mcc111:matrix.org> Huh... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/mWTskQaxgjUPBJRRymcLTrfm>)
<zyp[m]> ecp5 fabric can be clocked a bit faster, but a cortex-m3 might still get more work done per cycle
<zyp[m]> on the other hand, a risc-v in a FPGA can offload the heavy stuff to the FPGA
<zyp[m]> I mean, to custom cores in the FPGA fabric, outside of the CPU core
<mcc111[m]> Yeah
<mcc111[m]> My overall "project" with the fpgas right now, I think, is to get to a point where I can make "players" for some commodity game engines (GameMaker, Godot) where the game logic is running on conventionally clang-compiled riscv and I've got some helper "PPU" chips basically executing the engine's display logic
<whitequark[cis]> that is extraordinarily ambitious
<whitequark[cis]> I don't think that is a good first FPGA project
<mcc111[m]> I assume trying to make like, custom math coprocessors would involve painful llvm hacking but just setting some registers that do drawing would be easier
<mcc111[m]> whitequark[cis]: Well, it's not, it's gonna be like my third or possibly tenth FPGA project
<mcc111[m]> But that's the star I'm aiming toward currently
<whitequark[cis]> mcc111[m]: yep
<mcc111[m]> This is I think my first FPGA\* project: https://mastodon.social/deck/@mcc/111139285836623237
<mcc111[m]> \* Well, my first project above the "ICE40 with some LEDs" level, I'm already past that
<mcc111[m]> s//deck//
<galibert[m]> You're going it over hdmi?
<galibert[m]> s/going/doing/
<mcc111[m]> This said, it's a *little* slow to write and debug complex logic in FPGA. So since I feel like I've already got the "logic that does drawing to HDMI" part down (or at least, drawing to the Analogue Pocket's scaler… now that I have the colorlight I'm hoping I can reproduce the rule30 thing I already have running on the Pocket in pure HDMI) I *am* hoping I can get to the "stick a small RISCV softcore in there, build a binary blob in
<mcc111[m]> Rust, run that on the RISCV softcore for any nontrivial logic" stage pretty quick
<mcc111[m]> (I thought I'd written down the name of an amaranth riscv core Catherine had recommended me, but in my notes I wrote down Catherine recommended "nano rvi", which google only finds a C emulator by that name, so either this note is something else or I misheard the name :(
<mcc111[m]> galibert[m]: No, this is running on the Analogue Pocket, it has a bespoke fpga-to-fpga protocol for writing into a framebuffer and then they have a "scaler" that outputs your framebuffer to either the Pocket's screen or to HDMI if you plug that in. So I assume this is notably easier than participating in HDMI, but I don't think it will be *that* different because it's got the same basic structure of generating pixels topleft to
<mcc111[m]> bottom right
<galibert[m]> so you're managing external ram comms still
<galibert[m]> not bad at all
<mcc111[m]> Also i2s :) it's a little quiet in the video but it is making sound
<whitequark[cis]> mcc111[m]: > <@mcc111:matrix.org> This said, it's a *little* slow to write and debug complex logic in FPGA. So since I feel like I've already got the "logic that does drawing to HDMI" part down (or at least, drawing to the Analogue Pocket's scaler… now that I have the colorlight I'm hoping I can reproduce the... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/pqDrJtqAIzJCgZoAsotzDFqq>)
<whitequark[cis]> not nanorvi
<whitequark[cis]> hdmi isn't super difficult
<mcc111[m]> whitequark[cis]: Minerva. Thanks.
<mcc111[m]> I have also some links to "vexriscv". Is that one you recommend?
<whitequark[cis]> vexriscv is a smaller and faster one but it's in verilog
<mcc111[m]> understood
<mcc111[m]> sporniket had this "cradle" project that does HDMI from Amaranth on the Colorlight, I was hoping to use that as a library or model
<galibert[m]> hdmi is just fast and gets more kinky if you go into edid territory
<mcc111[m]> I have this lil bitty 1024x600 extra hdmi monitor on my desk
<mcc111[m]> Outputting only 1080p seems fine but it would be nice if I could shift my draw logic to support the x600 monitor when it plugs in. I assume that requires EDID
<galibert[m]> well the thing with edid (and things like ddr ram) is I don't really see how doable it is without a cpu core handy (which can be in the fpga of course)
<whitequark[cis]> edid is entirely doable without any cpu
<whitequark[cis]> and in fact easier (!)
<mcc111[m]> (Also, one thing that's nice about the Pocket upscaler is it supports any size between 16x16 and 800x720. The demo in the video above is actually emitting a screen of size 160x90. So I doubt an HDMI monitor will accept a 90p signal. Probably I have to write at least a line based upscaler to have code designed for Pocket run on the Colorlight with HDMI.)
<whitequark[cis]> it's just an i2c memory
<galibert[m]> getting the data yes, doing something with it though?
<whitequark[cis]> you can parse it just fine in HDL
<mcc111[m]> edid is i2c?
<whitequark[cis]> yes
<mcc111[m]> convenient
<whitequark[cis]> yes
<whitequark[cis]> a lot of monitors expose non-edid stuff there too :)
<galibert[m]> yeah, the hardware interface for edid is easy
<whitequark[cis]> like they let you switch outputs programmatically or sth
<mcc111[m]> Hm
<mcc111[m]> Am I correct in my assumption hdmi monitors/tvs can't accept arbitrary screensize signals (like 160x90) btw
<galibert[m]> smallest my main monitor can do is 320x175
<galibert[m]> at 85.27Hz somehow, wonder where those values are coming from
<mcc111[m]> hm
<mcc111[m]> I guess an EDID sniffer that gets the monitor to report what it supports and then prints it over serial might be a good early project
<galibert[m]> if you have a linux thing connected to the monitor you can trivially get the edid for comparison purposes
<mcc111[m]> o rly
<galibert[m]> yeah, look for the files called "edid" in /sys
<mcc111[m]> thanks
<mcc111[m]> Hm i've only got linux on the desktop, i wonder if I can write some edid printer program for my wife's Ambernic
<mcc111[m]> Probably there's a mac equivalent if it's so easy on linux tho
<galibert[m]> the desktop doesn't have a extra unused hdmi port or something?
<mcc111[m]> oh sorry, dropped a thought there
<mcc111[m]> what i mean is, that'll get me EDID for my mini and regular monitors, but it would be inconvenient to move the desktop into the room with the tv
<galibert[m]> Ahhh
<mcc111[m]> i think it would be very funny to display 4k from the colorlight
<galibert[m]> it's high frequency though
<mcc111[m]> too high frequency for the colorlight?
<galibert[m]> It's a little over 500MHz, I kinda have my doubts there
<mcc111[m]> oh :/
<galibert[m]> yeah, that's a lot of pixels to push in very little time
<mcc111[m]> I'm not worried about generating the pixels. All I have to do there is design my demo around doing something that can be generated at adequate speed.
<whitequark[cis]> 500 mhz might work just barely
<galibert[m]> Catherine: you'll need an external encoder to ensure that you don't have to go over the pixel clock (which is more like 530MHz fwiw)
<mcc111[m]> Bitbanging at 500mhz is another manner tho. I think someone (Catherine?) mentioned a helper chip that takes a 24bit UART basically and then did the HDMI protocol itself…
<whitequark[cis]> galibert[m]: i mean you can do this on the ecp5
<mcc111[m]> The rule 30 demo above generates an entire row of values in a single cycle
<galibert[m]> the adv7513? It goes only up to 165MHz pixel clock (aka full hd)
<mcc111[m]> Although I'm not sure, if I increased the row width it from 400 pixels wide to 3840 wide, the design would still fit :P
<whitequark[cis]> also what about 4k@30?
<whitequark[cis]> that's half the pixclock
<galibert[m]> Catherine: I don't know the line-level protocol for hdmi, isn't it mostly serial?
<whitequark[cis]> yeah? ecp5 has special hdmi output blocks more or less
<whitequark[cis]> 7:1 gearboxes
<mcc111[m]> whitequark[cis]: aaactually in the rule30 demo I'm simulating 30hz by frame duplication. 60hz was too fast to look interesting
<galibert[m]> very nice
<mcc111[m]> galibert[m]: it seems like, since people are shipping 4k devices on the market, there must be some part functionally akin to the adv7513 but running at 4k speeds, and if that part isn't available at "our" level (IE ordering single units off aliexpress) it will probably get there before too long
<mcc111[m]> * shipping 4k-supporting, * hdmi devices on
<galibert[m]> makes for interesting reading
<mcc111[m]> <mcc111[m]> "This is I think my first FPGA..." <- > <@mcc111:matrix.org> This is I think my first FPGA\* project: https://mastodon.social/deck/@mcc/111139285836623237... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/eJMQZqsawyZcxgYyLGgczgKV>)
<mcc111[m]> I just copied something off my mastodon when I saw a cellular automata and it turned out id posted more than one of those in a 24 hour period
FFY00 has quit [Read error: Connection reset by peer]
FFY00_ has joined #amaranth-lang
FFY00_ has quit [Remote host closed the connection]
FFY00 has joined #amaranth-lang
Wanda[cis] has quit [Quit: Idle timeout reached: 172800s]
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
jfng[m] has quit [Quit: Idle timeout reached: 172800s]
sporniket has joined #amaranth-lang
<sporniket> Hello, mcc111[m], about the HDMI port of the colorlight, to my knowledge only the TMDS channels and clock are wired, I fear that EDID is not possible
<sporniket> also, the pll can output a max 400MHz clock for TMDS link, so a max pixelclock of 40MHz
<sporniket> And this ECP5 it has no SERDES block, this is for higher specs ECP5 packages (well, I could do without for my blinky screen, so I believe that it's good enough though)
<sporniket> my demo is basic dvi through hdmi, the orchestrator is very simple and do not handle things like data island to output sound.
<sporniket> however I hope it helps you a little
sporniket has quit [Quit: Client closed]
sporniket has joined #amaranth-lang
sporniket has quit [Client Quit]
<omnitechnomancer> Even if that ECP5 had the SerDes they would not be hooked up
agg has quit [Ping timeout: 248 seconds]
phire has quit [Ping timeout: 248 seconds]
roflincopter has quit [Ping timeout: 248 seconds]
phire has joined #amaranth-lang
agg has joined #amaranth-lang
roflincopter has joined #amaranth-lang