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 · play https://amaranth-lang.org/play/ · code https://github.com/amaranth-lang · logs https://libera.catirclogs.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
_whitelogger has joined #amaranth-lang
Degi has quit [Ping timeout: 252 seconds]
Degi has joined #amaranth-lang
ydnatag[m] has joined #amaranth-lang
<ydnatag[m]> I think there is a bug in yosys for ecp5. rtlil is properly generated with all init attribute for all the cases (sgsr, async and sync resets) but looking at the .dot file, I'm seeing that there is no reset value for the flip flops
<ydnatag[m]> There is only one signal driving LSR but it looks like a sync clr https://rw1nkler-symbiflow-arch-defs.readthedocs.io/en/latest/generated/ecp5/models/TRELLIS_FF.html
<whitequark[cis]> is init value even reflected for FFs?
<whitequark[cis]> if you can give a specific example of a netlist that contains an error and a description of the error that would help; it's not clear to me what problem you're reporting
<ydnatag[m]> I think that yosys is not implementing properly the reset value of the register for ecp5
<ydnatag[m]> In that code, I assigned init=1 to "signal_with_reset"
<ydnatag[m]> And i tried 3 different types of reset:sgsr, sync and async
<ydnatag[m]> And looking at the output of yosys, the init value is not anymore for the signal signal_with_reset
<ydnatag[m]> (It is a ff)
<ydnatag[m]> I was expecting to see a lut/mux driven by rst signal close to the ff because TRELLIS_FF only has LSR signal that sets a 0 to it.
zyp[m] has quit [Quit: Idle timeout reached: 172800s]
<ydnatag[m]> I'm looking at the json instead of the .dot file and I think I'm completely wrong xD. I will test that code in hw and check the reset. if it is not the reset value I don't know what is happening in my design, outputs start in 0 instead of 1. Sorry for the noise
<benny2366[m]> ok so apparently this is the right code to get it "working" without errors ```from amaranth.sim import Simulator... (full message at <https://catircservices.org/_irc/v1/media/download/AcIFNh9gWjYpk2-FljDJx1iK_c77k66s79bMdNjXm9AmbBPwr9qQx_2DGoGzHEQeZBC3gcFxS8cEqnRHJd2ZP22_8AAAAAAAAGNhdGlyY3NlcnZpY2VzLm9yZy9Qa1Rmd25Jc0xCTFlCd0xralRLcHR3ZXo>)
<benny2366[m]> and when I run it from oss cad suite i get the following error
<benny2366[m]> also the version of oss cad suite is 20250715
<whitequark[cis]> you are running a .bat file from powershell
<whitequark[cis]> .bat files only work in cmd.exe
<benny2366[m]> ok , that answers that part of the question, the first part of the question is apprantly running the "main" file . did that but did not see any vcd file being outputted
conventia[m] has joined #amaranth-lang
<conventia[m]> This template shows how to do a blinky and simulate/synthesize it for the IceStick, VersaECP5 or TangNano. This should help with all your python questions, hopefully.
<benny2366[m]> there arn't many diffrences , but then again that does not answer my question sadly enough
<benny2366[m]> * many diffrences in my vs you'r code, but
<whitequark[cis]> yes, you get output from it by just running it
<whitequark[cis]> the .vcd file will be placed in your current working directory, in this case c:\users\benny
<whitequark[cis]> s/:\/:\\/, s/\benny/\\bende/
<whitequark[cis]> ah, you're also running the wrong file
<whitequark[cis]> you should run buttontoled_TB.py
<benny2366[m]> sorry?
<benny2366[m]> AAAH ok it did run but was looking in the wrong place
<benny2366[m]> and how does one let it place the vcb file in an other directory? ```with sim.write_vcd("C:\Users\bende\Documents\GitHub\amaranth_playground\buttontoled.vcd"):
<benny2366[m]> ``` i would think this would do the trick but it's complaining about unicodec somting something ``` ^
<benny2366[m]> SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape```
<benny2366[m]> * and how does one let it place the vcb file in an other directory? ```with sim.write_vcd("C:\Users\bende\Documents\GitHub\amaranth_playground\buttontoled.vcd"):... (full message at <https://catircservices.org/_irc/v1/media/download/ARk05I3ao8JVGfw6ybp1Caal7QCKUkWzVyESjjJZ16FFZ6mPI9rXAyKHD1jK9m6YZkNGQq-Myz4wjUB8h8d9lX2_8AAAAAAAAGNhdGlyY3NlcnZpY2VzLm9yZy9zVXR4UnVwSVNCRlZpSmJNTnl6a1NMd00>)
<galibert[m]> \ has a meaning in python strings. As Cat said, using amaranth requires knowing python
<whitequark[cis]> to put a backslash to a string in python you have to escape it as \\, or use a "raw string" with the following syntax: r"c:\users\whatever"
catimor129[m] has joined #amaranth-lang
<catimor129[m]> not converged: 1147985 (delta_cycles) am i cooked? should i be looking for some comb cycle?
<whitequark[cis]> yes
<whitequark[cis]> if you convert to verilog or rtlil, we have a static checker that will point you to the comb cycle
<whitequark[cis]> unless the cycle involves a testbench/process in which case you'd have to do it manually
<catimor129[m]> yes testbench and a bunch of processes, thanks. sleep first 😢
<whitequark[cis]> good luck