whitequark changed the topic of #amaranth-lang to: Amaranth hardware definition language · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang
lf has quit [Ping timeout: 256 seconds]
lf_ has joined #amaranth-lang
<_whitenotifier-e> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/358a9db22d45...e554c466c8a9
<_whitenotifier-e> [YoWASP/yosys] whitequark e554c46 - Update dependencies.
cr1901_ is now known as cr1901
AviKav has joined #amaranth-lang
bl0x_ has quit [Ping timeout: 250 seconds]
bl0x_ has joined #amaranth-lang
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #amaranth-lang
Degi has quit [Ping timeout: 250 seconds]
Degi has joined #amaranth-lang
emeb_mac has quit [Quit: Leaving.]
tpw_rules has quit [Ping timeout: 240 seconds]
peepsalot has quit [Quit: Connection reset by peep]
tpw_rules has joined #amaranth-lang
peepsalot has joined #amaranth-lang
bvernoux1 has quit [Read error: Connection reset by peer]
dicethrow has joined #amaranth-lang
<dicethrow> Hello all, I have a question about why I have such low allowable clock frequencies. I'm trying to make a ~143 MHz clock for a SDRAM driver for my ULX3S board.  What sort of thing could cause or fix this?
<dicethrow> For context, this error is happening within this project: https://github.com/dicethrow/amaram
<dicethrow> See line 215 of tests/ulx3s_gui_test/fpga_gateware/test_sdram_n_fifo_interface_IS42S16160G/test6_modified_ila_with_sdram_fifo.py
<dicethrow> thanks for the help!
<dicethrow> _________________________________
<dicethrow> The error:
<dicethrow> ERROR: Max frequency for clock '$glbnet$dut.U$$1.ila.fifo.sdram_clk': 56.87 MHz (FAIL at 141.68 MHz)
<dicethrow> ________________________________
<dicethrow> The code:
<dicethrow> # Clock generation
<dicethrow> # PLL - 143MHz for sdram
<dicethrow> sdram_freq = int(143e6)
<dicethrow> self.m.domains.sdram = cd_sdram = ClockDomain("sdram")
<dicethrow> # self.m.domains.sdram_clk = cd_sdram_clk = ClockDomain("sdram_clk")
<dicethrow> if platform != None:
<dicethrow>     self.m.submodules.ecp5pll = pll = ECP5PLL()
<dicethrow>     pll.register_clkin(platform.request(platform.default_clk),  platform.default_clk_frequency)
<dicethrow>     pll.create_clkout(cd_sdram, sdram_freq)
dicethrow has quit [Quit: Client closed]
dicethrow has joined #amaranth-lang
<dicethrow> (sorry for the repost, just realised I posted on the wrong side of midnight earlier)
<dicethrow> Hello all, I have a question about why I have such low allowable clock frequencies. I'm trying to make a ~143 MHz clock for a SDRAM driver for my ULX3S board.  What sort of thing could cause or fix this?
<dicethrow> For context, this error is happening within this project: https://github.com/dicethrow/amaram
<dicethrow> See line 215 of tests/ulx3s_gui_test/fpga_gateware/test_sdram_n_fifo_interface_IS42S16160G/test6_modified_ila_with_sdram_fifo.py
<dicethrow> thanks for the help!
<dicethrow> _________________________________
<dicethrow> The error:
<dicethrow> ERROR: Max frequency for clock '$glbnet$dut.U$$1.ila.fifo.sdram_clk': 56.87 MHz (FAIL at 141.68 MHz)
<dicethrow> ________________________________
<dicethrow> The code:
<dicethrow> # Clock generation
<dicethrow> # PLL - 143MHz for sdram
<dicethrow> sdram_freq = int(143e6)
<dicethrow> self.m.domains.sdram = cd_sdram = ClockDomain("sdram")
<dicethrow> # self.m.domains.sdram_clk = cd_sdram_clk = ClockDomain("sdram_clk")
<dicethrow> if platform != None:
<dicethrow>     self.m.submodules.ecp5pll = pll = ECP5PLL()
<dicethrow>     pll.register_clkin(platform.request(platform.default_clk),  platform.default_clk_frequency)
dicethrow has quit [Client Quit]
dicethrow78 has joined #amaranth-lang
dicethrow78 has quit [Client Quit]
dicethrow has joined #amaranth-lang
<dicethrow> Whoops, sorry about the clutter
<adamgreig[m]> dicethrow: is this a RAM controller you expect to be faster and something weird/unexpected is making it slow, or a novel design and it's not as fast as you'd like and you want to know why?
<dicethrow> I think that answers the question - so the reason the clock has this limit is because of the fanout etc to the rest of the design that the clock is connected to?
<dicethrow> In that case, It sounds like I need to have a think about how to make it faster, any general tips on how to do that?
<adamgreig[m]> the "max frequency for clock" report means "this is the fastest this clock domain can run, given the length of the longest logic chain between two registers", so yea, it's about the rest of the design rather than some intrinsic limit on the PLL or anything like that
<dicethrow> That makes a lot of sense, thanks
<adamgreig[m]> the nextpnr output will show you the longest (critical) path, which might give you some clues as to what's causing it
<adamgreig[m]> in general the goal is to limit how much logic and routing is in a row is between two registers, because that's what limits the frequency
<adamgreig[m]> sometimes it's just something easy you can add and sometimes it's really hard and you have to rearchitecture the whole idea 😭
<adamgreig[m]> I don't know of any particular guides on this and the nextpnr critical path might or might not be super helpful in finding the main problems - there's a histogram so you can get an idea of it it's just one or two paths that need fixing or like the whole design is slow
<adamgreig[m]> lots of fanout might give you high routing delays and perhaps adding some registers will help, complicated logic functions will give higher logic delays and maybe you can pipeline them...
<dicethrow> Ok sweet, that definitely gives me a direction to work in, thanks!
<adamgreig[m]> good luck!
dicethrow has quit [Quit: Client closed]
Guest65 has joined #amaranth-lang
Guest65 has quit [Client Quit]
bvernoux has joined #amaranth-lang
alanvgreen has quit [Ping timeout: 256 seconds]
alanvgreen has joined #amaranth-lang
Guest65 has joined #amaranth-lang
Guest65 has quit [Client Quit]
bvernoux has quit [Quit: Leaving]
lf_ has quit [*.net *.split]
SimonSapin has quit [*.net *.split]
guan has quit [*.net *.split]
electronic_eel has quit [*.net *.split]
eigenform has quit [*.net *.split]
vup has quit [*.net *.split]
anuejn has quit [*.net *.split]
guan has joined #amaranth-lang
eigenform has joined #amaranth-lang
SimonSapin has joined #amaranth-lang
electronic_eel has joined #amaranth-lang
vup has joined #amaranth-lang
anuejn has joined #amaranth-lang
lf_ has joined #amaranth-lang