async for clk_hit, rst_hit in sim.posedge(clk).negedge(rst): if rst_hit: ... elif clk_hit: ...