r_function_out_lhs.od 495 B

123456789101112131415161718192021
  1. # Match function and its out-connection
  2. f:RAM_Function {
  3. # Only match if the signal of all inputs has been computed:
  4. condition = ```
  5. ok = True
  6. for o in get_outgoing(this, "hasInPort"):
  7. inport = get_target(o)
  8. in_conn = get_incoming(inport, "link")[0]
  9. some_outport = get_source(in_conn)
  10. if len(get_outgoing(some_outport, "hasSignal")) == 0:
  11. ok = False
  12. break
  13. ok
  14. ```;
  15. }
  16. f_outport:RAM_OutPort
  17. f_has_outport:RAM_hasOutPort (f -> f_outport)