<charlottia>
Honestly, I may be leading you astray! Please let me know how it goes!
<Stevetronics>
Hey all! I have a very stupid question that I suspect is a "keyboard -> chair" glitch. I'm just poking around in Amaranth for the first time and working through the counter example in the docs to make sure my toolchain works. I can run the counter testbench if and only if I don't try to write a vcd output; I suspect that I have a version mismatch
<Stevetronics>
somewhere because pysim is dying on a TypeError trying to find line breaks. Has anyone seen an error like this?
<charlottia>
@vipqualitypost This isn't about making a new CD, but for me one easy way to get a clock going at the same speed as my platform clock when was to set `m.d.comb += spi_clk.eq(~clk)` (well `spi_cs & ~clk`). This way, our rising edge (when we're reading and changing things) is the SPI clock's falling edge.
<whitequark>
Stevetronics: that sounds odd; can you post the complete error please?
<d1b2>
<vipqualitypost> @chalottia thanks for the tip! that makes sense for alignment
<whitequark>
oh! can you post your source code please?
<whitequark>
the one that produces the error
<Stevetronics>
Yep! One sec
<d1b2>
<vipqualitypost> it looks like you don't include 'w' parameter
<Stevetronics>
Here's the counter itself (with changes from the example - rather than a configurable overflow number on a 16-bit counter, I just made the counter width configurable and overflow at 2^width - 1): https://pastebin.com/E9tUxx1R