├── .gitignore ├── .gitmodules ├── COMPATIBILITY.md ├── COPYING.txt ├── DEVELOPMENT.md ├── MANIFEST.in ├── QUICK-START.md ├── README.md ├── TODO.md ├── awlsim-client ├── awlsim-covreport ├── awlsim-gui ├── awlsim-linuxcnc-hal ├── awlsim-proupgrade ├── awlsim-server ├── awlsim-server.service ├── awlsim-symtab ├── awlsim-test ├── awlsim-win.cmd ├── awlsim ├── __init__.py ├── awlcompiler │ ├── __init__.py │ ├── insntrans.py │ ├── optrans.py │ ├── tokenizer.py │ └── translator.py ├── awloptimizer │ ├── __init__.py │ ├── awloptimizer.py │ ├── base.py │ ├── opt_biefwd.py │ ├── opt_lblrem.py │ └── opt_noprem.py ├── common │ ├── __init__.py │ ├── blocker.py │ ├── blockinfo.py │ ├── codevalidator.py │ ├── compat.py │ ├── cpuconfig.py │ ├── cpuspecs.pxd.in │ ├── cpuspecs.py │ ├── cython_support.pxd.in │ ├── cython_support.pyx.in │ ├── datatypehelpers.pxd.in │ ├── datatypehelpers.py │ ├── debug.py │ ├── dynamic_import.py │ ├── enumeration.py │ ├── env.py │ ├── exceptions.py │ ├── hwmod.py │ ├── immutable.py │ ├── lpfilter.pxd.in │ ├── lpfilter.py │ ├── mlock.py │ ├── monotonic.pxd.in │ ├── monotonic.py │ ├── movingavg.pxd.in │ ├── movingavg.py │ ├── namevalidation.py │ ├── net.py │ ├── profiler.py │ ├── project.py │ ├── project_legacy.py │ ├── refmanager.py │ ├── sources.py │ ├── subprocess_wrapper.py │ ├── templates.py │ ├── util.py │ ├── version.py │ ├── wordpacker.py │ └── xmlfactory.py ├── core │ ├── __init__.py │ ├── blockinterface.py │ ├── blocks.pxd.in │ ├── blocks.py │ ├── callstack.pxd.in │ ├── callstack.py │ ├── counters.pxd.in │ ├── counters.py │ ├── cpu.pxd.in │ ├── cpu.py │ ├── datablocks.pxd.in │ ├── datablocks.py │ ├── datastructure.pxd.in │ ├── datastructure.py │ ├── datatypes.py │ ├── hardware.pxd.in │ ├── hardware.py │ ├── hardware_loader.py │ ├── hardware_params.py │ ├── identifier.py │ ├── insnmeas.pxd.in │ ├── insnmeas.py │ ├── instructions │ │ ├── __init__.py │ │ ├── all_insns.pxd.in │ │ ├── all_insns.py │ │ ├── insn_abs.pxd.in │ │ ├── insn_abs.py │ │ ├── insn_acos.pxd.in │ │ ├── insn_acos.py │ │ ├── insn_asin.pxd.in │ │ ├── insn_asin.py │ │ ├── insn_assert_eq.pxd.in │ │ ├── insn_assert_eq.py │ │ ├── insn_assert_eq_r.pxd.in │ │ ├── insn_assert_eq_r.py │ │ ├── insn_assert_ge.pxd.in │ │ ├── insn_assert_ge.py │ │ ├── insn_assert_gt.pxd.in │ │ ├── insn_assert_gt.py │ │ ├── insn_assert_le.pxd.in │ │ ├── insn_assert_le.py │ │ ├── insn_assert_lt.pxd.in │ │ ├── insn_assert_lt.py │ │ ├── insn_assert_ne.pxd.in │ │ ├── insn_assert_ne.py │ │ ├── insn_assign.pxd.in │ │ ├── insn_assign.py │ │ ├── insn_atan.pxd.in │ │ ├── insn_atan.py │ │ ├── insn_auf.pxd.in │ │ ├── insn_auf.py │ │ ├── insn_be.pxd.in │ │ ├── insn_be.py │ │ ├── insn_bea.pxd.in │ │ ├── insn_bea.py │ │ ├── insn_beb.pxd.in │ │ ├── insn_beb.py │ │ ├── insn_bend.pxd.in │ │ ├── insn_bend.py │ │ ├── insn_bld.pxd.in │ │ ├── insn_bld.py │ │ ├── insn_bmcr.pxd.in │ │ ├── insn_bmcr.py │ │ ├── insn_btd.pxd.in │ │ ├── insn_btd.py │ │ ├── insn_bti.pxd.in │ │ ├── insn_bti.py │ │ ├── insn_call.pxd.in │ │ ├── insn_call.py │ │ ├── insn_clr.pxd.in │ │ ├── insn_clr.py │ │ ├── insn_cos.pxd.in │ │ ├── insn_cos.py │ │ ├── insn_dec.pxd.in │ │ ├── insn_dec.py │ │ ├── insn_di_d.pxd.in │ │ ├── insn_di_d.py │ │ ├── insn_di_i.pxd.in │ │ ├── insn_di_i.py │ │ ├── insn_di_r.pxd.in │ │ ├── insn_di_r.py │ │ ├── insn_dtb.pxd.in │ │ ├── insn_dtb.py │ │ ├── insn_dtr.pxd.in │ │ ├── insn_dtr.py │ │ ├── insn_ent.pxd.in │ │ ├── insn_ent.py │ │ ├── insn_eq_d.pxd.in │ │ ├── insn_eq_d.py │ │ ├── insn_eq_i.pxd.in │ │ ├── insn_eq_i.py │ │ ├── insn_eq_r.pxd.in │ │ ├── insn_eq_r.py │ │ ├── insn_exp.pxd.in │ │ ├── insn_exp.py │ │ ├── insn_feature.pxd.in │ │ ├── insn_feature.py │ │ ├── insn_fn.pxd.in │ │ ├── insn_fn.py │ │ ├── insn_fp.pxd.in │ │ ├── insn_fp.py │ │ ├── insn_fr.pxd.in │ │ ├── insn_fr.py │ │ ├── insn_ge_d.pxd.in │ │ ├── insn_ge_d.py │ │ ├── insn_ge_i.pxd.in │ │ ├── insn_ge_i.py │ │ ├── insn_ge_r.pxd.in │ │ ├── insn_ge_r.py │ │ ├── insn_generic_call.pxd.in │ │ ├── insn_generic_call.py │ │ ├── insn_gt_d.pxd.in │ │ ├── insn_gt_d.py │ │ ├── insn_gt_i.pxd.in │ │ ├── insn_gt_i.py │ │ ├── insn_gt_r.pxd.in │ │ ├── insn_gt_r.py │ │ ├── insn_inc.pxd.in │ │ ├── insn_inc.py │ │ ├── insn_incar1.pxd.in │ │ ├── insn_incar1.py │ │ ├── insn_incar2.pxd.in │ │ ├── insn_incar2.py │ │ ├── insn_inline_awl.pxd.in │ │ ├── insn_inline_awl.py │ │ ├── insn_invd.pxd.in │ │ ├── insn_invd.py │ │ ├── insn_invi.pxd.in │ │ ├── insn_invi.py │ │ ├── insn_itb.pxd.in │ │ ├── insn_itb.py │ │ ├── insn_itd.pxd.in │ │ ├── insn_itd.py │ │ ├── insn_l.pxd.in │ │ ├── insn_l.py │ │ ├── insn_lar1.pxd.in │ │ ├── insn_lar1.py │ │ ├── insn_lar2.pxd.in │ │ ├── insn_lar2.py │ │ ├── insn_lc.pxd.in │ │ ├── insn_lc.py │ │ ├── insn_le_d.pxd.in │ │ ├── insn_le_d.py │ │ ├── insn_le_i.pxd.in │ │ ├── insn_le_i.py │ │ ├── insn_le_r.pxd.in │ │ ├── insn_le_r.py │ │ ├── insn_leave.pxd.in │ │ ├── insn_leave.py │ │ ├── insn_ln.pxd.in │ │ ├── insn_ln.py │ │ ├── insn_loop.pxd.in │ │ ├── insn_loop.py │ │ ├── insn_lt_d.pxd.in │ │ ├── insn_lt_d.py │ │ ├── insn_lt_i.pxd.in │ │ ├── insn_lt_i.py │ │ ├── insn_lt_r.pxd.in │ │ ├── insn_lt_r.py │ │ ├── insn_mcra.pxd.in │ │ ├── insn_mcra.py │ │ ├── insn_mcrb.pxd.in │ │ ├── insn_mcrb.py │ │ ├── insn_mcrd.pxd.in │ │ ├── insn_mcrd.py │ │ ├── insn_mi_d.pxd.in │ │ ├── insn_mi_d.py │ │ ├── insn_mi_i.pxd.in │ │ ├── insn_mi_i.py │ │ ├── insn_mi_r.pxd.in │ │ ├── insn_mi_r.py │ │ ├── insn_mod.pxd.in │ │ ├── insn_mod.py │ │ ├── insn_mu_d.pxd.in │ │ ├── insn_mu_d.py │ │ ├── insn_mu_i.pxd.in │ │ ├── insn_mu_i.py │ │ ├── insn_mu_r.pxd.in │ │ ├── insn_mu_r.py │ │ ├── insn_ne_d.pxd.in │ │ ├── insn_ne_d.py │ │ ├── insn_ne_i.pxd.in │ │ ├── insn_ne_i.py │ │ ├── insn_ne_r.pxd.in │ │ ├── insn_ne_r.py │ │ ├── insn_negd.pxd.in │ │ ├── insn_negd.py │ │ ├── insn_negi.pxd.in │ │ ├── insn_negi.py │ │ ├── insn_negr.pxd.in │ │ ├── insn_negr.py │ │ ├── insn_nop.pxd.in │ │ ├── insn_nop.py │ │ ├── insn_not.pxd.in │ │ ├── insn_not.py │ │ ├── insn_o.pxd.in │ │ ├── insn_o.py │ │ ├── insn_ob.pxd.in │ │ ├── insn_ob.py │ │ ├── insn_od.pxd.in │ │ ├── insn_od.py │ │ ├── insn_on.pxd.in │ │ ├── insn_on.py │ │ ├── insn_onb.pxd.in │ │ ├── insn_onb.py │ │ ├── insn_ow.pxd.in │ │ ├── insn_ow.py │ │ ├── insn_pl.pxd.in │ │ ├── insn_pl.py │ │ ├── insn_pl_d.pxd.in │ │ ├── insn_pl_d.py │ │ ├── insn_pl_i.pxd.in │ │ ├── insn_pl_i.py │ │ ├── insn_pl_r.pxd.in │ │ ├── insn_pl_r.py │ │ ├── insn_pop.pxd.in │ │ ├── insn_pop.py │ │ ├── insn_push.pxd.in │ │ ├── insn_push.py │ │ ├── insn_r.pxd.in │ │ ├── insn_r.py │ │ ├── insn_rld.pxd.in │ │ ├── insn_rld.py │ │ ├── insn_rlda.pxd.in │ │ ├── insn_rlda.py │ │ ├── insn_rnd.pxd.in │ │ ├── insn_rnd.py │ │ ├── insn_rndn.pxd.in │ │ ├── insn_rndn.py │ │ ├── insn_rndp.pxd.in │ │ ├── insn_rndp.py │ │ ├── insn_rrd.pxd.in │ │ ├── insn_rrd.py │ │ ├── insn_rrda.pxd.in │ │ ├── insn_rrda.py │ │ ├── insn_s.pxd.in │ │ ├── insn_s.py │ │ ├── insn_sa.pxd.in │ │ ├── insn_sa.py │ │ ├── insn_save.pxd.in │ │ ├── insn_save.py │ │ ├── insn_se.pxd.in │ │ ├── insn_se.py │ │ ├── insn_set.pxd.in │ │ ├── insn_set.py │ │ ├── insn_si.pxd.in │ │ ├── insn_si.py │ │ ├── insn_sin.pxd.in │ │ ├── insn_sin.py │ │ ├── insn_sld.pxd.in │ │ ├── insn_sld.py │ │ ├── insn_sleep.pxd.in │ │ ├── insn_sleep.py │ │ ├── insn_slw.pxd.in │ │ ├── insn_slw.py │ │ ├── insn_spa.pxd.in │ │ ├── insn_spa.py │ │ ├── insn_spb.pxd.in │ │ ├── insn_spb.py │ │ ├── insn_spbb.pxd.in │ │ ├── insn_spbb.py │ │ ├── insn_spbi.pxd.in │ │ ├── insn_spbi.py │ │ ├── insn_spbin.pxd.in │ │ ├── insn_spbin.py │ │ ├── insn_spbn.pxd.in │ │ ├── insn_spbn.py │ │ ├── insn_spbnb.pxd.in │ │ ├── insn_spbnb.py │ │ ├── insn_spl.pxd.in │ │ ├── insn_spl.py │ │ ├── insn_spm.pxd.in │ │ ├── insn_spm.py │ │ ├── insn_spmz.pxd.in │ │ ├── insn_spmz.py │ │ ├── insn_spn.pxd.in │ │ ├── insn_spn.py │ │ ├── insn_spo.pxd.in │ │ ├── insn_spo.py │ │ ├── insn_spp.pxd.in │ │ ├── insn_spp.py │ │ ├── insn_sppz.pxd.in │ │ ├── insn_sppz.py │ │ ├── insn_sps.pxd.in │ │ ├── insn_sps.py │ │ ├── insn_spu.pxd.in │ │ ├── insn_spu.py │ │ ├── insn_spz.pxd.in │ │ ├── insn_spz.py │ │ ├── insn_sqr.pxd.in │ │ ├── insn_sqr.py │ │ ├── insn_sqrt.pxd.in │ │ ├── insn_sqrt.py │ │ ├── insn_srd.pxd.in │ │ ├── insn_srd.py │ │ ├── insn_srw.pxd.in │ │ ├── insn_srw.py │ │ ├── insn_ss.pxd.in │ │ ├── insn_ss.py │ │ ├── insn_ssd.pxd.in │ │ ├── insn_ssd.py │ │ ├── insn_ssi.pxd.in │ │ ├── insn_ssi.py │ │ ├── insn_stwrst.pxd.in │ │ ├── insn_stwrst.py │ │ ├── insn_sv.pxd.in │ │ ├── insn_sv.py │ │ ├── insn_t.pxd.in │ │ ├── insn_t.py │ │ ├── insn_tad.pxd.in │ │ ├── insn_tad.py │ │ ├── insn_tak.pxd.in │ │ ├── insn_tak.py │ │ ├── insn_tan.pxd.in │ │ ├── insn_tan.py │ │ ├── insn_tar.pxd.in │ │ ├── insn_tar.py │ │ ├── insn_tar1.pxd.in │ │ ├── insn_tar1.py │ │ ├── insn_tar2.pxd.in │ │ ├── insn_tar2.py │ │ ├── insn_taw.pxd.in │ │ ├── insn_taw.py │ │ ├── insn_tdb.pxd.in │ │ ├── insn_tdb.py │ │ ├── insn_trunc.pxd.in │ │ ├── insn_trunc.py │ │ ├── insn_u.pxd.in │ │ ├── insn_u.py │ │ ├── insn_ub.pxd.in │ │ ├── insn_ub.py │ │ ├── insn_ud.pxd.in │ │ ├── insn_ud.py │ │ ├── insn_un.pxd.in │ │ ├── insn_un.py │ │ ├── insn_unb.pxd.in │ │ ├── insn_unb.py │ │ ├── insn_uw.pxd.in │ │ ├── insn_uw.py │ │ ├── insn_x.pxd.in │ │ ├── insn_x.py │ │ ├── insn_xb.pxd.in │ │ ├── insn_xb.py │ │ ├── insn_xn.pxd.in │ │ ├── insn_xn.py │ │ ├── insn_xnb.pxd.in │ │ ├── insn_xnb.py │ │ ├── insn_xod.pxd.in │ │ ├── insn_xod.py │ │ ├── insn_xow.pxd.in │ │ ├── insn_xow.py │ │ ├── insn_zr.pxd.in │ │ ├── insn_zr.py │ │ ├── insn_zv.pxd.in │ │ ├── insn_zv.py │ │ ├── main.pxd.in │ │ ├── main.py │ │ ├── parentinfo.py │ │ ├── types.pxd.in │ │ └── types.py │ ├── labels.pxd.in │ ├── labels.py │ ├── lstack.pxd.in │ ├── lstack.py │ ├── main.pxd.in │ ├── main.py │ ├── memory.pxd.in │ ├── memory.py │ ├── obtemp.pxd.in │ ├── obtemp.py │ ├── offset.pxd.in │ ├── offset.py │ ├── operators.pxd.in │ ├── operators.py │ ├── operatortypes.pxd.in │ ├── operatortypes.py │ ├── parameters.pxd.in │ ├── parameters.py │ ├── parenstack.pxd.in │ ├── parenstack.py │ ├── statusword.pxd.in │ ├── statusword.py │ ├── symbolparser.py │ ├── systemblocks │ │ ├── __init__.py │ │ ├── error_codes.py │ │ ├── system_sfb.pxd.in │ │ ├── system_sfb.py │ │ ├── system_sfb_0.pxd.in │ │ ├── system_sfb_0.py │ │ ├── system_sfb_1.pxd.in │ │ ├── system_sfb_1.py │ │ ├── system_sfb_2.pxd.in │ │ ├── system_sfb_2.py │ │ ├── system_sfb_3.pxd.in │ │ ├── system_sfb_3.py │ │ ├── system_sfb_4.pxd.in │ │ ├── system_sfb_4.py │ │ ├── system_sfb_5.pxd.in │ │ ├── system_sfb_5.py │ │ ├── system_sfb_m1.pxd.in │ │ ├── system_sfb_m1.py │ │ ├── system_sfc.pxd.in │ │ ├── system_sfc.py │ │ ├── system_sfc_21.pxd.in │ │ ├── system_sfc_21.py │ │ ├── system_sfc_46.pxd.in │ │ ├── system_sfc_46.py │ │ ├── system_sfc_47.pxd.in │ │ ├── system_sfc_47.py │ │ ├── system_sfc_64.pxd.in │ │ ├── system_sfc_64.py │ │ ├── system_sfc_m1.pxd.in │ │ ├── system_sfc_m1.py │ │ ├── system_sfc_m2.pxd.in │ │ ├── system_sfc_m2.py │ │ ├── system_sfc_m3.pxd.in │ │ ├── system_sfc_m3.py │ │ ├── system_sfc_m4.pxd.in │ │ ├── system_sfc_m4.py │ │ ├── systemblockinterface.py │ │ ├── systemblocks.pxd.in │ │ ├── systemblocks.py │ │ └── tables.py │ ├── timers.pxd.in │ ├── timers.py │ ├── userdefinedtypes.pxd.in │ └── userdefinedtypes.py ├── coreclient │ ├── __init__.py │ ├── client.py │ ├── sshtunnel.py │ └── util.py ├── coreserver │ ├── __init__.py │ ├── memarea.py │ ├── messages.py │ ├── run.py │ ├── server.pxd.in │ └── server.py ├── fupcompiler │ ├── __init__.py │ ├── base.py │ ├── blockdecl.py │ ├── conn.py │ ├── elem.py │ ├── elemarith.py │ ├── elemawl.py │ ├── elembool.py │ ├── elemcmp.py │ ├── elemcomment.py │ ├── elemconv.py │ ├── elemcount.py │ ├── elemmove.py │ ├── elemoper.py │ ├── elemshift.py │ ├── elemtime.py │ ├── fupcompiler.pxd.in │ ├── fupcompiler.py │ ├── grid.py │ ├── helpers.py │ ├── interf.py │ └── wire.py ├── gui │ ├── __init__.py │ ├── awlsimclient.py │ ├── blocktreewidget.py │ ├── configdialog.py │ ├── cpuconfig.py │ ├── cpustate.py │ ├── cpuwidget.py │ ├── editmdiarea.py │ ├── editwidget.py │ ├── finddialog.py │ ├── fup │ │ ├── __init__.py │ │ ├── fup_base.py │ │ ├── fup_conn.py │ │ ├── fup_elem.py │ │ ├── fup_elemarith.py │ │ ├── fup_elemawl.py │ │ ├── fup_elembool.py │ │ ├── fup_elemcmp.py │ │ ├── fup_elemcomment.py │ │ ├── fup_elemconv.py │ │ ├── fup_elemcount.py │ │ ├── fup_elemmove.py │ │ ├── fup_elemoperand.py │ │ ├── fup_elemshift.py │ │ ├── fup_elemtime.py │ │ ├── fup_grid.py │ │ ├── fup_wire.py │ │ ├── fupdrawwidget.py │ │ ├── fupelemcontainerwidget.py │ │ ├── fupwidget.py │ │ └── undo.py │ ├── geo2d.py │ ├── guiconfig.py │ ├── hwmodconfig.py │ ├── icons │ │ ├── __init__.py │ │ ├── browser.py │ │ ├── copy.py │ │ ├── counter.py │ │ ├── cpu.py │ │ ├── cut.py │ │ ├── datablock.py │ │ ├── disable.py │ │ ├── doc_close.py │ │ ├── doc_delete.py │ │ ├── doc_edit.py │ │ ├── doc_export.py │ │ ├── doc_import.py │ │ ├── doc_new.py │ │ ├── down.py │ │ ├── download.py │ │ ├── download_one.py │ │ ├── enable.py │ │ ├── exit.py │ │ ├── find.py │ │ ├── findreplace.py │ │ ├── flags.py │ │ ├── fup.py │ │ ├── glasses.py │ │ ├── hwmod.py │ │ ├── icon-images │ │ │ ├── COPYING.txt │ │ │ ├── application-exit-4.svg │ │ │ ├── appointment-soon.svg │ │ │ ├── audio-card-3.svg │ │ │ ├── counter.png │ │ │ ├── dialog-ok-apply-5.svg │ │ │ ├── dialog-warning-4.svg │ │ │ ├── document-close-4.svg │ │ │ ├── document-edit.svg │ │ │ ├── document-export-4.svg │ │ │ ├── document-import-2.svg │ │ │ ├── document-new-3.svg │ │ │ ├── document-new-6.svg │ │ │ ├── document-open-5.svg │ │ │ ├── document-save-all.svg │ │ │ ├── download-one.png │ │ │ ├── download.png │ │ │ ├── edit-4.svg │ │ │ ├── edit-copy-4.svg │ │ │ ├── edit-cut-4.svg │ │ │ ├── edit-delete-3.png │ │ │ ├── edit-delete-4.svg │ │ │ ├── edit-find-4.svg │ │ │ ├── edit-find-replace-3.svg │ │ │ ├── edit-paste-4.svg │ │ │ ├── edit-redo-4.svg │ │ │ ├── edit-undo-4.svg │ │ │ ├── emblem-package-2.svg │ │ │ ├── feed-subscribe.svg │ │ │ ├── fup.odg │ │ │ ├── fup.png │ │ │ ├── go-down-7.svg │ │ │ ├── go-next-7.svg │ │ │ ├── go-previous-7.svg │ │ │ ├── go-up-7.svg │ │ │ ├── inputs.png │ │ │ ├── internet-web-browser-4.svg │ │ │ ├── kop.odg │ │ │ ├── kop.png │ │ │ ├── lcd.png │ │ │ ├── media-playback-start-4.svg │ │ │ ├── media-playback-stop-4.svg │ │ │ ├── memory_bits.png │ │ │ ├── network-server.svg │ │ │ ├── network-wired-4.svg │ │ │ ├── outputs.png │ │ │ ├── pictograms-protections.svg │ │ │ ├── preferences-system-3.svg │ │ │ ├── server-database.svg │ │ │ ├── stdlib-package.png │ │ │ ├── tab-new-background.svg │ │ │ ├── text-x-source.svg │ │ │ ├── view-calendar-workweek-2.svg │ │ │ └── x-kde-nsplugin-generated.svg │ │ ├── icons.py │ │ ├── inputs.py │ │ ├── kop.py │ │ ├── lcd.py │ │ ├── network.py │ │ ├── new.py │ │ ├── next.py │ │ ├── open.py │ │ ├── outputs.py │ │ ├── paste.py │ │ ├── pic2py │ │ ├── plugin.py │ │ ├── prefs.py │ │ ├── previous.py │ │ ├── redo.py │ │ ├── run.py │ │ ├── save.py │ │ ├── stdlib.py │ │ ├── stop.py │ │ ├── tab_new.py │ │ ├── tag.py │ │ ├── textsource.py │ │ ├── timer.py │ │ ├── undo.py │ │ ├── up.py │ │ └── warning.py │ ├── interfedit │ │ ├── __init__.py │ │ ├── blocktypewidget.py │ │ ├── interfdef.py │ │ ├── interftabmodel.py │ │ ├── interftabwidget.py │ │ └── interfwidget.py │ ├── library.py │ ├── libtablewidget.py │ ├── linkconfig.py │ ├── mainwindow.py │ ├── no_cython │ ├── opereditwidget.py │ ├── optimizerconfig.py │ ├── projecttreewidget.py │ ├── qt_bindings.py │ ├── runstate.py │ ├── sourcecodeedit.py │ ├── startup.py │ ├── symtabwidget.py │ ├── templatedialog.py │ ├── toolbars.py │ ├── util.py │ ├── validatorsched.py │ └── valuelineedit.py └── library │ ├── __init__.py │ ├── iec │ ├── __init__.py │ ├── fc12_ge_dt.py │ ├── fc21_len.py │ ├── fc4_delete.py │ ├── fc9_eq_dt.py │ └── iec.py │ ├── libentry.pxd.in │ ├── libentry.py │ ├── libinterface.py │ ├── library.py │ └── libselection.py ├── awlsim_loader ├── __init__.py ├── awlcompiler.py ├── awloptimizer.py ├── common.py ├── core.py ├── coreclient.py ├── coreserver.py ├── coverage_helper.py ├── cython_helper.py └── fupcompiler.py ├── awlsimhw_debug ├── __init__.py ├── main.pxd.in └── main.py ├── awlsimhw_dummy ├── __init__.py ├── main.pxd.in └── main.py ├── awlsimhw_linuxcnc ├── __init__.py ├── main.pxd.in └── main.py ├── awlsimhw_pixtend ├── __init__.py ├── main.pxd.in ├── main.py ├── ppl_shim.pxd.in └── ppl_shim.py ├── awlsimhw_pyprofibus.conf ├── awlsimhw_pyprofibus ├── __init__.py ├── main.pxd.in └── main.py ├── awlsimhw_rpigpio ├── __init__.py ├── main.pxd.in └── main.py ├── debian ├── .gitignore ├── awlsim-client.install ├── awlsim-client.manpages ├── awlsim-gui.install ├── awlsim-gui.manpages ├── awlsim-linuxcnc-hal.install ├── awlsim-linuxcnc-hal.manpages ├── awlsim-proupgrade.install ├── awlsim-proupgrade.manpages ├── awlsim-server.install ├── awlsim-server.manpages ├── awlsim-symtab.install ├── awlsim-symtab.manpages ├── awlsim-test.install ├── awlsim-test.manpages ├── changelog ├── compat ├── control ├── copyright ├── cython3-awlsim.install ├── cython3-awlsimhw-dummy.install ├── cython3-awlsimhw-linuxcnc.install ├── cython3-awlsimhw-pixtend.install ├── cython3-awlsimhw-profibus.install ├── cython3-awlsimhw-rpigpio.install ├── etc_awlsim │ └── README.md ├── python3-awlsim-gui.install ├── python3-awlsim.install ├── python3-awlsimhw-dummy.install ├── python3-awlsimhw-linuxcnc.install ├── python3-awlsimhw-pixtend.install ├── python3-awlsimhw-profibus.install ├── python3-awlsimhw-rpigpio.install ├── rules └── source │ └── format ├── doc ├── .gitignore ├── architecture.dia ├── architecture.png ├── block-diagram.dia ├── block-diagram.png ├── compiler-overview.dia ├── compiler-overview.png ├── coreserver-source-management.dia ├── coreserver-source-management.png ├── foreign-licenses │ ├── PYQT-LICENSE.txt │ ├── PYSIDE-QT-LICENSE.txt │ ├── PYTHON-LICENSE.txt │ └── README ├── fup │ ├── FUP.md │ ├── fup-implicit-en-0.png │ ├── fup-implicit-en-1.png │ ├── fup.dia │ └── fup.png ├── man │ ├── awlsim-client.1 │ ├── awlsim-gui.1 │ ├── awlsim-linuxcnc-hal.1 │ ├── awlsim-proupgrade.1 │ ├── awlsim-server.1 │ ├── awlsim-symtab.1 │ └── awlsim-test.1 └── pic │ └── quick-start │ ├── awlsim-gui-000.png │ ├── awlsim-gui-001.png │ ├── awlsim-gui-002.png │ ├── awlsim-gui-003.png │ └── awlsim-gui-004.png ├── examples ├── EXAMPLE.awlpro ├── linuxcnc-demo │ ├── .gitignore │ ├── awlsim.hal │ ├── linuxcnc-demo.awlpro │ ├── linuxcnc-demo.hal │ ├── linuxcnc-demo.ini │ ├── linuxcnc-demo.ngc │ └── run-linuxcnc-demo.sh ├── raspberrypi-gpio.awlpro ├── raspberrypi-pixtend-musicplayer.awlpro ├── raspberrypi-pixtend.awlpro └── raspberrypi-profibus.awlpro ├── libs ├── README.txt ├── abstract_spidev │ └── __init__.py ├── cython_headers │ ├── byteswap-win.h │ └── endian-win.h ├── linuxcnc_fake_hal │ ├── hal.py │ └── linuxcnc.py ├── pixtend │ ├── v1 │ │ ├── fake_spidev │ │ │ └── spidev │ │ │ │ └── __init__.py │ │ └── ppl │ │ │ ├── LICENSE.txt │ │ │ ├── doc │ │ │ └── pixtendlib.html │ │ │ ├── examples │ │ │ ├── px_analog_input_demo.py │ │ │ ├── px_dac_demo.py │ │ │ ├── px_dht11_demo.py │ │ │ ├── px_digital_output_demo.py │ │ │ ├── px_gpio_demo.py │ │ │ ├── px_mqtt_demo.py │ │ │ ├── px_pwm_demo.py │ │ │ └── px_servo_demo.py │ │ │ ├── pixtendlib │ │ │ └── __init__.py │ │ │ ├── ppl_v0.1.1.zip │ │ │ └── setup.py │ └── v2 │ │ ├── fake_spidev │ │ └── spidev │ │ │ └── __init__.py │ │ └── pplv2 │ │ ├── LICENSE.txt │ │ ├── doc │ │ ├── pixtendv2core.html │ │ ├── pixtendv2l.html │ │ └── pixtendv2s.html │ │ ├── examples │ │ ├── pixtendv2l_analogout0_demo.py │ │ ├── pixtendv2l_demo.py │ │ ├── pixtendv2l_pwm1_demo.py │ │ ├── pixtendv2s_demo.py │ │ └── pixtendv2s_mqtt_demo.py │ │ ├── pixtendv2core │ │ └── __init__.py │ │ ├── pixtendv2l │ │ └── __init__.py │ │ ├── pixtendv2s │ │ └── __init__.py │ │ ├── pplv2_v0.1.4.zip │ │ ├── setup.py │ │ └── version_0_1_4.txt ├── raspi_fake_gpio │ └── RPi │ │ ├── GPIO │ │ └── __init__.py │ │ └── __init__.py ├── tiny_atexit │ └── atexit.py ├── tiny_configparser │ └── configparser.py ├── tiny_csv │ └── csv.py ├── tiny_datetime │ └── datetime │ │ └── __init__.py ├── tiny_platform │ └── platform.py ├── tiny_struct │ └── struct.py └── tiny_xml │ └── xml │ ├── etree │ └── ElementTree.py │ └── sax │ └── saxutils.py ├── maintenance ├── benchmark │ ├── benchmark-generic.awlpro │ ├── benchmark-raspberrypi.awlpro │ ├── benchmark.awl │ └── generate_benchmark.py ├── build-noopt.sh ├── build.cmd ├── build.sh ├── cleantree.sh ├── cython3-wrapper.sh ├── deb-dependencies-install.sh ├── deb-install.sh ├── deb-uninstall.sh ├── gen-doc.sh ├── makerelease.sh ├── metrics.sh ├── micropython-wrapper.sh ├── proupgrade.sh ├── run-random.py ├── update-submodules ├── win-install-dependencies.cmd └── win-standalone-build.cmd ├── misc ├── cloc-lang.txt ├── setup_cython.py └── the_free_software_song.py ├── progs ├── README.txt └── putty │ └── 0.81 │ ├── LICENCE │ ├── putty-src.zip │ ├── putty-src.zip.gpg │ ├── putty.zip │ └── putty.zip.gpg ├── setup.py └── tests ├── .gitignore ├── COPYING.txt ├── awlsim_tstlib.py ├── run.sh ├── setup-cython-tests.py ├── sh-test.defaults ├── tc000_base ├── EXAMPLE.awlpro ├── EXAMPLE.awlpro.conf ├── cli.sh ├── datatypehelpers.py ├── empty.awl ├── empty.awl.conf ├── headers.awl ├── labels.py ├── latin1.awl ├── lpfilter.py ├── minimal.awl ├── movingavg.py └── shutdown.awl ├── tc100_instructions ├── insn_4ACCU.awl ├── insn_ARITH_D.awl ├── insn_ARITH_I.awl ├── insn_ARITH_PL.awl ├── insn_ARITH_R.awl ├── insn_BCD.awl ├── insn_BOOL.awl ├── insn_CALL.awl ├── insn_CALL.awl.conf ├── insn_CALL_multiinstance.awl ├── insn_CMP.awl ├── insn_EDGE.awl ├── insn_INC.awl ├── insn_INV.awl ├── insn_ITD.awl ├── insn_JUMP.awl ├── insn_MCR.awl ├── insn_MISC.awl ├── insn_SA.awl ├── insn_SE.awl ├── insn_SHIFT.awl ├── insn_SI.awl ├── insn_SS.awl ├── insn_SV.awl ├── insn_TAK.awl ├── insn_WORD.awl ├── insn_Z.awl └── stw_operators.awl ├── tc150_startup ├── ob_startup_info.awl ├── startup_OB100.awl ├── startup_OB100.awlpro ├── startup_OB102.awl ├── startup_OB102.awlpro └── startup_multiple.awl ├── tc200_datatypes ├── DB.awl ├── anypointer.awl ├── array.awl ├── dbpointer.awl ├── dbpointer.awlpro ├── immediates.awl ├── pointer.awl ├── string.awl ├── struct.awl └── udt.awl ├── tc250_symbols ├── symbols.asc ├── symbols.awl ├── symbols.awlpro ├── symtab-parser-000.sh ├── symtab-parser-001.asc ├── symtab-parser-001.sh ├── symtab-parser-002.csv └── symtab-parser-002.sh ├── tc300_cpu ├── big-blocknum.awl ├── clockmem.asc ├── clockmem.awl ├── clockmem.awlpro ├── clockmem.awlpro.conf ├── infinite-recursion.awl └── infinite-recursion.awl.conf ├── tc400_convenience ├── convenience_de.awl └── convenience_en.awl ├── tc500_systemblocks ├── sfb │ ├── basic.awl │ ├── sfb0.awl │ ├── sfb1.awl │ ├── sfb2.awl │ ├── sfb3.awl │ ├── sfb3.awl.conf │ ├── sfb4.awl │ ├── sfb4.awl.conf │ ├── sfb5.awl │ └── sfb5.awl.conf └── sfc │ ├── basic.awl │ ├── sfc21.awl │ ├── sfc47.awl │ ├── sfc47.awl.conf │ └── sfc64.awl ├── tc550_library └── iec │ ├── fc12_ge_dt.awl │ ├── fc12_ge_dt.awlpro │ ├── fc21_len.awl │ ├── fc21_len.awlpro │ ├── fc4_delete.awl │ ├── fc4_delete.awlpro │ ├── fc9_eq_dt.awl │ └── fc9_eq_dt.awlpro ├── tc600_fup ├── fup-all-elements.awlpro ├── fup-arithmetic.awlpro ├── fup-arithmetic.awlpro.conf ├── fup-boolean.awlpro ├── fup-boolean.awlpro.conf ├── fup-compare.awlpro ├── fup-compare.awlpro.conf ├── fup-conv.awlpro ├── fup-conv.awlpro.conf ├── fup-count.awlpro ├── fup-count.awlpro.conf ├── fup-empty.awlpro ├── fup-empty.awlpro.conf ├── fup-inlineawl.awlpro ├── fup-inlineawl.awlpro.conf ├── fup-movebox.awlpro ├── fup-movebox.awlpro.conf ├── fup-shift.awlpro ├── fup-shift.awlpro.conf └── fup-time.awlpro ├── tc700_hardware ├── linuxcnc │ ├── linuxcnc-iotest.awl__ │ ├── linuxcnc.hal │ └── linuxcnc.sh ├── pixtend │ ├── example-project-pixtend-musicplayer.awlpro │ ├── example-project-pixtend-musicplayer.awlpro.conf │ ├── example-project-pixtend.awlpro │ ├── example-project-pixtend.awlpro.conf │ ├── example-project-pixtend2-musicplayer.awlpro │ ├── example-project-pixtend2-musicplayer.awlpro.conf │ ├── example-project-pixtend2.awlpro │ ├── example-project-pixtend2.awlpro.conf │ ├── pixtend-iotest.awlpro │ ├── pixtend-iotest.awlpro.conf │ ├── pixtend-peripheral-io.awlpro │ ├── pixtend-peripheral-io.awlpro.conf │ ├── pixtend2-iotest.awlpro │ ├── pixtend2-iotest.awlpro.conf │ ├── pixtend2-peripheral-io.awlpro │ └── pixtend2-peripheral-io.awlpro.conf ├── pyprofibus │ ├── pyprofibus.awl │ ├── pyprofibus.awlpro │ ├── pyprofibus.awlpro.conf │ ├── pyprofibus.conf │ └── pyprofibus.gsd └── raspberrypi │ ├── rpigpio.awlpro │ └── rpigpio.awlpro.conf ├── tc800_coreserver ├── coreserver-cli.sh └── coreserver-standalone.sh ├── tc900_bugs ├── direct-lstack-alloc.awl ├── fbname-usage-before-decl.awlpro ├── float-int-conversion.awl ├── indirect-addr-format.awl ├── indirect-addr-format.awl.conf ├── lstack-overflow.awlpro ├── lstack-overflow.awlpro.conf ├── parameter-spacing.awl ├── parser-lbl-comment.awl ├── raw-call-on-nonraw-fc.awl ├── raw-call-on-nonraw-fc.awl.conf └── symbolic-timer-counter.awl ├── tc910_legacy └── fileformat-v0 │ ├── EXAMPLE.awlpro │ ├── EXAMPLE.awlpro.conf │ ├── binaeruntersetzer.asc │ ├── binaeruntersetzer.awl │ ├── binaeruntersetzer.awlpro │ ├── binaeruntersetzer.awlpro.conf │ ├── bnt_modell.asc │ ├── bnt_modell.awl │ ├── bnt_modell.awlpro │ ├── bnt_modell.awlpro.conf │ ├── clockmem.asc │ ├── clockmem.awl │ ├── clockmem.awlpro │ ├── clockmem.awlpro.conf │ ├── dbpointer.awl │ ├── dbpointer.awlpro │ ├── fc12_ge_dt.awl │ ├── fc12_ge_dt.awlpro │ ├── impulszaehler.awlpro │ └── impulszaehler.awlpro.conf ├── tc950_gui ├── geo2d.py └── no_cython └── tc999_projects ├── acme-000.awl ├── acme-000.awl.conf ├── acme-001.awl ├── acme-001.awl.conf ├── acme-002.awl ├── acme-002.awlpro ├── acme-002.awlpro.conf ├── acme-003.awl ├── acme-003.awl.conf ├── acme-004.awl ├── acme-004.awl.conf ├── acme-005.awl ├── acme-005.awl.conf ├── acme-006.awl ├── acme-006.awl.conf ├── binaeruntersetzer.asc ├── binaeruntersetzer.awl ├── binaeruntersetzer.awlpro ├── binaeruntersetzer.awlpro.conf ├── bnt_modell.asc ├── bnt_modell.awl ├── bnt_modell.awlpro ├── bnt_modell.awlpro.conf ├── factorial.awl ├── garagecounter.awl ├── garagecounter.awl.conf ├── impulszaehler.awlpro ├── impulszaehler.awlpro.conf ├── laufbandsteuerung.awlpro ├── laufbandsteuerung.awlpro.conf ├── nop100k.awl ├── nop100k.awlpro ├── nop100k.awlpro.conf ├── overflow.awl ├── pufferspeicher.awlpro ├── pufferspeicher.awlpro.conf ├── ringbuffer.asc ├── ringbuffer.awl ├── ringbuffer.awlpro ├── ringbuffer.awlpro.conf ├── shiftregister.awl ├── shiftregister.awl.conf ├── shiftregister_tp.awl ├── shiftregister_tp.awl.conf ├── stepchain.awl ├── stepchain.awlpro ├── stepchain.awlpro.conf ├── stoerungsanzeige.awlpro ├── stoerungsanzeige.awlpro.conf ├── taktgenerator.awlpro ├── taktgenerator.awlpro.conf ├── tauchbad.awlpro ├── tauchbad.awlpro.conf ├── trafficlights_1.awl ├── trafficlights_1.awl.conf ├── trafficlights_2.asc ├── trafficlights_2.awl ├── trafficlights_2.awlpro └── trafficlights_2.awlpro.conf /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.pyc 3 | *.pyo 4 | *$py.class 5 | 6 | *.swp 7 | 8 | *.gsd 9 | *.gse 10 | *.gsf 11 | *.gsg 12 | *.gsi 13 | *.gss 14 | 15 | /*.html 16 | 17 | /.pybuild/ 18 | /build/ 19 | /dist/ 20 | /MANIFEST 21 | 22 | /awlsim_cython 23 | /pyprofibus 24 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "submodules/pyprofibus"] 2 | path = submodules/pyprofibus 3 | url = https://git.bues.ch/git/pyprofibus.git 4 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | global-include *.pxd.in 2 | global-include *.pyx.in 3 | global-include no_cython 4 | 5 | graft awlsim/gui/icons/icon-images 6 | graft debian 7 | graft doc 8 | graft examples 9 | graft libs 10 | graft maintenance 11 | graft misc 12 | graft progs 13 | graft submodules 14 | graft tests 15 | 16 | include COMPATIBILITY.html 17 | include COMPATIBILITY.md 18 | include COPYING.txt 19 | include DEVELOPMENT.html 20 | include DEVELOPMENT.md 21 | include QUICK-START.html 22 | include QUICK-START.md 23 | include README.html 24 | include README.md 25 | include TODO.html 26 | include TODO.md 27 | include awlsim-covreport 28 | include awlsim-server.service 29 | include awlsim/gui/icons/pic2py 30 | include awlsimhw_linuxcnc/awlsim.hal 31 | include awlsimhw_pyprofibus.conf 32 | 33 | prune ./build 34 | prune build 35 | 36 | global-exclude *.pyo *.pyc __pycache__ *$py.class 37 | -------------------------------------------------------------------------------- /QUICK-START.md: -------------------------------------------------------------------------------- 1 | # Awlsim - Quick start tutorial 2 | 3 | 4 | Start the GUI by invoking `awlsim-gui` on Linux, `awlsim-win.cmd` on Windows or `awlsim.cmd` on Windows (Awlsim standalone package). The following screen will appear: 5 | 6 | awlsim-gui 7 | 8 | Enter the AWL/STL program in the editor area: 9 | 10 | awlsim-gui 11 | 12 | Press the `download all sources` button. If you did not do this before, the `connect dialog` will appear. Just select a `simulator core` and click `Accept`. 13 | 14 | You will need to download the sources again, if you edit the sources later. But the `connect dialog` will not appear again. 15 | 16 | awlsim-gui 17 | 18 | Press the `RUN` button to start the simulated CPU: 19 | 20 | awlsim-gui 21 | 22 | You may want to open some inspection windows to see the program output or manually set some program input: 23 | 24 | awlsim-gui 25 | -------------------------------------------------------------------------------- /awlsim-gui: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # AWL simulator - GUI 5 | # 6 | # Copyright 2012-2016 Michael Buesch 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License along 19 | # with this program; if not, write to the Free Software Foundation, Inc., 20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 | # 22 | 23 | if __name__ == "__main__": 24 | import awlsim.gui.startup 25 | -------------------------------------------------------------------------------- /awlsim-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Awlsim PLC core server 3 | After=network.target 4 | StartLimitIntervalSec=0 5 | 6 | [Service] 7 | Type=simple 8 | TimeoutSec=60 9 | Restart=on-failure 10 | RestartSec=100ms 11 | User=root 12 | Group=root 13 | WorkingDirectory=/etc/awlsim 14 | Nice=-5 15 | 16 | ExecStart=/usr/bin/python3 /usr/bin/awlsim-server -l localhost -4 -S -w /etc/awlsim/awlsim-server.awlpro 17 | ExecStartPost=-/usr/bin/python3 /usr/bin/awlsim-client -c localhost -r RUN 18 | 19 | Environment=PYTHONPATH=/usr/lib/python3/dist-packages PYTHONHASHSEED=0 PYTHONOPTIMIZE=1 PYTHONDONTWRITEBYTECODE=1 AWLSIM_CYTHON=1 AWLSIM_SCHED= AWLSIM_PRIO= AWLSIM_AFFINITY= AWLSIM_MLOCK= 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /awlsim-win.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal ENABLEDELAYEDEXPANSION 3 | set basedir=%~dp0 4 | set awlsim_base=%basedir% 5 | 6 | set PYPROG=awlsim-gui 7 | for /D %%f in ( "progs\putty\*" ) do set PATH=%%f\putty;!PATH! 8 | 9 | 10 | set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32 11 | for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f 12 | for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts 13 | 14 | 15 | rem Set Cython paths 16 | if not exist %awlsim_base%\build goto no_cython 17 | for /D %%f in ( "%awlsim_base%\build\lib.*-3.*" ) do set PYTHONPATH=%%f\;!PYTHONPATH! 18 | set PYTHONPATH=.;%PYTHONPATH% 19 | set AWLSIM_CYTHON=1 20 | echo PYTHONPATH=%PYTHONPATH% 21 | :no_cython 22 | 23 | 24 | py -h >NUL 2>&1 25 | if %ERRORLEVEL% EQU 0 goto exec_py 26 | 27 | python3 -h >NUL 2>&1 28 | if %ERRORLEVEL% EQU 0 goto exec_python3 29 | 30 | python -h >NUL 2>&1 31 | if %ERRORLEVEL% EQU 0 goto exec_python 32 | 33 | echo Did not find Python 3.x in the PATH. 34 | echo Please make sure Python 3.x is installed correctly. 35 | pause 36 | goto end 37 | 38 | 39 | :exec_py 40 | @echo on 41 | py -3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9 42 | @goto end 43 | 44 | 45 | :exec_python3 46 | @echo on 47 | python3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9 48 | @goto end 49 | 50 | 51 | :exec_python 52 | @echo on 53 | python -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9 54 | @goto end 55 | 56 | 57 | :end 58 | -------------------------------------------------------------------------------- /awlsim/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/awlcompiler/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | 4 | from awlsim.awlcompiler.tokenizer import * 5 | -------------------------------------------------------------------------------- /awlsim/awloptimizer/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | -------------------------------------------------------------------------------- /awlsim/common/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | 4 | from awlsim.common.blocker import * 5 | from awlsim.common.cpuconfig import * 6 | from awlsim.common.debug import * 7 | from awlsim.common.enumeration import * 8 | from awlsim.common.env import * 9 | from awlsim.common.exceptions import * 10 | from awlsim.common.immutable import * 11 | from awlsim.common.mlock import * 12 | from awlsim.common.net import * 13 | from awlsim.common.project import * 14 | from awlsim.common.sources import * 15 | from awlsim.common.subprocess_wrapper import * 16 | from awlsim.common.templates import * 17 | from awlsim.common.util import * 18 | from awlsim.common.version import * 19 | from awlsim.common.wordpacker import * 20 | -------------------------------------------------------------------------------- /awlsim/common/cpuspecs.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | 4 | cdef class S7CPUSpecs(object): 5 | cdef public S7CPU cpu 6 | cdef public uint32_t nrAccus 7 | cdef public uint32_t nrTimers 8 | cdef public uint32_t nrCounters 9 | cdef public uint32_t nrFlags 10 | cdef public uint32_t nrInputs 11 | cdef public uint32_t nrOutputs 12 | cdef public uint32_t nrLocalbytes 13 | cdef public uint32_t parenStackSize 14 | cdef public uint32_t callStackSize 15 | -------------------------------------------------------------------------------- /awlsim/common/cython_support.pxd.in: -------------------------------------------------------------------------------- 1 | # Get all stdint types. 2 | from libc.stdint cimport * 3 | 4 | # Boolean type. The values 0 and 1 can be used. 5 | ctypedef bint _Bool 6 | 7 | # Extended boolean type for use as return type from 8 | # functions that can raise exceptions. 9 | # The values 0 and 1 can be used. 10 | # An exception is encoded as special value ExBool_val. 11 | ctypedef signed int ExBool_t 12 | cdef enum: ExBool_val = -1 13 | 14 | # Make the Cython likely()/unlikely() condition macros accessible. 15 | cdef extern from *: 16 | _Bool likely(_Bool) 17 | _Bool unlikely(_Bool) 18 | -------------------------------------------------------------------------------- /awlsim/common/cython_support.pyx.in: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - Cython support 4 | # 5 | # Copyright 2018 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | 23 | -------------------------------------------------------------------------------- /awlsim/common/lpfilter.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | 4 | cdef class LPFilter(object): 5 | cdef double __div 6 | cdef double __state 7 | cdef double __initial 8 | 9 | cdef void reset(self) 10 | cdef double run(self, double value) 11 | -------------------------------------------------------------------------------- /awlsim/common/monotonic.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | cdef class _MONOTONIC_RAW_factory(object): 4 | pass 5 | 6 | cdef class _MONOTONIC_RAW_timemodule_factory(_MONOTONIC_RAW_factory): 7 | cdef public object __id_CLOCK_MONOTONIC_RAW 8 | cdef public object __clock_gettime 9 | 10 | cdef class _MONOTONIC_RAW_CFFI_factory(_MONOTONIC_RAW_factory): 11 | cdef public object __id_CLOCK_MONOTONIC_RAW 12 | cdef public object __c 13 | cdef public object __ts 14 | cdef public object __ffi 15 | 16 | cdef double monotonic_time() 17 | -------------------------------------------------------------------------------- /awlsim/common/movingavg.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | 4 | cdef class MovingAvg(object): 5 | cdef uint32_t __size 6 | cdef double *__items 7 | cdef uint32_t __nrItems 8 | cdef uint32_t __beginPtr 9 | cdef uint32_t __endPtr 10 | cdef double __avgSum 11 | 12 | cdef double calculate(self, double value) 13 | -------------------------------------------------------------------------------- /awlsim/common/version.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | #from awlsim.common.cython_support cimport * #@cy 3 | from awlsim.common.compat import * 4 | 5 | from binascii import crc32 6 | 7 | 8 | __all__ = [ 9 | "VERSION_MAJOR", 10 | "VERSION_MINOR", 11 | "VERSION_BUGFIX", 12 | "VERSION_STRING", 13 | "VERSION_ID", 14 | ] 15 | 16 | 17 | VERSION_MAJOR = 0 18 | VERSION_MINOR = 77 19 | VERSION_BUGFIX = 1 20 | VERSION_EXTRA = "" 21 | 22 | 23 | 24 | if osIsWindows and VERSION_EXTRA: #@nocov 25 | # pywin32 does not like non-numbers in the version string. 26 | # Convert the VERSION_EXTRA into a dot-number string. 27 | VERSION_EXTRA = ".0000%d0000" % (crc32(VERSION_EXTRA.encode("UTF-8")) & 0xFFFF) 28 | 29 | # Create a string from the version information. 30 | VERSION_STRING = "%d.%d.%d%s" % (VERSION_MAJOR, VERSION_MINOR, 31 | VERSION_BUGFIX, VERSION_EXTRA) 32 | 33 | # Create a 31 bit ID number from the version information. 34 | VERSION_ID = crc32(VERSION_STRING.encode("UTF-8")) & 0x7FFFFFFF 35 | -------------------------------------------------------------------------------- /awlsim/core/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | 4 | from awlsim.core.main import * 5 | from awlsim.core.cpu import * 6 | from awlsim.core.hardware import * 7 | from awlsim.core.hardware_loader import * 8 | -------------------------------------------------------------------------------- /awlsim/core/blocks.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.lstack cimport * 3 | 4 | cdef class Block(object): 5 | cdef public int32_t index 6 | cdef public object sourceRef 7 | cdef public object __identHash 8 | 9 | cdef class CodeBlock(Block): 10 | cdef public _Bool isOB 11 | cdef public _Bool isFC 12 | cdef public _Bool isFB 13 | cdef public _Bool isSystemBlock 14 | cdef public _Bool isLibraryBlock 15 | 16 | cdef public list insns 17 | cdef public uint32_t nrInsns 18 | cdef public list labels 19 | cdef public uint32_t nrLabels 20 | cdef public object interface 21 | cdef public uint32_t tempAllocation 22 | 23 | cdef class StaticCodeBlock(CodeBlock): 24 | pass 25 | 26 | cdef class OB(CodeBlock): 27 | cdef public LStackAllocator lstack 28 | 29 | cdef class FB(CodeBlock): 30 | pass 31 | 32 | cdef class FC(CodeBlock): 33 | pass 34 | -------------------------------------------------------------------------------- /awlsim/core/counters.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | 4 | cdef class Counter(object): 5 | cdef public S7CPU cpu 6 | cdef public uint32_t index 7 | cdef public _Bool prevVKE_FR 8 | cdef public _Bool prevVKE_S 9 | cdef public _Bool prevVKE_ZV 10 | cdef public _Bool prevVKE_ZR 11 | cdef public uint16_t counter 12 | 13 | cdef _Bool get(self) 14 | cdef uint16_t getValueBin(self) 15 | cdef uint16_t getValueBCD(self) 16 | cdef setValueBCD(self, uint16_t bcd) 17 | cdef set(self, _Bool VKE) 18 | cdef void reset(self) 19 | cdef void run_FR(self, _Bool VKE) 20 | cdef void run_ZV(self, _Bool VKE) 21 | cdef void run_ZR(self, _Bool VKE) 22 | -------------------------------------------------------------------------------- /awlsim/core/datablocks.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.blocks cimport * 3 | from awlsim.core.datastructure cimport * 4 | from awlsim.core.offset cimport * 5 | from awlsim.core.operators cimport * 6 | 7 | cdef class DB(Block): 8 | cdef public uint32_t _PERM_READ 9 | cdef public uint32_t _PERM_WRITE 10 | cdef public uint32_t permissions 11 | 12 | cdef public object codeBlock 13 | cdef public AwlStruct __struct 14 | cdef public AwlStructInstance structInstance 15 | 16 | cdef AwlMemoryObject fetch(self, AwlOperator operator, AwlOffset baseOffset) except NULL 17 | cdef store(self, AwlOperator operator, AwlMemoryObject memObj, AwlOffset baseOffset) 18 | -------------------------------------------------------------------------------- /awlsim/core/datastructure.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.memory cimport * 3 | from awlsim.core.offset cimport * 4 | 5 | cdef class AwlStructField(object): 6 | cdef public object name 7 | cdef public AwlOffset offset 8 | cdef public object dataType 9 | cdef public object initBytes 10 | cdef public AwlStructField override 11 | cdef public AwlStructField finalOverride 12 | cdef public uint32_t bitSize 13 | cdef public uint32_t byteSize 14 | cdef public _Bool compound 15 | cdef public _Bool callByRef 16 | 17 | cdef __eq(self, other) 18 | 19 | cdef class AwlStruct(object): 20 | cdef public list fields 21 | cdef public dict name2field 22 | 23 | cdef __eq(self, other) 24 | 25 | cdef class AwlStructInstance(object): 26 | cdef public AwlStruct _struct 27 | cdef public AwlMemory memory 28 | 29 | cdef AwlMemoryObject getFieldData(self, AwlStructField field, AwlOffset baseOffset) except NULL 30 | cdef setFieldData(self, AwlStructField field, AwlMemoryObject memObj, AwlOffset baseOffset) 31 | 32 | cdef AwlMemoryObject getFieldDataByName(self, object name) except NULL 33 | cdef setFieldDataByName(self, object name, AwlMemoryObject memObj) 34 | -------------------------------------------------------------------------------- /awlsim/core/hardware.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.main cimport * 3 | from awlsim.core.cpu cimport * 4 | 5 | cdef class AbstractHardwareInterface(object): 6 | cdef public AwlSim sim 7 | cdef public S7CPU cpu 8 | cdef public _Bool __running 9 | cdef public uint32_t inputAddressBase 10 | cdef public uint32_t outputAddressBase 11 | cdef public dict __paramsByName 12 | cdef public dict __paramsByDescType 13 | 14 | cdef readInputs(self) 15 | cdef writeOutputs(self) 16 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 17 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 18 | -------------------------------------------------------------------------------- /awlsim/core/insnmeas.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | 5 | cdef class InsnMeasData(object): 6 | cdef public _Bool running 7 | cdef public _Bool measured 8 | cdef public double measStart 9 | cdef public double cumRt 10 | cdef public uint32_t count 11 | cdef public double minRt 12 | cdef public double maxRt 13 | 14 | cdef class InsnMeas(object): 15 | cdef public object __perf_counter 16 | cdef public list __data 17 | 18 | cdef void meas(self, _Bool begin, uint32_t insnType) 19 | -------------------------------------------------------------------------------- /awlsim/core/instructions/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_abs.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ABS(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_acos.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ACOS(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_asin.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASIN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_eq.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_EQ(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_eq_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_EQ_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_ge.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_GE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_gt.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_GT(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_le.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_LE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_lt.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_LT(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assert_ne.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSERT_NE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_assign.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ASSIGN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_atan.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ATAN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_auf.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_AUF(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_be.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_bea.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BEA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_beb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BEB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_bend.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BEND(AwlInsn): 5 | cdef public dict __typeCalls 6 | cdef uint32_t __type_UB 7 | cdef uint32_t __type_UNB 8 | cdef uint32_t __type_OB 9 | cdef uint32_t __type_ONB 10 | cdef uint32_t __type_XB 11 | cdef uint32_t __type_XNB 12 | 13 | cdef __run_UB(self, ParenStackElem pse) 14 | cdef __run_UNB(self, ParenStackElem pse) 15 | cdef __run_OB(self, ParenStackElem pse) 16 | cdef __run_ONB(self, ParenStackElem pse) 17 | cdef __run_XB(self, ParenStackElem pse) 18 | cdef __run_XNB(self, ParenStackElem pse) 19 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_bld.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BLD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_bmcr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BMCR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_btd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BTD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_bti.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_BTI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_call.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_AbstractCall(AwlInsn): 5 | pass 6 | 7 | cdef class AwlInsn_CALL(AwlInsn_AbstractCall): 8 | pass 9 | 10 | cdef class AwlInsn_CC(AwlInsn_AbstractCall): 11 | pass 12 | 13 | cdef class AwlInsn_UC(AwlInsn_AbstractCall): 14 | pass 15 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_clr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_CLR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_cos.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_COS(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_dec.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DEC(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_di_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DI_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_di_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DI_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_di_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DI_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_dtb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DTB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_dtr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_DTR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ent.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ENT(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_eq_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_EQ_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_eq_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_EQ_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_eq_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_EQ_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_exp.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_EXP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_feature.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_FEATURE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_fn.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_FN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_fp.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_FP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_fr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_FR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ge_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GE_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ge_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GE_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ge_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GE_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_generic_call.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GENERIC_CALL(AwlInsn): 5 | cdef public object callback 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_gt_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GT_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_gt_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GT_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_gt_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_GT_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_inc.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INC(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_incar1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INCAR1(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_incar2.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INCAR2(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_inline_awl.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INLINE_AWL(AwlInsn): 5 | cdef public object awlCodeStr 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_invd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INVD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_invi.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_INVI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_itb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ITB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_itd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ITD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_l.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_L(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lar1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LAR1(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lar2.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LAR2(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lc.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LC(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_le_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LE_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_le_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LE_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_le_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LE_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_leave.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LEAVE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ln.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_loop.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LOOP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lt_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LT_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lt_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LT_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_lt_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_LT_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mcra.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MCRA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mcrb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MCRB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mcrd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MCRD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mi_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MI_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mi_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MI_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mi_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MI_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mod.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MOD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mu_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MU_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mu_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MU_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_mu_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_MU_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ne_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NE_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ne_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NE_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ne_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NE_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_negd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NEGD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_negi.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NEGI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_negr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NEGR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_nop.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NOP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_not.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_NOT(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_o.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_O(AwlInsn): 5 | cdef __run_withOps(self) 6 | cdef __run_noOps(self) 7 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ob.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_OB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_od.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_OD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_on.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ON(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_onb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ONB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ow.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_OW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_pl.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_PL(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_pl_d.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_PL_D(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_pl_i.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_PL_I(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_pl_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_PL_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_pop.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_POP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_push.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_PUSH(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_r.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_R(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rld.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RLD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rlda.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RLDA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rnd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RND(AwlInsn): 5 | cdef double __0p5_plus_epsilon 6 | cdef double __0p5_minus_epsilon 7 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rndn.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RNDN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rndp.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RNDP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rrd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RRD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_rrda.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_RRDA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_s.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_S(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sa.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_save.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SAVE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_se.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SE(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_set.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SET(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_si.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sin.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SIN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sld.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SLD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sleep.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SLEEP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_slw.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SLW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spa.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPA(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spbb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPBB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spbi.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPBI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spbin.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPBIN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spbn.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPBN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spbnb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPBNB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spl.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPL(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spm.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPM(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spmz.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPMZ(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spn.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spo.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPO(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spp.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPP(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sppz.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPPZ(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sps.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPS(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spu.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPU(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_spz.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SPZ(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sqr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SQR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sqrt.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SQRT(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_srd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SRD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_srw.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SRW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ss.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SS(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ssd.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SSD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ssi.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SSI(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_stwrst.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_STWRST(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_sv.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_SV(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_t.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_T(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tad.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tak.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAK(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tan.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAN(AwlInsn): 5 | cdef double __piHalf 6 | cdef double __piHalfNeg 7 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tar.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tar1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAR1(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tar2.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAR2(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_taw.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TAW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_tdb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TDB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_trunc.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_TRUNC(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_u.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_U(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ub.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_UB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_ud.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_UD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_un.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_UN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_unb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_UNB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_uw.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_UW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_x.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_X(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_xb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_XB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_xn.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_XN(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_xnb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_XNB(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_xod.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_XOD(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_xow.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_XOW(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_zr.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ZR(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/insn_zv.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.instructions.main cimport * 3 | 4 | cdef class AwlInsn_ZV(AwlInsn): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/core/instructions/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | from awlsim.core.parenstack cimport * 4 | from awlsim.core.statusword cimport * 5 | from awlsim.core.operators cimport * 6 | 7 | cdef class AwlInsn(object): 8 | cdef public S7CPU cpu 9 | cdef public uint32_t insnType 10 | cdef public object labelStr 11 | cdef public object commentStr 12 | cdef public object parentInfo 13 | cdef public int32_t ip 14 | cdef public list ops 15 | cdef public uint32_t opCount 16 | cdef public AwlOperator op0 17 | cdef public AwlOperator op1 18 | cdef public tuple params 19 | 20 | cdef public uint32_t _widths_1 21 | cdef public uint32_t _widths_8_16_32 22 | cdef public uint32_t _widths_16 23 | cdef public uint32_t _widths_32 24 | cdef public uint32_t _widths_scalar 25 | cdef public uint32_t _widths_all 26 | 27 | cdef run(self) 28 | -------------------------------------------------------------------------------- /awlsim/core/labels.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | from awlsim.core.instructions.main cimport * 4 | 5 | 6 | cdef class AwlLabel(object): 7 | cdef public AwlInsn insn 8 | cdef public object label 9 | -------------------------------------------------------------------------------- /awlsim/core/lstack.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.memory cimport * 3 | from awlsim.core.offset cimport * 4 | 5 | cdef struct LStackFrame: 6 | uint32_t byteOffset 7 | uint32_t allocBits 8 | LStackFrame *prevFrame 9 | 10 | cdef class LStackAllocator(object): 11 | cdef public AwlMemory memory 12 | cdef public uint32_t maxAllocBits 13 | cdef public uint32_t globAllocBits 14 | 15 | cdef LStackFrame *topFrame 16 | cdef public AwlOffset topFrameOffset 17 | 18 | cdef resize(self, uint32_t maxAllocBytes) 19 | cdef void reset(self) 20 | 21 | cdef void enterStackFrame(self) 22 | cdef void exitStackFrame(self) 23 | 24 | cdef AwlOffset alloc(self, uint32_t nrBits) 25 | -------------------------------------------------------------------------------- /awlsim/core/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | 4 | cdef class AwlSim(object): 5 | cdef public S7CPU cpu 6 | cdef public _Bool _fatalHwErrors 7 | cdef public list __registeredHardware 8 | cdef public uint32_t __registeredHardwareCount 9 | cdef public _Bool __hwStartupRequired 10 | 11 | cdef public int32_t _profileLevel 12 | cdef public object __profileModule 13 | cdef public object __pstatsModule 14 | cdef public object __profiler 15 | 16 | cpdef runCycle(self) 17 | cdef __readHwInputs(self) 18 | cdef __writeHwOutputs(self) 19 | -------------------------------------------------------------------------------- /awlsim/core/obtemp.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | from awlsim.core.cpu cimport * 4 | 5 | 6 | cdef class OBTempPresets(object): 7 | cdef public int32_t obNumber 8 | cdef public S7CPU cpu 9 | 10 | cdef generate(self, uint8_t *localdata) 11 | 12 | cdef class OBTempPresets_dummy(OBTempPresets): 13 | pass 14 | 15 | cdef class OB1TempPresets(OBTempPresets): 16 | pass 17 | 18 | cdef dict OBTempPresets_table 19 | -------------------------------------------------------------------------------- /awlsim/core/offset.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | cimport cython 4 | 5 | 6 | cdef class AwlOffset(object): 7 | cdef public int64_t byteOffset 8 | cdef public int32_t bitOffset 9 | 10 | cdef public int32_t dbNumber 11 | cdef public object dbName 12 | cdef public object identChain 13 | cdef public int32_t fbNumber 14 | cdef public AwlOffset subOffset 15 | 16 | cpdef __eq(self, object other) 17 | 18 | cpdef AwlOffset dup(self) 19 | 20 | cpdef uint32_t toPointerValue(self) 21 | cpdef uint64_t toLongBitOffset(self) 22 | 23 | cdef AwlOffset add(self, AwlOffset other) 24 | cdef AwlOffset addInt(self, int64_t byteOffset, int32_t bitOffset) 25 | 26 | cdef void iadd(self, AwlOffset other) 27 | cdef void iaddInt(self, int64_t byteOffset, int32_t bitOffset) 28 | 29 | cdef AwlOffset make_AwlOffset(int64_t byteOffset, int32_t bitOffset) 30 | 31 | cdef inline AwlOffset make_AwlOffset_fromPointerValue(uint32_t value): 32 | return make_AwlOffset((value & 0x0007FFF8u) >> 3u, 33 | (value & 0x7u)) 34 | 35 | @cython.cdivision(True) 36 | cdef inline AwlOffset make_AwlOffset_fromLongBitOffset(int64_t bitOffset): 37 | return make_AwlOffset(bitOffset // 8, bitOffset % 8) 38 | -------------------------------------------------------------------------------- /awlsim/core/parameters.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.operators cimport * 3 | from awlsim.core.datastructure cimport * 4 | 5 | cdef class AwlParamAssign(object): 6 | cdef public object lvalueName 7 | cdef public AwlOperator rvalueOp 8 | cdef public AwlOperator scratchSpaceOp 9 | cdef public object interface 10 | cdef public _Bool isInbound 11 | cdef public _Bool isOutbound 12 | cdef public object lValueDataType 13 | cdef public AwlStructField lValueStructField 14 | cdef public int32_t interfaceFieldIndex 15 | 16 | cpdef __eq(self, object other) 17 | -------------------------------------------------------------------------------- /awlsim/core/parenstack.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | from awlsim.core.statusword cimport * 4 | from awlsim.common.cpuspecs cimport * 5 | 6 | cdef struct ParenStackElem: 7 | uint8_t insnType 8 | _Bool NER 9 | _Bool VKE 10 | _Bool OR 11 | 12 | cdef class ParenStack(object): 13 | cdef public S7CPU cpu 14 | cdef public uint32_t maxNrElements 15 | cdef public uint32_t nrElements 16 | cdef ParenStackElem *elements 17 | 18 | cdef push(self, uint8_t insnType, S7StatusWord statusWord) 19 | cdef ParenStackElem pop(self) 20 | 21 | cdef ParenStack make_ParenStack(S7CPU cpu) 22 | -------------------------------------------------------------------------------- /awlsim/core/statusword.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | 3 | cdef class S7StatusWord(object): 4 | cdef _Bool NER 5 | cdef _Bool VKE 6 | cdef _Bool STA 7 | cdef _Bool OR 8 | cdef _Bool OS 9 | cdef _Bool OV 10 | cdef _Bool A0 11 | cdef _Bool A1 12 | cdef _Bool BIE 13 | 14 | cdef __eq(self, object other) 15 | cdef ExBool_t getByBitNumber(self, uint8_t bitNumber) except ExBool_val 16 | cdef void reset(self) 17 | cdef uint16_t getWord(self) 18 | cdef void setWord(self, uint16_t word) 19 | cdef dup(self) 20 | cdef void setForFloatingPoint(self, double pyFloat) 21 | cdef void setForFloatingPointDWord(self, uint32_t dword) 22 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.system_sfb_m1 cimport * 3 | from awlsim.core.systemblocks.system_sfb_0 cimport * 4 | from awlsim.core.systemblocks.system_sfb_1 cimport * 5 | from awlsim.core.systemblocks.system_sfb_2 cimport * 6 | from awlsim.core.systemblocks.system_sfb_3 cimport * 7 | from awlsim.core.systemblocks.system_sfb_4 cimport * 8 | from awlsim.core.systemblocks.system_sfb_5 cimport * 9 | 10 | cdef dict _SFB_table 11 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_0.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB0(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB1(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_2.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB2(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_3.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB3(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_4.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB4(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_5.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFB5(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_m1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFBm1(SFB): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfb_m1.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - SFBs 4 | # 5 | # Copyright 2012-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.common.exceptions import * 27 | from awlsim.common.util import * 28 | 29 | from awlsim.core.systemblocks.systemblocks import * #+cimport 30 | from awlsim.core.blockinterface import * 31 | from awlsim.core.datatypes import * 32 | 33 | 34 | class SFBm1(SFB): #+cdef 35 | name = (-1, "__SFB_NOP", None) 36 | 37 | def run(self): #+cpdef #@nocov 38 | #@cy cdef S7StatusWord s 39 | 40 | s = self.cpu.statusWord 41 | s.BIE = 1 42 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.system_sfc_m4 cimport * 3 | from awlsim.core.systemblocks.system_sfc_m3 cimport * 4 | from awlsim.core.systemblocks.system_sfc_m2 cimport * 5 | from awlsim.core.systemblocks.system_sfc_m1 cimport * 6 | from awlsim.core.systemblocks.system_sfc_21 cimport * 7 | from awlsim.core.systemblocks.system_sfc_46 cimport * 8 | from awlsim.core.systemblocks.system_sfc_47 cimport * 9 | from awlsim.core.systemblocks.system_sfc_64 cimport * 10 | 11 | cdef dict _SFC_table 12 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_21.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFC21(SFC): 5 | cdef public dict __typeWidths 6 | 7 | cpdef run(self) 8 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_46.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFC46(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_46.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - SFCs 4 | # 5 | # Copyright 2012-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.common.exceptions import * 27 | from awlsim.common.util import * 28 | 29 | from awlsim.core.systemblocks.systemblocks import * #+cimport 30 | from awlsim.core.blockinterface import * 31 | from awlsim.core.datatypes import * 32 | 33 | 34 | class SFC46(SFC): #+cdef 35 | name = (46, "STP", "STOP CPU") 36 | 37 | def run(self): #+cpdef 38 | raise MaintenanceRequest(MaintenanceRequest.TYPE_STOP, 39 | "CALL SFC 46") 40 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_47.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFC47(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_64.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFC64(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_m1.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFCm1(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_m1.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - SFCs 4 | # 5 | # Copyright 2012-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.common.exceptions import * 27 | from awlsim.common.util import * 28 | 29 | from awlsim.core.systemblocks.systemblocks import * #+cimport 30 | from awlsim.core.blockinterface import * 31 | from awlsim.core.datatypes import * 32 | 33 | 34 | class SFCm1(SFC): #+cdef 35 | name = (-1, "__SFC_NOP", None) 36 | 37 | def run(self): #+cpdef #@nocov 38 | #@cy cdef S7StatusWord s 39 | 40 | s = self.cpu.statusWord 41 | s.BIE = 1 42 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_m2.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFCm2(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_m3.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFCm3(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/system_sfc_m4.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.systemblocks.systemblocks cimport * 3 | 4 | cdef class SFCm4(SFC): 5 | cpdef run(self) 6 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/systemblockinterface.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - Systemblock interface 4 | # 5 | # Copyright 2012-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.common.exceptions import * 27 | from awlsim.common.util import * 28 | 29 | from awlsim.core.blockinterface import * 30 | 31 | 32 | __all__ = [ 33 | "SFBInterface", 34 | "SFCInterface", 35 | ] 36 | 37 | 38 | class SFBInterface(FBInterface): 39 | pass 40 | 41 | class SFCInterface(FCInterface): 42 | pass 43 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/systemblocks.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.blocks cimport * 3 | from awlsim.core.cpu cimport * 4 | 5 | cdef class SystemBlock(StaticCodeBlock): 6 | cdef public S7CPU cpu 7 | cdef public dict __interfaceOpers 8 | cdef public uint32_t __widthMaskAll 9 | 10 | cdef AwlMemoryObject fetchInterfaceFieldByName(self, object name) except NULL 11 | cdef storeInterfaceFieldByName(self, object name, AwlMemoryObject value) 12 | 13 | cpdef run(self) 14 | 15 | cdef class SFB(SystemBlock): 16 | pass 17 | 18 | cdef class SFC(SystemBlock): 19 | pass 20 | -------------------------------------------------------------------------------- /awlsim/core/systemblocks/tables.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - system block table 4 | # 5 | # Copyright 2012-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.core.systemblocks.system_sfc import * #+cimport 27 | from awlsim.core.systemblocks.system_sfb import * #+cimport 28 | 29 | __all__ = [ 30 | "SFC_table", 31 | "SFB_table", 32 | ] 33 | 34 | SFC_table = _SFC_table 35 | SFB_table = _SFB_table 36 | -------------------------------------------------------------------------------- /awlsim/core/userdefinedtypes.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.blocks cimport * 3 | 4 | cdef class UDTField(object): 5 | cdef public object name 6 | cdef public object dataType 7 | cdef public object initBytes 8 | 9 | cdef class UDT(Block): 10 | cdef public list fields 11 | cdef public dict fieldNameMap 12 | cdef public object _struct 13 | cdef public uint32_t __structState 14 | -------------------------------------------------------------------------------- /awlsim/coreclient/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/coreserver/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/fupcompiler/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | 4 | from awlsim.fupcompiler.fupcompiler import * 5 | -------------------------------------------------------------------------------- /awlsim/fupcompiler/fupcompiler.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.cpu cimport * 3 | 4 | cdef class FupFakeCPU(S7CPU): 5 | pass 6 | -------------------------------------------------------------------------------- /awlsim/gui/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/gui/fup/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/gui/icons/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsim.gui.icons.icons import * 4 | -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/counter.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/download-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/download-one.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/download.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/edit-delete-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/edit-delete-3.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/fup.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/fup.odg -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/fup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/fup.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/inputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/inputs.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/kop.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/kop.odg -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/kop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/kop.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/lcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/lcd.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/memory_bits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/memory_bits.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/outputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/outputs.png -------------------------------------------------------------------------------- /awlsim/gui/icons/icon-images/stdlib-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/icons/icon-images/stdlib-package.png -------------------------------------------------------------------------------- /awlsim/gui/icons/pic2py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import base64 5 | from PySide.QtCore import * 6 | from PySide.QtGui import * 7 | from PySide.QtSvg import * 8 | 9 | qapp = QApplication(sys.argv) 10 | 11 | inFile = sys.argv[1] 12 | outFile = sys.argv[2] 13 | 14 | if inFile.lower().endswith(".svg"): 15 | render = QSvgRenderer(inFile) 16 | img = QImage(48, 48, QImage.Format_ARGB32) 17 | img.fill(QColor(0, 0, 0, 0)) 18 | painter = QPainter() 19 | painter.begin(img) 20 | render.render(painter) 21 | painter.end() 22 | else: 23 | img = QImage(inFile) 24 | 25 | ba = QByteArray() 26 | buf = QBuffer(ba) 27 | buf.open(QIODevice.WriteOnly) 28 | img.save(buf, "PNG") 29 | imgB64 = base64.b64encode(ba.data()) 30 | fd = open(outFile, "wb") 31 | baseName = outFile.split("/")[-1] 32 | baseName = baseName[ : baseName.rfind(".")] 33 | varName = baseName.replace("-", "_") 34 | varDef = "icon_%s = b'" % varName 35 | fd.write(b"# AUTOMATICALLY GENERATED FILE\n") 36 | fd.write(b"# DO NOT EDIT\n") 37 | fd.write(b"\n") 38 | fd.write(("# Generated from %s\n" % inFile.split("/")[-1]).encode()) 39 | fd.write(b"\n") 40 | fd.write(varDef.encode()) 41 | while imgB64: 42 | fd.write(imgB64[:48]) 43 | imgB64 = imgB64[48:] 44 | if imgB64: 45 | fd.write(b"'\\\n" + b" " * (len(varDef) - 2) + b"b'") 46 | fd.write(b"'\n") 47 | 48 | qapp.exit(0) 49 | -------------------------------------------------------------------------------- /awlsim/gui/interfedit/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/gui/no_cython: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/awlsim/gui/no_cython -------------------------------------------------------------------------------- /awlsim/library/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim/library/iec/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim.common.compat import * 3 | 4 | from awlsim.library.iec.iec import * 5 | 6 | from awlsim.library.iec.fc4_delete import * 7 | from awlsim.library.iec.fc9_eq_dt import * 8 | from awlsim.library.iec.fc12_ge_dt import * 9 | from awlsim.library.iec.fc21_len import * 10 | -------------------------------------------------------------------------------- /awlsim/library/iec/iec.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - IEC library 4 | # 5 | # Copyright 2014 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.library.libentry import * 27 | 28 | 29 | AwlLib.register("IEC", "IEC functions") 30 | -------------------------------------------------------------------------------- /awlsim/library/libentry.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.blocks cimport * 3 | 4 | cdef class AwlLibEntry(StaticCodeBlock): 5 | pass 6 | 7 | cdef class AwlLibFC(AwlLibEntry): 8 | pass 9 | -------------------------------------------------------------------------------- /awlsim/library/libinterface.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # AWL simulator - Library entry interface 4 | # 5 | # Copyright 2014-2017 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | #from awlsim.common.cython_support cimport * #@cy 24 | from awlsim.common.compat import * 25 | 26 | from awlsim.core.blocks import * #+cimport 27 | from awlsim.core.blockinterface import * 28 | 29 | 30 | __all__ = [ 31 | "AwlLibFCInterface", 32 | "AwlLibFBInterface", 33 | ] 34 | 35 | 36 | class AwlLibFCInterface(FCInterface): 37 | pass 38 | 39 | class AwlLibFBInterface(FBInterface): 40 | pass 41 | -------------------------------------------------------------------------------- /awlsim_loader/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /awlsim_loader/awlcompiler.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.awlcompiler" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/awloptimizer.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.awloptimizer" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/common.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.common" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/core.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.core" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/coreclient.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.coreclient.client" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/coreserver.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.coreserver.server" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsim_loader/fupcompiler.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | import awlsim_loader.coverage_helper 4 | import awlsim_loader.cython_helper as __cython 5 | 6 | __importmod = "awlsim.fupcompiler" 7 | 8 | if __cython.shouldUseCython(__importmod): #@nocy 9 | #if True: #@cy 10 | __importcymod = __cython.cythonModuleName(__importmod) 11 | try: 12 | exec("from %s import *" % __importcymod) 13 | except ImportError as e: 14 | __cython.cythonImportError(__importcymod, str(e)) 15 | if not __cython.shouldUseCython(__importmod): #@nocy 16 | exec("from %s import *" % __importmod) #@nocy 17 | -------------------------------------------------------------------------------- /awlsimhw_debug/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_debug.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_debug/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.hardware cimport * 3 | 4 | cdef class HardwareInterface_Debug(AbstractHardwareInterface): 5 | cdef public uint32_t __startupErrorRate 6 | cdef public uint32_t __startupErrorCount 7 | cdef public uint32_t __shutdownErrorRate 8 | cdef public uint32_t __shutdownErrorCount 9 | cdef public uint32_t __inputErrorRate 10 | cdef public uint32_t __inputErrorCount 11 | cdef public uint32_t __outputErrorRate 12 | cdef public uint32_t __outputErrorCount 13 | cdef public uint32_t __directReadErrorRate 14 | cdef public uint32_t __directReadErrorCount 15 | cdef public uint32_t __directWriteErrorRate 16 | cdef public uint32_t __directWriteErrorCount 17 | 18 | cdef readInputs(self) 19 | cdef writeOutputs(self) 20 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 21 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 22 | -------------------------------------------------------------------------------- /awlsimhw_dummy/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_dummy.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_dummy/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.hardware cimport * 3 | 4 | cdef class HardwareInterface_Dummy(AbstractHardwareInterface): 5 | cdef readInputs(self) 6 | cdef writeOutputs(self) 7 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 8 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 9 | -------------------------------------------------------------------------------- /awlsimhw_linuxcnc/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_linuxcnc.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_linuxcnc/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.hardware cimport * 3 | 4 | cdef class HardwareInterface_LinuxCNC(AbstractHardwareInterface): 5 | cdef public _Bool linuxCNC_initialized 6 | cdef public object LinuxCNC_HAL 7 | cdef public object halComponent 8 | cdef public uint32_t inputSize 9 | cdef public uint32_t outputSize 10 | cdef public _Bool __configDone 11 | cdef public list __activeInputs 12 | cdef public dict __activeInputsAddr2Sig 13 | cdef public list __activeOutputs 14 | cdef public dict __activeOutputsAddr2Sig 15 | 16 | cdef readInputs(self) 17 | cdef writeOutputs(self) 18 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 19 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 20 | -------------------------------------------------------------------------------- /awlsimhw_pixtend/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_pixtend.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_pyprofibus/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_pyprofibus.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_pyprofibus/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.hardware cimport * 3 | 4 | cdef class HardwareInterface_PyProfibus(AbstractHardwareInterface): 5 | cdef public object pyprofibus 6 | cdef public object master 7 | cdef public object phy 8 | cdef public object __conf 9 | cdef public list cachedInputs 10 | cdef public object slaveList 11 | 12 | cdef readInputs(self) 13 | cdef writeOutputs(self) 14 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 15 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 16 | -------------------------------------------------------------------------------- /awlsimhw_rpigpio/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from awlsimhw_rpigpio.main import * 4 | -------------------------------------------------------------------------------- /awlsimhw_rpigpio/main.pxd.in: -------------------------------------------------------------------------------- 1 | from awlsim.common.cython_support cimport * 2 | from awlsim.core.hardware cimport * 3 | 4 | cdef class RpiGPIO_BitMapping(object): 5 | cdef public dict __bit2bcm 6 | cdef public uint8_t bitOffsets[8] 7 | cdef public list bcmNumbers 8 | cdef public uint8_t currentOutputValues[8] 9 | cdef public uint8_t size 10 | 11 | cdef class RpiGPIO_HwInterface(AbstractHardwareInterface): 12 | cdef public object __RPi_GPIO 13 | cdef public object __RPi_GPIO_input 14 | cdef public object __RPi_GPIO_output 15 | 16 | cdef public list __inputByteOffsetList 17 | cdef public list __inputBitMappingList 18 | cdef public uint32_t __inputListSize 19 | 20 | cdef public list __outputByteOffsetList 21 | cdef public list __outputBitMappingList 22 | cdef public uint32_t __outputListSize 23 | 24 | cdef readInputs(self) 25 | cdef writeOutputs(self) 26 | cdef bytearray directReadInput(self, uint32_t accessWidth, uint32_t accessOffset) 27 | cdef ExBool_t directWriteOutput(self, uint32_t accessWidth, uint32_t accessOffset, bytearray data) except ExBool_val 28 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | destdir-*/ 2 | python-awlsim*/ 3 | cython-awlsim*/ 4 | python3-awlsim*/ 5 | cython3-awlsim*/ 6 | awlsim-client/ 7 | awlsim-proupgrade/ 8 | awlsim-server/ 9 | awlsim-gui/ 10 | awlsim-symtab/ 11 | awlsim-test/ 12 | awlsim-linuxcnc-hal/ 13 | 14 | files 15 | debhelper-build-stamp 16 | *.log 17 | *.debhelper 18 | *.substvars 19 | *.html 20 | -------------------------------------------------------------------------------- /debian/awlsim-client.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-client usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-client.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-client.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-gui.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-gui usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-gui.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-gui.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-linuxcnc-hal.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-linuxcnc-hal usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-linuxcnc-hal.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-linuxcnc-hal.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-proupgrade.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-proupgrade usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-proupgrade.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-proupgrade.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-server.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-server usr/bin 2 | debian/etc_awlsim/README.md etc/awlsim 3 | awlsimhw_pyprofibus.conf etc/awlsim 4 | awlsim-server.service lib/systemd/system 5 | -------------------------------------------------------------------------------- /debian/awlsim-server.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-server.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-symtab.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-symtab usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-symtab.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-symtab.1 2 | -------------------------------------------------------------------------------- /debian/awlsim-test.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/bin/awlsim-test usr/bin 2 | -------------------------------------------------------------------------------- /debian/awlsim-test.manpages: -------------------------------------------------------------------------------- 1 | doc/man/awlsim-test.1 2 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | awlsim (0.77.1) UNRELEASED; urgency=low 2 | 3 | * Version 0.77.1 4 | 5 | -- Michael Buesch Mon, 01 Feb 2016 00:00:00 +0100 6 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: * 4 | Copyright: 2012-2016 Michael Buesch 5 | License: GPL-2+ 6 | /usr/share/common-licenses/GPL-2 7 | -------------------------------------------------------------------------------- /debian/cython3-awlsim.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/__init__.py usr/lib/python3/dist-packages/awlsim_cython 2 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/common usr/lib/python3/dist-packages/awlsim_cython 3 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/core usr/lib/python3/dist-packages/awlsim_cython 4 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/coreclient usr/lib/python3/dist-packages/awlsim_cython 5 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/coreserver usr/lib/python3/dist-packages/awlsim_cython 6 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/awlcompiler usr/lib/python3/dist-packages/awlsim_cython 7 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/awloptimizer usr/lib/python3/dist-packages/awlsim_cython 8 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/fupcompiler usr/lib/python3/dist-packages/awlsim_cython 9 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_cython/library usr/lib/python3/dist-packages/awlsim_cython 10 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_loader_cython usr/lib/python3/dist-packages 11 | -------------------------------------------------------------------------------- /debian/cython3-awlsimhw-dummy.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_dummy_cython usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/cython3-awlsimhw-linuxcnc.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_linuxcnc_cython usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/cython3-awlsimhw-pixtend.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_pixtend_cython usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/cython3-awlsimhw-profibus.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_pyprofibus_cython usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/cython3-awlsimhw-rpigpio.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_rpigpio_cython usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/etc_awlsim/README.md: -------------------------------------------------------------------------------- 1 | # /etc/awlsim 2 | 3 | This is the Awlsim working directory. 4 | 5 | The awlsim-server project and its configuration files are stored here. 6 | This is the $PWD while executing awlsim-server. 7 | 8 | -------------------------------------------------------------------------------- /debian/python3-awlsim-gui.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/gui usr/lib/python3/dist-packages/awlsim 2 | -------------------------------------------------------------------------------- /debian/python3-awlsim.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/*.py usr/lib/python3/dist-packages/awlsim 2 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/common usr/lib/python3/dist-packages/awlsim 3 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/core usr/lib/python3/dist-packages/awlsim 4 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/coreclient usr/lib/python3/dist-packages/awlsim 5 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/coreserver usr/lib/python3/dist-packages/awlsim 6 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/awlcompiler usr/lib/python3/dist-packages/awlsim 7 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/awloptimizer usr/lib/python3/dist-packages/awlsim 8 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/fupcompiler usr/lib/python3/dist-packages/awlsim 9 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim/library usr/lib/python3/dist-packages/awlsim 10 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsim_loader usr/lib/python3/dist-packages 11 | -------------------------------------------------------------------------------- /debian/python3-awlsimhw-dummy.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_dummy usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/python3-awlsimhw-linuxcnc.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_linuxcnc usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/python3-awlsimhw-pixtend.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_pixtend usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/python3-awlsimhw-profibus.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_pyprofibus usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/python3-awlsimhw-rpigpio.install: -------------------------------------------------------------------------------- 1 | debian/destdir-py3-awlsim/usr/lib/python3*/dist-packages/awlsimhw_rpigpio usr/lib/python3/dist-packages 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export LC_ALL=C.UTF-8 4 | #export DH_VERBOSE=1 5 | 6 | export PYBUILD_NAME=awlsim 7 | export PYBUILD_SYSTEM=distutils 8 | #export PYBUILD_INTERPRETERS=python{version} python{version}-dbg 9 | #export PYBUILD_VERSIONS= 10 | #export PYBUILD_DEBUG=1 11 | 12 | export PYBUILD_DESTDIR_python3=debian/destdir-py3-awlsim/ 13 | export PYBUILD_DESTDIR_python3-dbg=debian/destdir-py3-awlsim-dbg/ 14 | 15 | export PYTHONDONTWRITEBYTECODE=1 16 | export PYTHONPATH= 17 | export PYTHONSTARTUP= 18 | export PYTHONINSPECT= 19 | 20 | export AWLSIM_CYTHON_BUILD=1 21 | export AWLSIM_CYTHON_PARALLEL=1 22 | 23 | %: 24 | dh $@ --with python3 --buildsystem=pybuild 25 | 26 | override_dh_auto_test: 27 | true 28 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /doc/architecture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/architecture.dia -------------------------------------------------------------------------------- /doc/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/architecture.png -------------------------------------------------------------------------------- /doc/block-diagram.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/block-diagram.dia -------------------------------------------------------------------------------- /doc/block-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/block-diagram.png -------------------------------------------------------------------------------- /doc/compiler-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/compiler-overview.png -------------------------------------------------------------------------------- /doc/coreserver-source-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/coreserver-source-management.png -------------------------------------------------------------------------------- /doc/foreign-licenses/README: -------------------------------------------------------------------------------- 1 | This directory contains licenses of software that is _not_ part of the awlsim 2 | repository. But such software might be shipped with some binary distributions 3 | of awlsim. e.g. the frozen Windows build. So the distribution build scripts 4 | will pick the license files from here. 5 | -------------------------------------------------------------------------------- /doc/fup/fup-implicit-en-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/fup/fup-implicit-en-0.png -------------------------------------------------------------------------------- /doc/fup/fup-implicit-en-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/fup/fup-implicit-en-1.png -------------------------------------------------------------------------------- /doc/fup/fup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/fup/fup.png -------------------------------------------------------------------------------- /doc/man/awlsim-client.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-CLIENT "1" "2016" "awlsim-client" "User Commands" 2 | .SH NAME 3 | awlsim-client \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-client 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC client interface. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-gui.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-GUI "1" "2016" "awlsim-gui" "User Commands" 2 | .SH NAME 3 | awlsim-gui \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-gui 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC graphical user interface. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-linuxcnc-hal.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-LINUXCNC-HAL "1" "2016" "awlsim-linuxcnc-hal" "User Commands" 2 | .SH NAME 3 | awlsim-linuxcnc-hal \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-linuxcnc-hal 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC linuxcnc-hal. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-proupgrade.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-PROUPGRADE "1" "2016" "awlsim-proupgrade" "User Commands" 2 | .SH NAME 3 | awlsim-proupgrade \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-proupgrade 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Awlsim project file format upgrade utility. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-server.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-SERVER "1" "2016" "awlsim-server" "User Commands" 2 | .SH NAME 3 | awlsim-server \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-server 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC core server. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-symtab.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-SYMTAB "1" "2016" "awlsim-symtab" "User Commands" 2 | .SH NAME 3 | awlsim-symtab \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-symtab 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC symbol table parser. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/man/awlsim-test.1: -------------------------------------------------------------------------------- 1 | .TH AWLSIM-TEST "1" "2016" "awlsim-test" "User Commands" 2 | .SH NAME 3 | awlsim-test \- Step 7 compatible AWL/STL Soft\-PLC written in Python 4 | .SH SYNOPSIS 5 | .B awlsim-test 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | Step 7 compatible AWL/STL Soft\-PLC testing interface. 9 | .SH OPTIONS 10 | .TP 11 | \fB\-h\fR|\-\-help 12 | Print help information 13 | .SH AUTHORS 14 | Michael Buesch 15 | -------------------------------------------------------------------------------- /doc/pic/quick-start/awlsim-gui-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/pic/quick-start/awlsim-gui-000.png -------------------------------------------------------------------------------- /doc/pic/quick-start/awlsim-gui-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/pic/quick-start/awlsim-gui-001.png -------------------------------------------------------------------------------- /doc/pic/quick-start/awlsim-gui-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/pic/quick-start/awlsim-gui-002.png -------------------------------------------------------------------------------- /doc/pic/quick-start/awlsim-gui-003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/pic/quick-start/awlsim-gui-003.png -------------------------------------------------------------------------------- /doc/pic/quick-start/awlsim-gui-004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/doc/pic/quick-start/awlsim-gui-004.png -------------------------------------------------------------------------------- /examples/linuxcnc-demo/.gitignore: -------------------------------------------------------------------------------- 1 | rs274ngc.var* 2 | emc.var* 3 | -------------------------------------------------------------------------------- /examples/linuxcnc-demo/run-linuxcnc-demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | die() 4 | { 5 | echo "$*" >&2 6 | exit 1 7 | } 8 | 9 | usage() 10 | { 11 | echo "Usage: run-linuxcnc-demo.sh [/path/to/linuxcnc]" 12 | echo 13 | echo " /path/to/linuxcnc: Path to 'linuxcnc' start script" 14 | } 15 | 16 | if [ $# -ge 1 ] && [ "$1" = "-h" -o "$1" = "--help" ]; then 17 | usage 18 | exit 0 19 | fi 20 | if [ $# -eq 0 ]; then 21 | linuxcnc="linuxcnc" 22 | elif [ $# -eq 1 ]; then 23 | linuxcnc="$1" 24 | else 25 | usage 26 | exit 1 27 | fi 28 | 29 | 30 | # basedir = directory where this script lives in 31 | basedir="$(dirname "$0")" 32 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 33 | 34 | # rootdir = root of the awlsim repository 35 | rootdir="$basedir/../.." 36 | 37 | [ -x "$rootdir/awlsim-linuxcnc-hal" ] || die "awlsim-linuxcnc-hal not found" 38 | 39 | cleanup() 40 | { 41 | rm -f "/tmp/linuxcnc-demo.ngc" 42 | } 43 | 44 | cleanup 45 | trap cleanup EXIT 46 | cp "$basedir/linuxcnc-demo.ngc" /tmp/ || die "Failed to copy linuxcnc-demo.ngc" 47 | 48 | # Start LinuxCNC 49 | ( 50 | cd "$basedir" || die "Failed to 'cd $basedir'" 51 | PATH="$rootdir/:$PATH"\ 52 | PYTHONPATH="$rootdir/:$PYTHONPATH"\ 53 | "$linuxcnc" "$basedir/linuxcnc-demo.ini" ||\ 54 | die "LinuxCNC exited with an error" 55 | ) 56 | -------------------------------------------------------------------------------- /libs/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains auxiliary libraries. One per subdirectory. 2 | Iff a library contained here is not covered by the top level COPYING.txt 3 | license, the subdirectory contains a COPYING.txt file with the license text 4 | of that particular library. 5 | -------------------------------------------------------------------------------- /libs/cython_headers/byteswap-win.h: -------------------------------------------------------------------------------- 1 | #ifndef BYTESWAP_WIN_H_ 2 | #define BYTESWAP_WIN_H_ 3 | 4 | #include 5 | 6 | static inline uint16_t bswap_16(uint16_t v) 7 | { 8 | return (v << 8) | (v >> 8); 9 | } 10 | 11 | static inline uint32_t bswap_32(uint32_t v) 12 | { 13 | return ((v << 24) & 0xFF000000u) | 14 | ((v << 8) & 0x00FF0000u) | 15 | ((v >> 8) & 0x0000FF00u) | 16 | ((v >> 24) & 0x000000FFu); 17 | } 18 | 19 | #endif /* BYTESWAP_WIN_H_ */ 20 | -------------------------------------------------------------------------------- /libs/cython_headers/endian-win.h: -------------------------------------------------------------------------------- 1 | #ifndef ENDIAN_WIN_H_ 2 | #define ENDIAN_WIN_H_ 3 | 4 | #include "byteswap-win.h" 5 | 6 | #define LITTLE_ENDIAN 1 7 | #define BIG_ENDIAN 2 8 | #define BYTE_ORDER LITTLE_ENDIAN 9 | 10 | static inline uint16_t htobe16(uint16_t v) 11 | { 12 | if (BYTE_ORDER == LITTLE_ENDIAN) 13 | return bswap_16(v); 14 | return v; 15 | } 16 | 17 | static inline uint16_t htole16(uint16_t v) 18 | { 19 | if (BYTE_ORDER == BIG_ENDIAN) 20 | return bswap_16(v); 21 | return v; 22 | } 23 | 24 | static inline uint16_t be16toh(uint16_t v) 25 | { 26 | if (BYTE_ORDER == LITTLE_ENDIAN) 27 | return bswap_16(v); 28 | return v; 29 | } 30 | 31 | static inline uint16_t le16toh(uint16_t v) 32 | { 33 | if (BYTE_ORDER == BIG_ENDIAN) 34 | return bswap_16(v); 35 | return v; 36 | } 37 | 38 | static inline uint32_t htobe32(uint32_t v) 39 | { 40 | if (BYTE_ORDER == LITTLE_ENDIAN) 41 | return bswap_32(v); 42 | return v; 43 | } 44 | 45 | static inline uint32_t htole32(uint32_t v) 46 | { 47 | if (BYTE_ORDER == BIG_ENDIAN) 48 | return bswap_32(v); 49 | return v; 50 | } 51 | 52 | static inline uint32_t be32toh(uint32_t v) 53 | { 54 | if (BYTE_ORDER == LITTLE_ENDIAN) 55 | return bswap_32(v); 56 | return v; 57 | } 58 | 59 | static inline uint32_t le32toh(uint32_t v) 60 | { 61 | if (BYTE_ORDER == BIG_ENDIAN) 62 | return bswap_32(v); 63 | return v; 64 | } 65 | 66 | #endif /* ENDIAN_WIN_H_ */ 67 | -------------------------------------------------------------------------------- /libs/linuxcnc_fake_hal/linuxcnc.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # LinuxCNC fake Python module for unit testing 4 | # 5 | # Copyright 2020 Michael Buesch 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | # 21 | 22 | from __future__ import division, absolute_import, print_function, unicode_literals 23 | 24 | 25 | STATE_ESTOP = 100 26 | 27 | class command(object): 28 | def state(self, s): 29 | assert s == STATE_ESTOP 30 | 31 | def wait_complete(self, timeout=1.0): 32 | assert timeout >= 0.0 33 | -------------------------------------------------------------------------------- /libs/pixtend/v1/ppl/ppl_v0.1.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/libs/pixtend/v1/ppl/ppl_v0.1.1.zip -------------------------------------------------------------------------------- /libs/pixtend/v1/ppl/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name='pixtendlib', 4 | version='0.1.1', 5 | description='A Python library to control the PiXtend board.', 6 | url='https://www.pixtend.de', 7 | author='Qube Solutions UG', 8 | author_email='info@pixtend.de', 9 | license='GPLv3 Open Source License', 10 | packages=['pixtendlib'], 11 | zip_safe=False, install_requires=['spidev', 'RPi.GPIO']) 12 | -------------------------------------------------------------------------------- /libs/pixtend/v2/pplv2/pplv2_v0.1.4.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/libs/pixtend/v2/pplv2/pplv2_v0.1.4.zip -------------------------------------------------------------------------------- /libs/pixtend/v2/pplv2/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name='pixtendlibv2', 4 | version='0.1.4', 5 | description='Python modules for PiXtend V2 boards.', 6 | url='https://www.pixtend.de', 7 | author='Kontron Electronics GmbH', 8 | author_email='info@pixtend.de', 9 | license='MIT License', 10 | packages=['pixtendv2core', 'pixtendv2s', 'pixtendv2l'], 11 | zip_safe=False, install_requires=['spidev', 'RPi.GPIO']) 12 | -------------------------------------------------------------------------------- /libs/pixtend/v2/pplv2/version_0_1_4.txt: -------------------------------------------------------------------------------- 1 | PPLv2 VERSION 0.1.4 -------------------------------------------------------------------------------- /libs/raspi_fake_gpio/RPi/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | -------------------------------------------------------------------------------- /libs/tiny_atexit/atexit.py: -------------------------------------------------------------------------------- 1 | __all__ = [ "register", "unregister", ] 2 | _exitfuncs = [] 3 | 4 | import sys 5 | if hasattr(sys, "atexit"): 6 | def _exitfunc(): 7 | for f, a, k in _exitfuncs: 8 | f(*a, **k) 9 | sys.atexit(_exitfunc) 10 | 11 | def register(func, *args, **kwargs): 12 | _exitfuncs.append((func, args, kwargs)) 13 | return func 14 | 15 | def unregister(func): 16 | global _exitfuncs 17 | _exitfuncs = [ (f, a, k) 18 | for f, a, k in _exitfuncs 19 | if f is not func ] 20 | -------------------------------------------------------------------------------- /libs/tiny_configparser/configparser.py: -------------------------------------------------------------------------------- 1 | class ConfigParser(object): 2 | pass 3 | 4 | class Error(Exception): 5 | pass 6 | -------------------------------------------------------------------------------- /libs/tiny_csv/csv.py: -------------------------------------------------------------------------------- 1 | QUOTE_MINIMAL = None 2 | 3 | class Dialect(object): 4 | pass 5 | 6 | def register_dialect(name, d): 7 | pass 8 | 9 | class reader(object): 10 | def __init__(self, csvfile, dialect="excel", **fmtparams): 11 | self.i = 0 12 | self.lines = [] 13 | for line in csvfile: 14 | elems = [] 15 | elem = [] 16 | inQuote = False 17 | skip = 0 18 | for i, c in enumerate(line): 19 | if skip > 0: 20 | skip -= 1 21 | continue 22 | if inQuote: 23 | if c == '"' and not line.startswith('""', i): 24 | inQuote = False 25 | elif c == '"' and line.startswith('""', i): 26 | elem.append(c) 27 | skip = 1 28 | else: 29 | elem.append(c) 30 | else: 31 | if c == '"': 32 | inQuote = True 33 | elif c == ';': 34 | elems.append("".join(elem)) 35 | elem = [] 36 | else: 37 | elem.append(c) 38 | if line: 39 | elems.append("".join(elem)) 40 | self.lines.append(elems) 41 | 42 | def __iter__(self): 43 | self.i = 0 44 | return self 45 | 46 | def __next__(self): 47 | try: 48 | line = self.lines[self.i] 49 | self.i += 1 50 | return line 51 | except IndexError: 52 | raise StopIteration 53 | -------------------------------------------------------------------------------- /libs/tiny_platform/platform.py: -------------------------------------------------------------------------------- 1 | def machine(): 2 | return "unknown" 3 | -------------------------------------------------------------------------------- /libs/tiny_struct/struct.py: -------------------------------------------------------------------------------- 1 | from ustruct import * 2 | 3 | error = ValueError 4 | 5 | class Struct(object): 6 | def __init__(self, format): 7 | self.format = format 8 | self.size = calcsize(format) 9 | 10 | def pack(self, *x): 11 | return pack(self.format, *x) 12 | 13 | def unpack(self, buffer): 14 | return unpack(self.format, buffer) 15 | 16 | def unpack_from(self, buffer, offset=0): 17 | return unpack_from(self.format, buffer, offset) 18 | -------------------------------------------------------------------------------- /libs/tiny_xml/xml/sax/saxutils.py: -------------------------------------------------------------------------------- 1 | def escape(data, entities={}): 2 | assert not entities 3 | return data.replace("&", "&").replace(">", ">").replace("<", "<") 4 | 5 | def unescape(data, entities={}): 6 | assert not entities 7 | return data.replace("<", "<").replace(">", ">").replace("&", "&") 8 | 9 | def quoteattr(data, entities={}): 10 | assert not entities 11 | data = escape(data).replace("\n", " ").replace("\r", " ").replace("\t", " ") 12 | if '"' in data: 13 | if "'" in data: 14 | return '"' + data.replace('"', """) + '"' 15 | else: 16 | return "'" + data + "'" 17 | else: 18 | return '"' + data + '"' 19 | -------------------------------------------------------------------------------- /maintenance/build-noopt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | awlsim_base="$basedir/.." 7 | 8 | set -e 9 | 10 | if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then 11 | echo "basedir sanity check failed" 12 | exit 1 13 | fi 14 | 15 | export CFLAGS="$CFLAGS -O0" 16 | exec "$awlsim_base/maintenance/build.sh" "$@" 17 | -------------------------------------------------------------------------------- /maintenance/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal ENABLEDELAYEDEXPANSION 3 | set basedir=%~dp0 4 | set awlsim_base=%basedir%\.. 5 | 6 | 7 | set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32 8 | for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f 9 | for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts 10 | 11 | 12 | cd %awlsim_base% 13 | if ERRORLEVEL 1 goto error_cd 14 | set AWLSIM_CYTHON_BUILD=1 15 | py -3 setup.py build 16 | if ERRORLEVEL 1 goto error_build 17 | 18 | 19 | echo --- 20 | echo finished 21 | pause 22 | exit /B 0 23 | 24 | 25 | :error_cd 26 | echo FAILED to cd to base directory 27 | goto error 28 | 29 | :error_build 30 | echo FAILED to build Awlsim 31 | goto error 32 | 33 | :error 34 | pause 35 | exit 1 -------------------------------------------------------------------------------- /maintenance/cython3-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | awlsim_base="$basedir/.." 7 | 8 | set -e 9 | 10 | if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then 11 | echo "basedir sanity check failed" 12 | exit 1 13 | fi 14 | 15 | cd "$awlsim_base" 16 | for path in ./build/lib.*-*-3*; do 17 | export PYTHONPATH="$path/:$PYTHONPATH" 18 | done 19 | export PYTHONPATH=".:$PYTHONPATH" 20 | export AWLSIM_CYTHON=2 21 | exec python3 "$@" 22 | -------------------------------------------------------------------------------- /maintenance/deb-dependencies-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec apt install \ 4 | build-essential \ 5 | cython3 \ 6 | devscripts \ 7 | git \ 8 | pypy3 \ 9 | pypy3-dev \ 10 | python3 \ 11 | python3-cffi \ 12 | python3-coverage \ 13 | python3-dev \ 14 | python3-pyqt5 \ 15 | python3-pyside2.qtcore \ 16 | python3-pyside2.qtgui \ 17 | python3-pyside2.qtwidgets \ 18 | python3-serial 19 | -------------------------------------------------------------------------------- /maintenance/deb-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | die() 5 | { 6 | echo "$*" >&2 7 | exit 1 8 | } 9 | 10 | install() 11 | { 12 | for i in "$@"; do 13 | if printf '%s' "$i" | grep -qe dbgsym; then 14 | continue 15 | fi 16 | if ! [ -f "$i" ]; then 17 | echo "Warning: $i does not exist. Skipping..." 18 | continue 19 | fi 20 | echo "Installing $i ..." 21 | dpkg -i "$i" || die "FAILED: dpkg -i $i" 22 | done 23 | } 24 | 25 | basedir="$1" 26 | [ -d "$basedir" ] || die "Usage: deb-install.sh PACKAGEDIR" 27 | 28 | for interp in python3 cython3 pypy; do 29 | install "$basedir"/$interp-awlsim_*_*.deb 30 | install "$basedir"/$interp-awlsimhw-*_*_*.deb 31 | if [ "$interp" = "python3" ]; then 32 | install "$basedir"/$interp-awlsim-gui_*_*.deb 33 | fi 34 | done 35 | install "$basedir"/awlsim-*_*_*.deb 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /maintenance/deb-uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | die() 5 | { 6 | echo "$*" >&2 7 | exit 1 8 | } 9 | 10 | apt-get purge $(dpkg --get-selections | grep awlsim | cut -f1) ||\ 11 | die "Failed to purge" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /maintenance/gen-doc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Generate documentation 4 | # 5 | 6 | 7 | basedir="$(dirname "$0")" 8 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 9 | 10 | srcdir="$basedir/.." 11 | 12 | 13 | die() 14 | { 15 | echo "$*" >&2 16 | exit 1 17 | } 18 | 19 | gen() 20 | { 21 | local md="$1" 22 | local docname="$(basename "$md" .md)" 23 | local dir="$(dirname "$md")" 24 | local html="$dir/$docname.html" 25 | 26 | echo "Generating $(realpath --relative-to="$srcdir" "$html") from $(realpath --relative-to="$srcdir" "$md") ..." 27 | 28 | echo "" > "$html" ||\ 29 | die "Failed to generate" 30 | python3 -c "from readme_renderer.markdown import render; print(render(open('$md', 'r').read()))" >> "$html" ||\ 31 | die "Failed to generate" 32 | echo "" >> "$html" ||\ 33 | die "Failed to generate" 34 | } 35 | 36 | for i in $(find "$srcdir" \( -name submodules -prune \) -o \( -name '*.md' -print \)); do 37 | gen "$i" 38 | done 39 | 40 | exit 0 41 | -------------------------------------------------------------------------------- /maintenance/metrics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | [ $# -ge 1 ] || { 7 | echo "Usage: $0 [CLOC-OPTS] DIRECTORY" >&2 8 | exit 1 9 | } 10 | 11 | set -e 12 | 13 | cd "$basedir/.." 14 | 15 | cloc --exclude-dir="build,dist,.pybuild,release-archives,icons,__pycache__,submodules,awlsim_cython,pyprofibus" \ 16 | --read-lang-def="${basedir}/../misc/cloc-lang.txt" \ 17 | --exclude-lang='ASP.Net,IDL,D' \ 18 | --quiet --progress-rate=0 \ 19 | "$@" 20 | -------------------------------------------------------------------------------- /maintenance/micropython-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | awlsim_base="$basedir/.." 7 | 8 | set -e 9 | 10 | if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then 11 | echo "basedir sanity check failed" 12 | exit 1 13 | fi 14 | 15 | cd "$awlsim_base" 16 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_atexit" 17 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_configparser" 18 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_csv" 19 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_datetime" 20 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_platform" 21 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_struct" 22 | export MICROPYPATH="$MICROPYPATH:$awlsim_base/libs/tiny_xml" 23 | export MICROPYPATH="$MICROPYPATH:$HOME/.micropython/lib" 24 | exec micropython -X heapsize=512M "$@" 25 | -------------------------------------------------------------------------------- /maintenance/proupgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | awlsim_base="$basedir/.." 7 | 8 | set -e 9 | 10 | if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then 11 | echo "basedir sanity check failed" 12 | exit 1 13 | fi 14 | 15 | cd "$awlsim_base" 16 | find . -name '*.awlpro' \ 17 | -a -type f \ 18 | -a \! -path '*/tests/*legacy/*' \ 19 | -a \! -path '*/submodules/*' \ 20 | -a \! -path '*/.*/*' \ 21 | -exec ./awlsim-proupgrade --loglevel 3 '{}' \; 22 | -------------------------------------------------------------------------------- /maintenance/update-submodules: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | basedir="$(dirname "$0")" 4 | [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir" 5 | 6 | 7 | die() 8 | { 9 | echo "$*" >&2 10 | exit 1 11 | } 12 | 13 | echo "Updating git submodules..." 14 | cd "$basedir/.." || die "Failed to cd to basedir" 15 | git submodule update --init --recursive || die "git submodule update failed" 16 | 17 | exit 0 18 | -------------------------------------------------------------------------------- /maintenance/win-install-dependencies.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal ENABLEDELAYEDEXPANSION 3 | 4 | 5 | set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32 6 | for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f 7 | for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts 8 | 9 | 10 | call :install pip 11 | if ERRORLEVEL 1 exit /B 1 12 | call :install setuptools 13 | if ERRORLEVEL 1 exit /B 1 14 | call :install wheel 15 | if ERRORLEVEL 1 exit /B 1 16 | call :install pywin32 17 | if ERRORLEVEL 1 exit /B 1 18 | call :install Cython 19 | if ERRORLEVEL 1 exit /B 1 20 | call :install PyQt5_sip 21 | if ERRORLEVEL 1 exit /B 1 22 | call :install PyQt5 23 | if ERRORLEVEL 1 exit /B 1 24 | call :install cx_Freeze 25 | if ERRORLEVEL 1 exit /B 1 26 | call :install readme_renderer 27 | if ERRORLEVEL 1 exit /B 1 28 | call :install readme_renderer[md] 29 | if ERRORLEVEL 1 exit /B 1 30 | 31 | echo --- 32 | echo finished successfully 33 | pause 34 | exit /B 0 35 | 36 | 37 | :install 38 | echo Installing %1 ... 39 | python -m pip install --upgrade %1 40 | if ERRORLEVEL 1 ( 41 | echo FAILED to install %1 42 | pause 43 | exit /B 1 44 | ) 45 | exit /B 0 46 | -------------------------------------------------------------------------------- /misc/cloc-lang.txt: -------------------------------------------------------------------------------- 1 | AWL/STL source 2 | filter remove_matches ^\s*// 3 | extension awl 4 | extension AWL 5 | 3rd_gen_scale 1.0 6 | 7 | Awlsim project 8 | filter remove_matches ^$ 9 | extension awlpro 10 | extension AWLPRO 11 | 3rd_gen_scale 1.0 12 | -------------------------------------------------------------------------------- /progs/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains auxiliary programs. One per subdirectory. 2 | The software packages in these subdirectories are *not* covered by the 3 | top level COPYING.txt. 4 | See the content of each individual subdirectory for licensing information. 5 | -------------------------------------------------------------------------------- /progs/putty/0.81/putty-src.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/progs/putty/0.81/putty-src.zip -------------------------------------------------------------------------------- /progs/putty/0.81/putty-src.zip.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/progs/putty/0.81/putty-src.zip.gpg -------------------------------------------------------------------------------- /progs/putty/0.81/putty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/progs/putty/0.81/putty.zip -------------------------------------------------------------------------------- /progs/putty/0.81/putty.zip.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/progs/putty/0.81/putty.zip.gpg -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | 3 | __init__.py 4 | !*.gsd 5 | -------------------------------------------------------------------------------- /tests/COPYING.txt: -------------------------------------------------------------------------------- 1 | All awlsim unit-tests are covered by the following license conditions: 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | -------------------------------------------------------------------------------- /tests/awlsim_tstlib.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | 3 | from unittest import TestCase 4 | 5 | __all__ = [ 6 | "TestCase", 7 | "initTest", 8 | ] 9 | 10 | def initTest(testCaseFile): 11 | from os.path import basename 12 | print("(test case file: %s)" % basename(testCaseFile)) 13 | 14 | # Run code coverage metrics, if enabled. 15 | import awlsim_loader.coverage_helper 16 | -------------------------------------------------------------------------------- /tests/sh-test.defaults: -------------------------------------------------------------------------------- 1 | sh_test() 2 | { 3 | true 4 | } 5 | -------------------------------------------------------------------------------- /tests/tc000_base/EXAMPLE.awlpro: -------------------------------------------------------------------------------- 1 | ../../examples/EXAMPLE.awlpro -------------------------------------------------------------------------------- /tests/tc000_base/EXAMPLE.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=3 2 | -------------------------------------------------------------------------------- /tests/tc000_base/empty.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc000_base/empty.awl -------------------------------------------------------------------------------- /tests/tc000_base/empty.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc000_base/labels.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim_tstlib import * 3 | initTest(__file__) 4 | 5 | from awlsim.core.labels import * #+cimport 6 | 7 | 8 | class Test_AwlLabels(TestCase): 9 | def test_generateLabelName(self): 10 | self.assertRaises(ValueError, lambda: AwlLabel.generateLabelName(-1)) 11 | self.assertEqual(AwlLabel.generateLabelName(0), "AAAA") 12 | self.assertEqual(AwlLabel.generateLabelName(26**1 - 1), "AAAZ") 13 | self.assertEqual(AwlLabel.generateLabelName(26**1), "AABA") 14 | self.assertEqual(AwlLabel.generateLabelName(26**2 - 1), "AAZZ") 15 | self.assertEqual(AwlLabel.generateLabelName(26**2), "ABAA") 16 | self.assertEqual(AwlLabel.generateLabelName(26**3 - 1), "AZZZ") 17 | self.assertEqual(AwlLabel.generateLabelName(26**3), "BAAA") 18 | self.assertEqual(AwlLabel.generateLabelName(26**4 - 1), "ZZZZ") 19 | self.assertRaises(ValueError, lambda: AwlLabel.generateLabelName(26**4)) 20 | -------------------------------------------------------------------------------- /tests/tc000_base/latin1.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc000_base/latin1.awl -------------------------------------------------------------------------------- /tests/tc000_base/lpfilter.py: -------------------------------------------------------------------------------- 1 | from __future__ import division, absolute_import, print_function, unicode_literals 2 | from awlsim_tstlib import * 3 | initTest(__file__) 4 | 5 | from awlsim.common.lpfilter import * #+cimport 6 | from awlsim.common.exceptions import * 7 | 8 | 9 | class Test_LPFilter(TestCase): 10 | def test_case_0(self): 11 | f = LPFilter(4) 12 | for i in range(10): 13 | self.assertEqual(f.run(0.0), 0.0) 14 | 15 | def test_case_1(self): 16 | f = LPFilter(1) 17 | self.assertAlmostEqual(f.run(10.0), 10.0, places=3) 18 | self.assertAlmostEqual(f.run(10.0), 10.0, places=3) 19 | self.assertAlmostEqual(f.run(20.0), 20.0, places=3) 20 | self.assertAlmostEqual(f.run(20.0), 20.0, places=3) 21 | self.assertAlmostEqual(f.run(30.0), 30.0, places=3) 22 | self.assertAlmostEqual(f.run(30.0), 30.0, places=3) 23 | self.assertAlmostEqual(f.run(-10.0), -10.0, places=3) 24 | self.assertAlmostEqual(f.run(-10.0), -10.0, places=3) 25 | 26 | def test_case_2(self): 27 | f = LPFilter(2) 28 | self.assertAlmostEqual(f.run(10.0), 5.0000, places=3) 29 | self.assertAlmostEqual(f.run(10.0), 7.5000, places=3) 30 | self.assertAlmostEqual(f.run(10.0), 8.7500, places=3) 31 | self.assertAlmostEqual(f.run(10.0), 9.3750, places=3) 32 | self.assertAlmostEqual(f.run(10.0), 9.6875, places=3) 33 | 34 | def test_case_3(self): 35 | f = LPFilter(4) 36 | for i in range(100): 37 | r = f.run(8.0) 38 | if i == 0: 39 | self.assertAlmostEqual(r, 2.0, places=3) 40 | if i == 99: 41 | self.assertAlmostEqual(r, 8.0, places=3) 42 | -------------------------------------------------------------------------------- /tests/tc000_base/minimal.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | CALL SFC 46 // STOP CPU 4 | END_ORGANIZATION_BLOCK 5 | -------------------------------------------------------------------------------- /tests/tc000_base/shutdown.awl: -------------------------------------------------------------------------------- 1 | U E 0.0 2 | = A 0.0 3 | 4 | // Exit the simulator process 5 | CALL SFC -3 ( 6 | SHUTDOWN_TYPE := 1 7 | ) 8 | // Here be dragons 9 | __ASSERT== 1, 2 10 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_ARITH_PL.awl: -------------------------------------------------------------------------------- 1 | __STWRST 2 | L 10 3 | + 20 4 | __ASSERT== __ACCU 1, 30 5 | __ASSERT== __STW A0, 0 6 | __ASSERT== __STW A1, 0 7 | __ASSERT== __STW OV, 0 8 | __ASSERT== __STW OS, 0 9 | 10 | 11 | __STWRST 12 | L W#16#FFFF 13 | + 20 14 | __ASSERT== __ACCU 1, 19 15 | __ASSERT== __STW A0, 0 16 | __ASSERT== __STW A1, 0 17 | __ASSERT== __STW OV, 0 18 | __ASSERT== __STW OS, 0 19 | 20 | 21 | __STWRST 22 | L W#16#FFFF 23 | + L#20 24 | __ASSERT== __ACCU 1, DW#16#00010013 25 | __ASSERT== __STW A0, 0 26 | __ASSERT== __STW A1, 0 27 | __ASSERT== __STW OV, 0 28 | __ASSERT== __STW OS, 0 29 | 30 | 31 | __STWRST 32 | L 10 33 | + -1 34 | __ASSERT== __ACCU 1, 9 35 | __ASSERT== __STW A0, 0 36 | __ASSERT== __STW A1, 0 37 | __ASSERT== __STW OV, 0 38 | __ASSERT== __STW OS, 0 39 | 40 | 41 | __STWRST 42 | L 10 43 | + L#-1 44 | __ASSERT== __ACCU 1, 9 45 | __ASSERT== __STW A0, 0 46 | __ASSERT== __STW A1, 0 47 | __ASSERT== __STW OV, 0 48 | __ASSERT== __STW OS, 0 49 | 50 | 51 | __STWRST 52 | L 10 53 | + -20 54 | __ASSERT== __ACCU 1, DW#16#0000FFF6 55 | __ASSERT== __STW A0, 0 56 | __ASSERT== __STW A1, 0 57 | __ASSERT== __STW OV, 0 58 | __ASSERT== __STW OS, 0 59 | 60 | 61 | __STWRST 62 | L 10 63 | + L#-20 64 | __ASSERT== __ACCU 1, DW#16#FFFFFFF6 65 | __ASSERT== __STW A0, 0 66 | __ASSERT== __STW A1, 0 67 | __ASSERT== __STW OV, 0 68 | __ASSERT== __STW OS, 0 69 | 70 | 71 | CALL SFC 46 // STOP CPU 72 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_CALL.awl.conf: -------------------------------------------------------------------------------- 1 | loglevel=1 2 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_EDGE.awl: -------------------------------------------------------------------------------- 1 | CLR 2 | = M 0.0 3 | __STWRST 4 | __ASSERT== M 0.0, 0 5 | CLR 6 | FP M 0.0 7 | __ASSERT== __STW VKE, 0 8 | __ASSERT== M 0.0, 0 9 | CLR 10 | FP M 0.0 11 | __ASSERT== __STW VKE, 0 12 | __ASSERT== M 0.0, 0 13 | SET 14 | FP M 0.0 15 | __ASSERT== __STW VKE, 1 16 | __ASSERT== M 0.0, 1 17 | SET 18 | FP M 0.0 19 | __ASSERT== __STW VKE, 0 20 | __ASSERT== M 0.0, 1 21 | CLR 22 | FP M 0.0 23 | __ASSERT== __STW VKE, 0 24 | __ASSERT== M 0.0, 0 25 | SET 26 | FP M 0.0 27 | __ASSERT== __STW VKE, 1 28 | __ASSERT== M 0.0, 1 29 | SET 30 | FP M 0.0 31 | __ASSERT== __STW VKE, 0 32 | __ASSERT== M 0.0, 1 33 | 34 | 35 | CLR 36 | = M 0.0 37 | __STWRST 38 | __ASSERT== M 0.0, 0 39 | SET 40 | FN M 0.0 41 | __ASSERT== __STW VKE, 0 42 | __ASSERT== M 0.0, 1 43 | SET 44 | FN M 0.0 45 | __ASSERT== __STW VKE, 0 46 | __ASSERT== M 0.0, 1 47 | CLR 48 | FN M 0.0 49 | __ASSERT== __STW VKE, 1 50 | __ASSERT== M 0.0, 0 51 | CLR 52 | FN M 0.0 53 | __ASSERT== __STW VKE, 0 54 | __ASSERT== M 0.0, 0 55 | SET 56 | FN M 0.0 57 | __ASSERT== __STW VKE, 0 58 | __ASSERT== M 0.0, 1 59 | CLR 60 | FN M 0.0 61 | __ASSERT== __STW VKE, 1 62 | __ASSERT== M 0.0, 0 63 | CLR 64 | FN M 0.0 65 | __ASSERT== __STW VKE, 0 66 | __ASSERT== M 0.0, 0 67 | 68 | 69 | CALL SFC 46 // STOP CPU 70 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_INC.awl: -------------------------------------------------------------------------------- 1 | L 0 2 | INC 1 3 | __ASSERT== __ACCU 1, 1 4 | 5 | L 1 6 | INC 0 7 | __ASSERT== __ACCU 1, 1 8 | 9 | L 1 10 | INC 1 11 | __ASSERT== __ACCU 1, 2 12 | 13 | L 0 14 | INC 255 15 | __ASSERT== __ACCU 1, 255 16 | 17 | L 1 18 | INC 255 19 | __ASSERT== __ACCU 1, 0 20 | 21 | L 2 22 | INC 255 23 | __ASSERT== __ACCU 1, 1 24 | 25 | L DW#16#00000100 26 | INC 255 27 | __ASSERT== __ACCU 1, DW#16#000001FF 28 | 29 | L DW#16#000001FF 30 | INC 255 31 | __ASSERT== __ACCU 1, DW#16#000001FE 32 | 33 | L 0 34 | DEC 1 35 | __ASSERT== __ACCU 1, 255 36 | 37 | L 1 38 | DEC 0 39 | __ASSERT== __ACCU 1, 1 40 | 41 | L 1 42 | DEC 1 43 | __ASSERT== __ACCU 1, 0 44 | 45 | L 0 46 | DEC 255 47 | __ASSERT== __ACCU 1, 1 48 | 49 | L 1 50 | DEC 255 51 | __ASSERT== __ACCU 1, 2 52 | 53 | L 2 54 | DEC 255 55 | __ASSERT== __ACCU 1, 3 56 | 57 | L DW#16#00000100 58 | DEC 255 59 | __ASSERT== __ACCU 1, DW#16#00000101 60 | 61 | L DW#16#000001FF 62 | DEC 255 63 | __ASSERT== __ACCU 1, DW#16#00000100 64 | 65 | 66 | CALL SFC 46 // STOP CPU 67 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_ITD.awl: -------------------------------------------------------------------------------- 1 | L W#16#1234 2 | __ASSERT== __ACCU 1, DW#16#00001234 3 | ITD 4 | __ASSERT== __ACCU 1, DW#16#00001234 5 | L W#16#F234 6 | __ASSERT== __ACCU 1, DW#16#0000F234 7 | ITD 8 | __ASSERT== __ACCU 1, DW#16#FFFFF234 9 | 10 | 11 | CALL SFC 46 // STOP CPU 12 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_MCR.awl: -------------------------------------------------------------------------------- 1 | __STWRST 2 | MCRA 3 | SET 4 | MCR( 5 | SET 6 | MCR( 7 | SET 8 | = A 0.0 9 | )MCR 10 | )MCR 11 | MCRD 12 | __ASSERT== A 0.0, 1 13 | 14 | 15 | __STWRST 16 | MCRA 17 | CLR 18 | MCR( 19 | SET 20 | MCR( 21 | SET 22 | = A 0.0 23 | )MCR 24 | )MCR 25 | MCRD 26 | __ASSERT== A 0.0, 0 27 | 28 | 29 | __STWRST 30 | MCRD 31 | CLR 32 | MCR( 33 | SET 34 | = A 0.0 35 | )MCR 36 | __ASSERT== A 0.0, 1 37 | 38 | 39 | __STWRST 40 | SET 41 | = A 0.0 42 | __ASSERT== A 0.0, 1 43 | MCRA 44 | CLR 45 | MCR( 46 | SET 47 | R A 0.0 48 | )MCR 49 | MCRD 50 | __ASSERT== A 0.0, 1 51 | 52 | 53 | __STWRST 54 | CLR 55 | = A 0.0 56 | __ASSERT== A 0.0, 0 57 | MCRA 58 | CLR 59 | MCR( 60 | SET 61 | S A 0.0 62 | )MCR 63 | MCRD 64 | __ASSERT== A 0.0, 0 65 | 66 | 67 | __STWRST 68 | L 1 69 | MCRA 70 | CLR 71 | MCR( 72 | T MD 0 73 | )MCR 74 | MCRD 75 | __ASSERT== MD 0, 0 76 | 77 | 78 | CALL SFC 46 // STOP CPU 79 | -------------------------------------------------------------------------------- /tests/tc100_instructions/insn_TAK.awl: -------------------------------------------------------------------------------- 1 | L DW#16#01234567 2 | L DW#16#09ABCDEF 3 | __ASSERT== __ACCU 1, DW#16#09ABCDEF 4 | __ASSERT== __ACCU 2, DW#16#01234567 5 | TAK 6 | __ASSERT== __ACCU 1, DW#16#01234567 7 | __ASSERT== __ACCU 2, DW#16#09ABCDEF 8 | 9 | 10 | CALL SFC 46 // STOP CPU 11 | -------------------------------------------------------------------------------- /tests/tc150_startup/startup_OB100.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 100 2 | BEGIN 3 | L MD 0 4 | __ASSERT== __ACCU 1, 0 5 | L 100 6 | T MD 0 7 | END_ORGANIZATION_BLOCK 8 | 9 | 10 | 11 | ORGANIZATION_BLOCK OB 1 12 | BEGIN 13 | // assert 4-accus 14 | __FEATURE 0 15 | __ASSERT== __ACCU 1, 4 16 | 17 | // check that OB 100 was executed 18 | L MD 0 19 | __ASSERT== __ACCU 1, 100 20 | 21 | 22 | CALL SFC 46 // STOP CPU 23 | END_ORGANIZATION_BLOCK 24 | -------------------------------------------------------------------------------- /tests/tc150_startup/startup_OB102.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 102 2 | BEGIN 3 | L MD 0 4 | __ASSERT== __ACCU 1, 0 5 | L 102 6 | T MD 0 7 | END_ORGANIZATION_BLOCK 8 | 9 | 10 | 11 | ORGANIZATION_BLOCK OB 1 12 | BEGIN 13 | // assert 4-accus 14 | __FEATURE 0 15 | __ASSERT== __ACCU 1, 4 16 | 17 | 18 | // check that OB 102 was executed 19 | L MD 0 20 | __ASSERT== __ACCU 1, 102 21 | 22 | 23 | CALL SFC 46 // STOP CPU 24 | END_ORGANIZATION_BLOCK 25 | -------------------------------------------------------------------------------- /tests/tc150_startup/startup_multiple.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 100 2 | BEGIN 3 | L MD 0 4 | __ASSERT== __ACCU 1, 0 5 | L 100 6 | T MD 0 7 | END_ORGANIZATION_BLOCK 8 | 9 | 10 | 11 | ORGANIZATION_BLOCK OB 101 12 | BEGIN 13 | L MD 0 14 | __ASSERT== __ACCU 1, 0 15 | L 101 16 | T MD 0 17 | END_ORGANIZATION_BLOCK 18 | 19 | 20 | 21 | ORGANIZATION_BLOCK OB 102 22 | BEGIN 23 | L MD 0 24 | __ASSERT== __ACCU 1, 0 25 | L 102 26 | T MD 0 27 | END_ORGANIZATION_BLOCK 28 | 29 | 30 | 31 | ORGANIZATION_BLOCK OB 1 32 | BEGIN 33 | // assert 2-accus 34 | __FEATURE 0 35 | __ASSERT== __ACCU 1, 2 36 | 37 | 38 | // check that OB 100 was executed 39 | L MD 0 40 | __ASSERT== __ACCU 1, 100 41 | 42 | 43 | CALL SFC 46 // STOP CPU 44 | END_ORGANIZATION_BLOCK 45 | -------------------------------------------------------------------------------- /tests/tc250_symbols/symbols.asc: -------------------------------------------------------------------------------- 1 | 126,sym_M_0.0 M 0.0 BOOL 2 | 126,Data_1 DB 99 DB 99 Data block 99 3 | 126,Instance DB DB 100 FB 100 4 | 126,Function Block FB 100 FB 100 5 | 126,Function Block 2 FB 101 FB 101 6 | 126,symbolic timer T 10 TIMER 7 | 126,symbolic counter Z 10 COUNTER 8 | -------------------------------------------------------------------------------- /tests/tc250_symbols/symtab-parser-001.sh: -------------------------------------------------------------------------------- 1 | # symtab parser tests 2 | 3 | sh_test() 4 | { 5 | local interpreter="$1" 6 | local test_dir="$2" 7 | local test_name="$3" 8 | 9 | cd "$rootdir" || die "Failed to change to rootdir '$rootdir'" 10 | 11 | local test_file="${test_dir}/${test_name}.asc" 12 | 13 | "$interpreter" ./awlsim-symtab -I auto -O asc \ 14 | "$test_file" - >/dev/null ||\ 15 | test_failed "$(basename "$test_file") test failed" 16 | } 17 | -------------------------------------------------------------------------------- /tests/tc250_symbols/symtab-parser-002.sh: -------------------------------------------------------------------------------- 1 | # symtab parser tests 2 | 3 | sh_test() 4 | { 5 | local interpreter="$1" 6 | local test_dir="$2" 7 | local test_name="$3" 8 | 9 | cd "$rootdir" || die "Failed to change to rootdir '$rootdir'" 10 | 11 | local test_file="${test_dir}/${test_name}.csv" 12 | 13 | "$interpreter" ./awlsim-symtab -I auto -O asc \ 14 | "$test_file" - >/dev/null ||\ 15 | test_failed "$(basename "$test_file") test failed" 16 | } 17 | -------------------------------------------------------------------------------- /tests/tc300_cpu/big-blocknum.awl: -------------------------------------------------------------------------------- 1 | TYPE UDT 65535 2 | STRUCT 3 | VAR_INT : INT := 42; 4 | END_STRUCT; 5 | END_TYPE 6 | 7 | 8 | FUNCTION FC 65535 : UDT 65535 9 | BEGIN 10 | NOP 0 11 | BE 12 | END_FUNCTION 13 | 14 | 15 | FUNCTION_BLOCK FB 65535 16 | BEGIN 17 | NOP 0 18 | BE 19 | END_FUNCTION_BLOCK 20 | 21 | 22 | DATA_BLOCK DB 65535 23 | FB 65535 24 | BEGIN 25 | END_DATA_BLOCK 26 | 27 | 28 | ORGANIZATION_BLOCK OB 1 29 | VAR_TEMP 30 | RETVAL : UDT 65535; 31 | END_VAR; 32 | BEGIN 33 | CALL FC 65535 ( RET_VAL := #RETVAL ) 34 | CALL FB 65535, DB 65535 35 | 36 | CALL SFC 46 // STOP CPU 37 | END_ORGANIZATION_BLOCK 38 | -------------------------------------------------------------------------------- /tests/tc300_cpu/clockmem.awlpro.conf: -------------------------------------------------------------------------------- 1 | tries=9 2 | -------------------------------------------------------------------------------- /tests/tc300_cpu/infinite-recursion.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | CALL FC 1 4 | END_ORGANIZATION_BLOCK 5 | 6 | FUNCTION FC 1 : VOID 7 | BEGIN 8 | CALL FC 1 9 | END_FUNCTION 10 | -------------------------------------------------------------------------------- /tests/tc300_cpu/infinite-recursion.awl.conf: -------------------------------------------------------------------------------- 1 | cycle_limit=1 2 | exit_code=30 3 | -------------------------------------------------------------------------------- /tests/tc400_convenience/convenience_de.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | // Test parsing of convenience operators. 4 | // Convenience operators are certain operators with missing white space. 5 | 6 | AUF DB1 7 | AUF DI1 8 | 9 | SET 10 | = E0.1 11 | = A0.1 12 | = M0.1 13 | = L0.1 14 | = DBX0.0 15 | = DIX0.0 16 | 17 | L 100 18 | T EB0 19 | T EW0 20 | T ED0 21 | T AB0 22 | T AW0 23 | T AD0 24 | T LB0 25 | T LW0 26 | T LD0 27 | T MB0 28 | T MW0 29 | T MD0 30 | T DBB0 31 | T DBW0 32 | T DBD0 33 | T DIB0 34 | T DIW0 35 | T DID0 36 | 37 | U T0 38 | = M0.0 39 | U Z0 40 | = M0.0 41 | 42 | L P#E0.1 43 | L P#A0.1 44 | L P#M0.1 45 | L P#L0.1 46 | L P#P0.1 47 | L P#DBX0.0 48 | L P#DIX0.0 49 | 50 | 51 | CALL SFC 46 // STOP CPU 52 | END_ORGANIZATION_BLOCK 53 | 54 | 55 | DATA_BLOCK DB 1 56 | STRUCT 57 | VARIABLE : DWORD; 58 | END_STRUCT; 59 | BEGIN 60 | VARIABLE := DW#16#1; 61 | END_DATA_BLOCK 62 | -------------------------------------------------------------------------------- /tests/tc400_convenience/convenience_en.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | // Test parsing of convenience operators. 4 | // Convenience operators are certain operators with missing white space. 5 | 6 | OPN DB1 7 | OPN DI1 8 | 9 | SET 10 | = I0.1 11 | = Q0.1 12 | = M0.1 13 | = L0.1 14 | = DBX0.0 15 | = DIX0.0 16 | 17 | L 100 18 | T IB0 19 | T IW0 20 | T ID0 21 | T QB0 22 | T QW0 23 | T QD0 24 | T LB0 25 | T LW0 26 | T LD0 27 | T MB0 28 | T MW0 29 | T MD0 30 | T DBB0 31 | T DBW0 32 | T DBD0 33 | T DIB0 34 | T DIW0 35 | T DID0 36 | 37 | A T0 38 | = M0.0 39 | A C0 40 | = M0.0 41 | 42 | L P#I0.1 43 | L P#Q0.1 44 | L P#M0.1 45 | L P#L0.1 46 | L P#P0.1 47 | L P#DBX0.0 48 | L P#DIX0.0 49 | 50 | 51 | CALL SFC 46 // STOP CPU 52 | END_ORGANIZATION_BLOCK 53 | 54 | 55 | DATA_BLOCK DB 1 56 | STRUCT 57 | VARIABLE : DWORD; 58 | END_STRUCT; 59 | BEGIN 60 | VARIABLE := DW#16#1; 61 | END_DATA_BLOCK 62 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfb/basic.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | CALL SFB -1, DB 1 4 | __ASSERT== __STW BIE, 1 5 | 6 | 7 | CALL SFC 46 // STOP CPU 8 | END_ORGANIZATION_BLOCK 9 | 10 | 11 | DATA_BLOCK DB 1 12 | SFB -1 13 | BEGIN 14 | END_DATA_BLOCK 15 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfb/sfb3.awl.conf: -------------------------------------------------------------------------------- 1 | tries=3 2 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfb/sfb4.awl.conf: -------------------------------------------------------------------------------- 1 | tries=3 2 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfb/sfb5.awl.conf: -------------------------------------------------------------------------------- 1 | tries=3 2 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfc/basic.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | // Test SFC -1 "__SFC_NOP" 4 | CALL SFC -1 5 | __ASSERT== __STW BIE, 1 6 | 7 | 8 | CALL SFC 46 // STOP CPU 9 | END_ORGANIZATION_BLOCK 10 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfc/sfc47.awl.conf: -------------------------------------------------------------------------------- 1 | tries=3 2 | -------------------------------------------------------------------------------- /tests/tc500_systemblocks/sfc/sfc64.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | // Test SFC 64: TIME_TCK 4 | CALL SFC 64 ( 5 | RET_VAL := MD 0 6 | ) 7 | __ASSERT== __STW BIE, 1 8 | __SLEEP 100 9 | CALL SFC 64 ( 10 | RET_VAL := MD 4 11 | ) 12 | __ASSERT== __STW BIE, 1 13 | L MD 4 14 | L MD 0 15 | -D 16 | UD DW#16#7FFFFFFF 17 | __ASSERT> __ACCU 1, 50 18 | __ASSERT< __ACCU 1, 500 19 | 20 | 21 | CALL SFC 46 // STOP CPU 22 | END_ORGANIZATION_BLOCK 23 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-arithmetic.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-boolean.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-compare.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-conv.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-count.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-empty.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-inlineawl.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-movebox.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc600_fup/fup-shift.awlpro.conf: -------------------------------------------------------------------------------- 1 | optimizer_runs=off all 2 | -------------------------------------------------------------------------------- /tests/tc700_hardware/linuxcnc/linuxcnc.hal: -------------------------------------------------------------------------------- 1 | setp awlsim.input.bit.0.0.active 1 2 | setp awlsim.input.u8.1.active 1 3 | setp awlsim.input.u16.2.active 1 4 | setp awlsim.input.s16.4.active 1 5 | setp awlsim.input.u31.6.active 1 6 | setp awlsim.input.s32.10.active 1 7 | setp awlsim.input.float.14.active 1 8 | 9 | setp awlsim.output.bit.50.0.active 1 10 | setp awlsim.output.u8.51.active 1 11 | setp awlsim.output.u16.52.active 1 12 | setp awlsim.output.s16.54.active 1 13 | setp awlsim.output.u31.56.active 1 14 | setp awlsim.output.s32.60.active 1 15 | setp awlsim.output.float.64.active 1 16 | 17 | net sig-0 awlsim.output.bit.50.0 <= awlsim.input.bit.0.0 18 | net sig-1 awlsim.output.u8.51 <= awlsim.input.u8.1 19 | net sig-2 awlsim.output.u16.52 <= awlsim.input.u16.2 20 | net sig-3 awlsim.output.s16.54 <= awlsim.input.s16.4 21 | net sig-4 awlsim.output.u31.56 <= awlsim.input.u31.6 22 | net sig-5 awlsim.output.s32.60 <= awlsim.input.s32.10 23 | net sig-6 awlsim.output.float.64 <= awlsim.input.float.14 24 | 25 | 26 | setp awlsim.config.ready 1 27 | -------------------------------------------------------------------------------- /tests/tc700_hardware/linuxcnc/linuxcnc.sh: -------------------------------------------------------------------------------- 1 | # LinuxCNC hardware module test 2 | 3 | __run_awlsim_linuxcnc_hal() 4 | { 5 | local interpreter="$1" 6 | local test_dir="$2" 7 | local awl_file="$3" 8 | shift 3 9 | 10 | export EXTRA_PYTHONPATH="$rootdir/libs/linuxcnc_fake_hal" 11 | setup_test_environment "$interpreter" "$awl_file" "${awl_file}.linuxcnc" 12 | local interpreter="$RET" 13 | 14 | FAKEHAL_HALFILE="${test_dir}/linuxcnc.hal" \ 15 | "$interpreter" ./awlsim-linuxcnc-hal \ 16 | --input-base 0 --input-size 32 \ 17 | --output-base 50 --output-size 32 \ 18 | --watchdog off --extended-insns \ 19 | --listen localhost:$(get_port) \ 20 | "$@" \ 21 | "$awl_file" >/dev/null ||\ 22 | test_failed "LinuxCNC test '$(basename "$awl_file")' failed" 23 | 24 | cleanup_test_environment 25 | } 26 | 27 | sh_test() 28 | { 29 | local interpreter="$1" 30 | local test_dir="$2" 31 | local test_name="$3" 32 | 33 | cd "$rootdir" || die "Failed to change to rootdir '$rootdir'" 34 | 35 | infomsg 36 | for testfile in "tc000_base/empty.awl"\ 37 | "tc000_base/shutdown.awl"\ 38 | "tc000_base/EXAMPLE.awlpro"; do 39 | infomsg " Running linuxcnc test with: $testfile" 40 | 41 | __run_awlsim_linuxcnc_hal "$interpreter" "$test_dir" \ 42 | "$rootdir/tests/$testfile" \ 43 | --max-runtime 1.0 44 | done 45 | 46 | infomsg " Running I/O test" 47 | __run_awlsim_linuxcnc_hal "$interpreter" "$test_dir" \ 48 | "$test_dir/linuxcnc-iotest.awl__" 49 | } 50 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend-musicplayer.awlpro: -------------------------------------------------------------------------------- 1 | ../../../examples/raspberrypi-pixtend-musicplayer.awlpro -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend-musicplayer.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v1/fake_spidev:libs/pixtend/v1/ppl 2 | max_runtime=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend.awlpro: -------------------------------------------------------------------------------- 1 | ../../../examples/raspberrypi-pixtend.awlpro -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v1/fake_spidev:libs/pixtend/v1/ppl 2 | max_runtime=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend2-musicplayer.awlpro: -------------------------------------------------------------------------------- 1 | ../../../examples/raspberrypi-pixtend-musicplayer.awlpro -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend2-musicplayer.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v2/fake_spidev:libs/pixtend/v2/pplv2 2 | max_runtime=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend2.awlpro: -------------------------------------------------------------------------------- 1 | ../../../examples/raspberrypi-pixtend.awlpro -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/example-project-pixtend2.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v2/fake_spidev:libs/pixtend/v2/pplv2 2 | max_runtime=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/pixtend-iotest.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v1/fake_spidev:libs/pixtend/v1/ppl 2 | env=PIXTEND_IOTEST=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/pixtend-peripheral-io.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v1/fake_spidev:libs/pixtend/v1/ppl 2 | env=PIXTEND_PERIPHERALIOTEST=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/pixtend2-iotest.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v2/fake_spidev:libs/pixtend/v2/pplv2 2 | env=PIXTEND_IOTEST=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/pixtend2-peripheral-io.awlpro: -------------------------------------------------------------------------------- 1 | pixtend-peripheral-io.awlpro -------------------------------------------------------------------------------- /tests/tc700_hardware/pixtend/pixtend2-peripheral-io.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs:libs/raspi_fake_gpio:libs/pixtend/v2/fake_spidev:libs/pixtend/v2/pplv2 2 | env=PIXTEND_PERIPHERALIOTEST=1 3 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pyprofibus/pyprofibus.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 100 2 | BEGIN 3 | L 0 4 | T MW 0 5 | T AB 8 6 | END_ORGANIZATION_BLOCK 7 | 8 | 9 | ORGANIZATION_BLOCK OB 1 10 | BEGIN 11 | L MW 0 12 | L W#16#1000 13 | ==I 14 | SPB STOP 15 | 16 | L MB 1 17 | L W#16#FF 18 | <>I 19 | SPB END 20 | 21 | 22 | L EB 8 23 | L AB 8 24 | XOW W#16#FF 25 | __ASSERT== __ACCU 1, __ACCU 2 26 | 27 | 28 | END: L MW 0 29 | + 1 30 | T MW 0 31 | 32 | L MB 0 33 | T AB 8 34 | BEA 35 | 36 | STOP: CALL SFC 46 // STOP CPU 37 | 38 | END_ORGANIZATION_BLOCK 39 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pyprofibus/pyprofibus.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=submodules/pyprofibus 2 | -------------------------------------------------------------------------------- /tests/tc700_hardware/pyprofibus/pyprofibus.conf: -------------------------------------------------------------------------------- 1 | [PROFIBUS] 2 | debug=0 3 | 4 | 5 | [PHY] 6 | type=dummy_slave 7 | baud=19200 8 | 9 | 10 | [FDL] 11 | 12 | 13 | [DP] 14 | master_class=1 15 | master_addr=2 16 | 17 | 18 | ; First slave configuration 19 | [SLAVE_0] 20 | addr=8 21 | gsd=tests/tc700_hardware/pyprofibus/pyprofibus.gsd 22 | sync_mode=1 23 | freeze_mode=1 24 | group_mask=1 25 | watchdog_ms=300 26 | module_0=dummy output module 27 | module_1=dummy input module 28 | output_size=1 29 | input_size=1 30 | -------------------------------------------------------------------------------- /tests/tc700_hardware/raspberrypi/rpigpio.awlpro.conf: -------------------------------------------------------------------------------- 1 | PYTHONPATH=libs/raspi_fake_gpio 2 | -------------------------------------------------------------------------------- /tests/tc800_coreserver/coreserver-cli.sh: -------------------------------------------------------------------------------- 1 | # awlsim-test with coreserver tests 2 | 3 | sh_test() 4 | { 5 | local interpreter="$1" 6 | 7 | infomsg 8 | infomsg "--- Running coreserver tests" 9 | cd "$rootdir" || die "Failed to change to rootdir '$rootdir'" 10 | 11 | for testfile in tc000_base/shutdown.awl \ 12 | tc000_base/EXAMPLE.awlpro; do 13 | run_test "$interpreter" "$basedir/$testfile" \ 14 | --spawn-backend --interpreter "$interpreter" \ 15 | --connect-to localhost:$(get_port) 16 | done 17 | 18 | infomsg "----- Testing MemoryArea accesses" 19 | run_test "$interpreter" "$basedir/tc000_base/EXAMPLE.awlpro" \ 20 | --spawn-backend --interpreter "$interpreter" \ 21 | --connect-to localhost:$(get_port) \ 22 | --mem-read E:1:8 --mem-read A:2:16 --mem-read M:3:32 \ 23 | --mem-read L:4:8 --mem-read DB:1:5:16 --mem-read T:10 \ 24 | --mem-read Z:10 --mem-read STW \ 25 | --mem-write E:50:8:1 --mem-write A:51:16:2 --mem-write M:52:32:3 \ 26 | --mem-write DB:1:5:16:5 --mem-write T:0:0 \ 27 | --mem-write Z:1:0 28 | 29 | infomsg -n "--- Finished coreserver tests " 30 | } 31 | -------------------------------------------------------------------------------- /tests/tc800_coreserver/coreserver-standalone.sh: -------------------------------------------------------------------------------- 1 | # Standalone coreserver tests 2 | 3 | sh_test() 4 | { 5 | local interpreter="$1" 6 | 7 | cd "$rootdir" || die "Failed to change to rootdir '$rootdir'" 8 | 9 | # Quick test to awlsim-server 10 | "$interpreter" ./awlsim-server -h >/dev/null ||\ 11 | test_failed "Call to awlsim-server -h failed" 12 | } 13 | -------------------------------------------------------------------------------- /tests/tc900_bugs/direct-lstack-alloc.awl: -------------------------------------------------------------------------------- 1 | FUNCTION FC 20 : VOID 2 | VAR_INPUT 3 | VAR1 : BYTE; 4 | VAR2 : BYTE; 5 | END_VAR 6 | BEGIN 7 | // Check whether VAR1 (VLB 0) was clobbered. 8 | L #VAR1 9 | __ASSERT== __ACCU 1, 1 10 | END_FUNCTION 11 | 12 | 13 | FUNCTION FC 10 : VOID 14 | BEGIN 15 | L 1 16 | T LB 0 // This directly allocates LB 0 17 | CALL FC 20 ( 18 | VAR1 := LB 0, 19 | 20 | // This 'B#16#0' immediate implicitly allocates 21 | // space on the L stack. 22 | // It should not overwrite the direct LB 0 allocation. 23 | VAR2 := B#16#0, 24 | ) 25 | END_FUNCTION 26 | 27 | 28 | FUNCTION FC 2 : VOID 29 | VAR_INPUT 30 | BVAR1 : BOOL; 31 | BVAR2 : BOOL; 32 | END_VAR 33 | BEGIN 34 | // Check whether BVAR1 (VLB 0) was clobbered. 35 | __STWRST 36 | U #BVAR1 37 | __ASSERT== __STW VKE, 1 38 | __STWRST 39 | END_FUNCTION 40 | 41 | 42 | FUNCTION FC 1 : VOID 43 | BEGIN 44 | L 1 45 | T LB 0 // This directly allocates LB 0 46 | CALL FC 2 ( 47 | BVAR1 := L 0.0, 48 | 49 | // This 'FALSE' immediate implicitly allocates 50 | // space on the L stack. 51 | // It should not overwrite the direct LB 0 allocation. 52 | BVAR2 := FALSE, 53 | ) 54 | END_FUNCTION 55 | 56 | 57 | ORGANIZATION_BLOCK OB 1 58 | BEGIN 59 | CALL FC 1 60 | CALL FC 10 61 | 62 | CALL SFC 46 // STOP CPU 63 | END_ORGANIZATION_BLOCK 64 | -------------------------------------------------------------------------------- /tests/tc900_bugs/float-int-conversion.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | 4 | // Truncating or rounding an infinite float shall not crash the core. 5 | // This used to trigger a Python OverflowError exception. 6 | 7 | __STWRST 8 | L DW#16#7F800000 9 | TRUNC 10 | __ASSERT== STW, W#16#0030 11 | __ASSERT== __ACCU 1, DW#16#7F800000 12 | __STWRST 13 | L DW#16#FF800000 14 | TRUNC 15 | __ASSERT== STW, W#16#0030 16 | __ASSERT== __ACCU 1, DW#16#FF800000 17 | 18 | 19 | __STWRST 20 | L DW#16#7F800000 21 | RND 22 | __ASSERT== STW, W#16#0030 23 | __ASSERT== __ACCU 1, DW#16#7F800000 24 | __STWRST 25 | L DW#16#FF800000 26 | RND 27 | __ASSERT== STW, W#16#0030 28 | __ASSERT== __ACCU 1, DW#16#FF800000 29 | 30 | 31 | __STWRST 32 | L DW#16#7F800000 33 | RND+ 34 | __ASSERT== STW, W#16#0030 35 | __ASSERT== __ACCU 1, DW#16#7F800000 36 | __STWRST 37 | L DW#16#FF800000 38 | RND+ 39 | __ASSERT== STW, W#16#0030 40 | __ASSERT== __ACCU 1, DW#16#FF800000 41 | 42 | 43 | __STWRST 44 | L DW#16#7F800000 45 | RND- 46 | __ASSERT== STW, W#16#0030 47 | __ASSERT== __ACCU 1, DW#16#7F800000 48 | __STWRST 49 | L DW#16#FF800000 50 | RND- 51 | __ASSERT== STW, W#16#0030 52 | __ASSERT== __ACCU 1, DW#16#FF800000 53 | 54 | 55 | CALL SFC 46 // STOP CPU 56 | END_ORGANIZATION_BLOCK 57 | -------------------------------------------------------------------------------- /tests/tc900_bugs/indirect-addr-format.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | 4 | // This is invalid and should raise an AwlSimError. 5 | L W [P#M 0.0, P#0.0] 6 | 7 | 8 | CALL SFC 46 // STOP CPU 9 | END_ORGANIZATION_BLOCK 10 | -------------------------------------------------------------------------------- /tests/tc900_bugs/indirect-addr-format.awl.conf: -------------------------------------------------------------------------------- 1 | exit_code=30 2 | -------------------------------------------------------------------------------- /tests/tc900_bugs/lstack-overflow.awlpro.conf: -------------------------------------------------------------------------------- 1 | exit_code=30 2 | optimizer_runs=off 3 | -------------------------------------------------------------------------------- /tests/tc900_bugs/parameter-spacing.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | BEGIN 3 | 4 | // Whitespace around call parameters should be non-significant. 5 | 6 | CALL SFC 47 ( 7 | WT:= 0 , // INT 8 | ) 9 | CALL SFC 47 ( 10 | WT :=0 , // INT 11 | ) 12 | CALL SFC 47 ( 13 | WT:=0 , // INT 14 | ) 15 | CALL SFC 47 ( 16 | WT:= 0 , 17 | ) 18 | CALL SFC 47 ( 19 | WT :=0 , 20 | ) 21 | CALL SFC 47 ( 22 | WT:=0 , 23 | ) 24 | CALL SFC 47 ( 25 | WT:= 0, 26 | ) 27 | CALL SFC 47 ( 28 | WT :=0, 29 | ) 30 | CALL SFC 47 ( 31 | WT:=0, 32 | ) 33 | CALL SFC 47 ( 34 | WT:= 0 // INT 35 | ) 36 | CALL SFC 47 ( 37 | WT :=0 // INT 38 | ) 39 | CALL SFC 47 ( 40 | WT:=0 // INT 41 | ) 42 | CALL SFC 47 ( 43 | WT:= 0 44 | ) 45 | CALL SFC 47 ( 46 | WT :=0 47 | ) 48 | CALL SFC 47 ( 49 | WT:=0 50 | ) 51 | CALL SFC 47 ( 52 | WT:= 0 53 | ) 54 | CALL SFC 47 ( 55 | WT :=0 56 | ) 57 | CALL SFC 47 ( 58 | WT:=0 59 | ) 60 | CALL SFC 47 ( 61 | WT:=0) 62 | CALL SFC 47 (WT:=0) 63 | CALL SFC 47 (WT:=0,) 64 | CALL SFC 47 ( 65 | WT:=0 ,// INT 66 | ) 67 | CALL SFC 47 ( 68 | WT:=0// INT 69 | ) 70 | CALL SFC 47( WT:=0 ) 71 | CALL SFC 47( WT:=0) 72 | CALL SFC 47(WT:=0) 73 | CALL SFC47(WT:=0) 74 | 75 | 76 | CALL SFC 46 // STOP CPU 77 | END_ORGANIZATION_BLOCK 78 | 79 | -------------------------------------------------------------------------------- /tests/tc900_bugs/parser-lbl-comment.awl: -------------------------------------------------------------------------------- 1 | ORGANIZATION_BLOCK OB 1 2 | VAR_TEMP 3 | TESTVAR : BOOL; 4 | END_VAR 5 | BEGIN 6 | // Parser regression test: 7 | // Comment on assignment statement with local variable and label. 8 | SET 9 | lbl: = #TESTVAR // This comment is ok 10 | 11 | 12 | CALL SFC 46 // STOP CPU 13 | END_ORGANIZATION_BLOCK 14 | -------------------------------------------------------------------------------- /tests/tc900_bugs/raw-call-on-nonraw-fc.awl: -------------------------------------------------------------------------------- 1 | FUNCTION FC 1 : VOID 2 | VAR_INPUT 3 | IN0 : INT; 4 | END_VAR 5 | BEGIN 6 | L #IN0 7 | END_FUNCTION 8 | 9 | 10 | ORGANIZATION_BLOCK OB 1 11 | BEGIN 12 | 13 | // Using UC together with a non-raw FC shall fail gracefully. 14 | // Note that on S7 this might "succeed" and do some undefined stuff, 15 | // but we don't support that. 16 | UC FC 1 17 | 18 | 19 | CALL SFC 46 // STOP CPU 20 | END_ORGANIZATION_BLOCK 21 | -------------------------------------------------------------------------------- /tests/tc900_bugs/raw-call-on-nonraw-fc.awl.conf: -------------------------------------------------------------------------------- 1 | exit_code=30 2 | -------------------------------------------------------------------------------- /tests/tc900_bugs/symbolic-timer-counter.awl: -------------------------------------------------------------------------------- 1 | FUNCTION FC 1 : VOID 2 | VAR_INPUT 3 | TIM : TIMER; 4 | CNT : COUNTER; 5 | END_VAR 6 | BEGIN 7 | // This would throw exception on older awlsim due to FC parameter 8 | // operators not being reparented from CALL to L. 9 | L #TIM 10 | L #CNT 11 | END_FUNCTION 12 | 13 | 14 | ORGANIZATION_BLOCK OB 1 15 | BEGIN 16 | CALL FC 1 ( 17 | TIM := T 1, 18 | CNT := Z 1, 19 | ) 20 | 21 | 22 | CALL SFC 46 // STOP CPU 23 | END_ORGANIZATION_BLOCK 24 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/EXAMPLE.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | loglevel=1 3 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/binaeruntersetzer.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc910_legacy/fileformat-v0/binaeruntersetzer.asc -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/binaeruntersetzer.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc910_legacy/fileformat-v0/binaeruntersetzer.awl -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/binaeruntersetzer.awlpro: -------------------------------------------------------------------------------- 1 | [AWLSIM_PROJECT] 2 | file_version=0 3 | date=1990-01-01 00:00:00.000000 4 | 5 | [CPU] 6 | awl_file_0=binaeruntersetzer.awl 7 | 8 | [SYMBOLS] 9 | sym_tab_file_0=binaeruntersetzer.asc 10 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/binaeruntersetzer.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/bnt_modell.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc910_legacy/fileformat-v0/bnt_modell.asc -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/bnt_modell.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc910_legacy/fileformat-v0/bnt_modell.awl -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/bnt_modell.awlpro: -------------------------------------------------------------------------------- 1 | [AWLSIM_PROJECT] 2 | file_version=0 3 | date=2014-08-24 17:25:16.885350 4 | 5 | [CPU] 6 | awl_file_0=bnt_modell.awl 7 | mnemonics=0 8 | nr_accus=2 9 | clock_memory_byte=-1 10 | ob_startinfo_enable=0 11 | ext_insns_enable=0 12 | 13 | [SYMBOLS] 14 | sym_tab_file_0=bnt_modell.asc 15 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/bnt_modell.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/clockmem.awlpro: -------------------------------------------------------------------------------- 1 | [AWLSIM_PROJECT] 2 | file_version=0 3 | create_date=2014-08-24 09:37:25.561025 4 | modify_date=2016-01-29 19:42:04.602100 5 | 6 | [CPU] 7 | awl_file_0=clockmem.awl 8 | mnemonics=0 9 | nr_accus=2 10 | clock_memory_byte=100 11 | ob_startinfo_enable=0 12 | ext_insns_enable=1 13 | 14 | [SYMBOLS] 15 | sym_tab_file_0=clockmem.asc 16 | 17 | [LIBS] 18 | 19 | [CORE_LINK] 20 | spawn_local=1 21 | spawn_local_port_range=4183:8278 22 | spawn_local_interpreters=JERFRkFVTFQ= 23 | connect_host=bG9jYWxob3N0 24 | connect_port=4151 25 | connect_timeout_ms=3000 26 | 27 | [HWMODS] 28 | 29 | [GUI] 30 | editor_autoindent=1 31 | editor_paste_autoindent=1 32 | editor_validation=1 33 | editor_font= 34 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/clockmem.awlpro.conf: -------------------------------------------------------------------------------- 1 | tries=9 2 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/dbpointer.awlpro: -------------------------------------------------------------------------------- 1 | [AWLSIM_PROJECT] 2 | file_version=0 3 | create_date=2015-03-28 17:10:50.809243 4 | modify_date=2015-03-29 11:14:15.760360 5 | 6 | [CPU] 7 | awl_file_0=dbpointer.awl 8 | mnemonics=0 9 | nr_accus=2 10 | clock_memory_byte=-1 11 | ob_startinfo_enable=0 12 | ext_insns_enable=1 13 | 14 | [SYMBOLS] 15 | sym_tab_0=MTI2LERhdGEgICAgICAgICAgICAgICAgICAgIERCIDQyICAgICAgIERCIDQyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KMTI2LEZDNzBfc3ltICAgICAgICAgICAgICAgIEZDIDcwICAgICAgIEZDIDcwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0K 16 | sym_tab_name_0=U3ltYm9sIHRhYmxl 17 | 18 | [LIBS] 19 | 20 | [CORE_LINK] 21 | spawn_local=1 22 | spawn_local_port_range=4183:8278 23 | spawn_local_interpreters=JERFRkFVTFQ= 24 | connect_host=bG9jYWxob3N0 25 | connect_port=4151 26 | connect_timeout_ms=3000 27 | 28 | [HWMODS] 29 | 30 | [GUI] 31 | editor_autoindent=1 32 | editor_paste_autoindent=1 33 | editor_validation=1 34 | editor_font= 35 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/fc12_ge_dt.awlpro: -------------------------------------------------------------------------------- 1 | [AWLSIM_PROJECT] 2 | file_version=0 3 | create_date=2014-11-26 23:10:26.629302 4 | modify_date=2015-01-30 09:29:25.950867 5 | 6 | [CPU] 7 | awl_file_0=fc12_ge_dt.awl 8 | mnemonics=0 9 | nr_accus=2 10 | clock_memory_byte=-1 11 | ob_startinfo_enable=0 12 | ext_insns_enable=1 13 | 14 | [SYMBOLS] 15 | sym_tab_0=MTI2LEdFX0RUICAgICAgICAgICAgICAgICAgIEZDIDEyICAgICAgIEZDIDEyICAgICBHcmVhdGVyIG9yIEVxdWFsIERBVEVfQU5EX1RJTUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0K 16 | sym_tab_name_0=c3ltYm9sIHRhYmxl 17 | 18 | [LIBS] 19 | lib_name_0=SUVD 20 | lib_block_0=FC 12 21 | lib_block_effective_0=12 22 | 23 | [CORE_LINK] 24 | spawn_local=1 25 | spawn_local_port_range=4183:8278 26 | spawn_local_interpreters=JERFRkFVTFQ= 27 | connect_host=bG9jYWxob3N0 28 | connect_port=4151 29 | connect_timeout_ms=3000 30 | 31 | [HWMODS] 32 | 33 | [GUI] 34 | editor_autoindent=1 35 | editor_paste_autoindent=1 36 | editor_validation=1 37 | editor_font= 38 | -------------------------------------------------------------------------------- /tests/tc910_legacy/fileformat-v0/impulszaehler.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc950_gui/no_cython: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc950_gui/no_cython -------------------------------------------------------------------------------- /tests/tc999_projects/acme-000.awl.conf: -------------------------------------------------------------------------------- 1 | loglevel=1 2 | max_runtime=1 3 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-001.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-002.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-003.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-004.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-005.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/acme-006.awl.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/binaeruntersetzer.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc999_projects/binaeruntersetzer.asc -------------------------------------------------------------------------------- /tests/tc999_projects/binaeruntersetzer.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc999_projects/binaeruntersetzer.awl -------------------------------------------------------------------------------- /tests/tc999_projects/binaeruntersetzer.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/bnt_modell.asc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc999_projects/bnt_modell.asc -------------------------------------------------------------------------------- /tests/tc999_projects/bnt_modell.awl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbuesch/awlsim/7ffd42d7058db4191abc09b01775aa7b74b9406e/tests/tc999_projects/bnt_modell.awl -------------------------------------------------------------------------------- /tests/tc999_projects/bnt_modell.awlpro.conf: -------------------------------------------------------------------------------- 1 | max_runtime=1 2 | -------------------------------------------------------------------------------- /tests/tc999_projects/garagecounter.awl: -------------------------------------------------------------------------------- 1 | // Maximale Anzahl Plaetze 2 | L 30 3 | T LW 0 4 | 5 | // Vorwaerts 6 | U E 0.1 // L1 7 | UN E 0.2 // L2 8 | S M 4.0 // MVOR 9 | UN E 0.1 // L1 10 | UN E 0.2 // L2 11 | O M 4.1 // MRUECK 12 | R M 4.0 // MVOR 13 | U M 4.0 // MVOR 14 | UN E 0.1 // L1 15 | U E 0.2 // L2 16 | = A 0.0 // VOR 17 | 18 | // Rueckwaerts 19 | UN E 0.1 // L1 20 | U E 0.2 // L2 21 | S M 4.1 // MRUECK 22 | UN E 0.1 // L1 23 | UN E 0.2 // L2 24 | O M 4.0 // MVOR 25 | R M 4.1 // MRUECK 26 | U M 4.1 // MRUECK 27 | U E 0.1 // L1 28 | UN E 0.2 // L2 29 | = A 0.1 // RUECK 30 | 31 | // Zaehler 32 | U E 0.3 // S1 33 | L LW 0 34 | ITB 35 | S Z 0 36 | U A 0.0 // VOR 37 | ZR Z 0 38 | L Z 0 39 | L LW 0 40 |