123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121moduleTyp=Runtime.Type.TypmoduleValue=Runtime.ValuemoduleIO=Runtime.Sim.IomoduleSim=Runtime.Sim.SignatureopenErroropenUtil.SourcemoduleMake(Spec:Spec.S):Sim.ARCH=structmoduleCore=structmoduleFunc=Core.Func.Make(Spec.Func)endlettransform_stf_stmt=Fun.id(* Extern calls *)typearch_state=unit[@@derivingyojson]letinit_arch_state=()|>arch_state_to_yojson|>Value.Make.extern(Typ.Make.var("archState"$no_region)[])leteval_extern_init(_values_input:Value.tlist):Value.t=Value.Make.extern(Typ.Make.var("objectState"$no_region)[])`Nullleteval_extern_func_lctk_call(values_input:Value.tlist):Value.tlist=letvalue_ctx,value_name_func,value_names_param=matchvalues_inputwith|[value_ctx;value_name_func;value_names_param]->(value_ctx,value_name_func,value_names_param)|_->error_no_region"unexpected number of arguments to local compile-time known extern \
function call"inletname_func=Value.Get.textvalue_name_funcinletnames_param=value_names_param|>Value.Get.list|>List.mapValue.Get.textinmatch(name_func,names_param)with|"static_assert",["check";"message"]->[Core.Func.static_assert~message:truevalue_ctx]|"static_assert",["check"]->[Core.Func.static_assert~message:falsevalue_ctx]|_->error_no_region("unsupported local compile-time known extern function call: "^name_func^"("^String.concat", "names_param^")")leteval_extern_func_call(_values_input:Value.tlist):Value.tlist=error_no_region"eval_extern_func_call not implemented for the placeholder simulator"leteval_extern_method_call(_values_input:Value.tlist):Value.tlist=error_no_region"eval_extern_method_call not implemented for the placeholder simulator"(* Mirror session interface *)letadd_mirror_session_session_port=error_no_region"add_mirror_session is not implemented for the placeholder simulator"letadd_mirror_session_mc_session_multicast_group=error_no_region"add_mirror_session_mc is not implemented for the placeholder simulator"(* Multicast interface *)letmc_mgrp_create(_value_arch:Value.t)(_mgid:int):Value.t=error_no_region"mc_mgrp_create is not implemented for the placeholder simulator"letmc_node_create(_value_arch:Value.t)(_rid:int)(_ports:intlist):Value.t=error_no_region"mc_node_create is not implemented for the placeholder simulator"letmc_node_associate(_value_arch:Value.t)(_mgid:int)(_handle:int):Value.t=error_no_region"mc_node_associate is not implemented for the placeholder simulator"(* Register interface *)letregister_read(_value_arch:Value.t)(_reg_name:string)(_index:int):Value.t=error_no_region"register_read is not implemented for the placeholder simulator"letregister_write(_value_arch:Value.t)(_reg_name:string)(_index:int)(_value:int):Value.t=error_no_region"register_write is not implemented for the placeholder simulator"letregister_reset(_value_arch:Value.t)(_reg_name:string):Value.t=error_no_region"register_reset is not implemented for the placeholder simulator"(* Pipeline initializer *)letinit_pipe(_includes_p4:stringlist)(_filename_p4:string):Value.t*Value.t=error_no_region"init_pipe not implemented for the placeholder simulator"(* Pipeline driver *)letdrive_pipe(_value_ctx:Value.t)(_value_arch:Value.t)(_rx:IO.rx):Value.t*Value.t*IO.txlist=error_no_region"drive_pipe not implemented for the placeholder simulator"includeExtern.Make(structleteval_extern_init=eval_extern_initleteval_extern_func_lctk_call=eval_extern_func_lctk_callleteval_extern_func_call=eval_extern_func_callleteval_extern_method_call=eval_extern_method_callletinit_arch_state=init_arch_stateend)end