code: def check_rtl_assertions(sim):
      
  
      for (w, exp) in sim.block.rtl_assert_dict.items():
          try:
              value = sim.inspect(w)
              if not value:
                  raise exp
          except KeyError:
              pass
docs: Checks the values in sim to see if any registers assertions fail.
  
      :param sim: Simulation in which to check the assertions
      :return: None