<whitequark[cis]>
(that said--without having read the code--I think synchronizing between processes is potentially a valid use case and the way you'd go about it currently is using Signal edges as sync primitives)
<zyp[m]>
if you've got one process that's generating a clock and another process that's simulating logic on that clock, then the second process should be triggered by the edges generated by the first process, and that relationship would give you an inherent execution order
<zyp[m]>
and yeah, explicit sync signals should work too
<jfng[m]>
such signals are only accessed by simulation logic, not by the RTL design
<whitequark[cis]>
put them in traces=[]
<jfng[m]>
missed that, thanks
indy has quit [Ping timeout: 245 seconds]
indy_ has joined #amaranth-lang
indy_ is now known as indy
<mcc111[m]>
<zyp[m]> "> <@mcc111:matrix.org> so, i..." <- one of my processes is generating the clock used by the other, because i'm in an unusual situation where `add_clock` is not available.
<zyp[m]>
sure, but that shouldn't matter
<zyp[m]>
any process triggered by a clock edge would necessarily execute after the process generating that edge
<mcc111[m]>
<zyp[m]> "simulate_fake_clock() is an..." <- so i thought python async was supposed to work like generators/coroutines
<mcc111[m]>
and i hoped one await would run until one await and then vice versa. i may be mixing up multiple generations of python async :(
<zyp[m]>
they are coroutines, but doesn't work like you imagine
<mcc111[m]>
s/await/yield/
<mcc111[m]>
are the amaranth processes supposed to be async def at all? those were defs until i started fiddling with it yesterday
<mcc111[m]>
asked a different way, are async and yield paired?
<zyp[m]>
the new simulator interface makes them all async
<mcc111[m]>
mcc111[m]: if the answer to this is no then that's great because i know which documentation to read to learn what python concept i have wrong :P
<zyp[m]>
only async functions can use await
<mcc111[m]>
zyp[m]: "new" is this last month?
<zyp[m]>
await roughly replaces the use of yield in the old simulator interface
<mcc111[m]>
okay
<mcc111[m]>
so i'm not just acting arbitrarily, something actually did change
<zyp[m]>
yes, RFC 36 happened
<mcc111[m]>
if my goal is to upgrade code from pre- to post- RFC 36, would reading RFC 36 likely be enlightening in a way that the current simulator docs would not?
<zyp[m]>
the simulator docs were written after RFC 36 and documents the new interface, and should be a better resource than the RFC itself
<mcc111[m]>
ok
<mcc111[m]>
<zyp[m]> "if you've got one process that's..." <- ok i see how this would work now
<whitequark[cis]>
there will be no formal meeting today (I need rest) but I encourage everyone to discuss the latest RFC PR, the LFSR proposal
<whitequark[cis]>
I actually haven't looked at it yet, but I do know that I'm excited to use it
<jfng[m]>
this is normal, all fields of the register are updated on a write
<jfng[m]>
also, csr writes are atomic, so if you have a 32b register behind an 8b CSR bus, then the written values are buffered until the last 8b write (to the upper address), then the register gets updated atomically
<antoinevg[m]>
Cool, tx jfng !
toshywoshy has quit [Read error: Connection reset by peer]
toshywoshy has joined #amaranth-lang
nyanotech has quit [Remote host closed the connection]
nyanotech has joined #amaranth-lang
skipwich has quit [Ping timeout: 276 seconds]
skipwich has joined #amaranth-lang
bl0x[m] has quit [Quit: Idle timeout reached: 172800s]