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
<ravenslofty[m]> unfortunately Amaranth does not support uninitialised memories
<ravenslofty[m]> or....perhaps "considers them a misfeature" is a better phrase
<ldcd[m]> Yeah that was my understanding
<whitequark[cis]> this support will be added because SRAMs in ASICs are not representable otherwise
<whitequark[cis]> it will require a considerable amount of work because the simulator must now support
<whitequark[cis]> * now support 'x
<ldcd[m]> Oh also
<ldcd[m]> when I create a memory with a readport and a write port do I add both ports and the memory as submodules, or just the ports
<ldcd[m]> SyncFIFO does the second and SyncFIFOBuffered does the first
<whitequark[cis]> we're actually in the middle of a transition from adding ports as submodules to adding the memory as a submodule for various historical reasons
<whitequark[cis]> it will be just the memory eventually, right now both work
<ldcd[m]> Ah ok
<ldcd[m]> was getting weird results with the first
<ldcd[m]> Ok adding just the module gives something more like what I would expect, lets see if vivado likes it better
notgull has quit [Ping timeout: 246 seconds]
notgull has joined #amaranth-lang
vipqualitypost[m has quit [Quit: Idle timeout reached: 172800s]
Degi has quit [Ping timeout: 255 seconds]
Degi has joined #amaranth-lang
omnitechnomancer has quit [Quit: Idle timeout reached: 172800s]
_whitenotifier-b has quit [Ping timeout: 256 seconds]
frgo has quit [Quit: Leaving...]
frgo has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
Psentee has quit [Quit: Off]
Psentee has joined #amaranth-lang
Psentee has quit [Quit: Off]
Psentee has joined #amaranth-lang
Psentee has quit [Quit: Off]
Psentee has joined #amaranth-lang
<zyp[m]> in the async simulator interface I'm prototyping, I'm using get/set to read and write values; what are good pairs to interact with streams? I'd use get/put and get_packet/put_packet if not for the fact that get overlaps
<zyp[m]> send/recv for single transfers sounds kinda wrong
nelgau has quit [Read error: Connection reset by peer]
nelgau_ has joined #amaranth-lang
nelgau_ has quit [Read error: Connection reset by peer]
nelgau has joined #amaranth-lang
<zyp[m]> <zyp[m]> "I rewrote the simulation I did..." <- > <@vegard_e:matrix.org> I rewrote the simulation I did yesterday using the async API I did a couple of weeks ago: https://paste.jvnv.net/view/NUcbq
<zyp[m]> > gonna try this out a bit as I add streams and see how the ergonomics works out
<zyp[m]> updated with streams: https://paste.jvnv.net/view/5aKEX
nelgau has quit [Ping timeout: 240 seconds]
<tpw_rules> can `lib.wiring.?connect` be used under `m.If`?
<zyp[m]> yes
iposthuman[m] has quit [Quit: Idle timeout reached: 172800s]
duskwuff[m] has quit [Quit: Idle timeout reached: 172800s]
nelgau has joined #amaranth-lang
muddassir_ali_71 has joined #amaranth-lang
<muddassir_ali_71> I have multiple modules files that connect all the modules in main.
<muddassir_ali_71> So is it possible to generate a single verilog file from a main file.
<muddassir_ali_71> I want a single verilog file instead of different files
<ravenslofty[m]> I assume you have a top-level module somewhere, right?
<muddassir_ali_71> Yes
<ravenslofty[m]> Then generate verilog for that module.
<muddassir_ali_71> Yes
<muddassir_ali_71> Only that module
<ravenslofty[m]> I take it that you don't know how then
<muddassir_ali_71> Unfortunately not
<muddassir_ali_71> bar and quux should be initiated in the top level or not?
<ravenslofty[m]> They're the ports of your top level
<ravenslofty[m]> so yes, otherwise it doesn't know how your module interfaces with the outside world
<ravenslofty[m]> keep in mind though that you're skipping some of the creature comforts of Amaranth, e.g. `amaranth-boards` etc
<muddassir_ali_71> Actually i dont have ports in the top lvl.
<muddassir_ali_71> Basically i call other modules and make connections between them in the top lvl
<ravenslofty[m]> okay, but you need some way to interface with the outside world, right?
<muddassir_ali_71> Yes
<ravenslofty[m]> which should be your top-level ports.
MuddassirAli[m] has joined #amaranth-lang
<ravenslofty[m]> yep, I have
<ravenslofty[m]> don't you want to blink some lights on a board, or react to switches?
<galibert[m]> ravenslofty: the tradition with amaranth on fpga is not to having anything on top but to instantiate gpio modules, e.g. have everything explicit
<MuddassirAli[m]> ravenslofty[m]: so what should I do?🥲
<galibert[m]> Do you actually have a fpga devboard or are you doing everything in simulation?
<MuddassirAli[m]> galibert[m]: on a simulation only but i want to run this on fpga later
<galibert[m]> in simulation you don't really need ports. Note that you don't really need verilog either, amaranth internal simulation facilities are nice
<MuddassirAli[m]> let me clear i have the design, i want to run this on arty A7 fpga so i need verilog file but it can not generate a single file
<MuddassirAli[m]> it generate verilog files for each and every module but not for top module
<ravenslofty[m]> Uh, I'm pretty sure it should: there should be a "top" module
<ravenslofty[m]> Actually.
<ravenslofty[m]> You need to add these to `m.submodules` so that Amaranth instantiates them
<whitequark[cis]> but... they do?
<whitequark[cis]> right under where you highlighted
<ravenslofty[m]> oh, I'm not thinking. clearly I need more sleep
<ravenslofty[m]> I guess I'm used to the idiom of `m.submodules.foo = foo = Foo()`
<whitequark[cis]> there's also a warning
Wanda[cis] has quit [Quit: Idle timeout reached: 172800s]
iposthuman[m] has joined #amaranth-lang
<iposthuman[m]> I finally got SRAM to work. Thanks @Catherine for the review and suggestions, and @galibert for your pointers, among many others--much appreciated. Two things caused it to fail (actually many but...), improper signaling and WE not being held long enough. The video shows the memory addresses (vertical pmod) and the status code (horizontal pmod) 🙂
_whitelogger has joined #amaranth-lang
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #amaranth-lang