",code_init:function(){$("#select7").val(get_cfg("ws_idiom"))},description:"Idiom for help, examples, etc."});ws_config.push({id:"select8",type:"General",code_cfg:"
",code_init:function(){$("#select8").val(get_cfg("ws_skin"))},description:"WepSIM User Interface Skin"});ws_config.push({id:"radio14",type:"General",code_cfg:"
",code_init:function(){$("#label7-"+get_cfg("editor_theme")).button("toggle")},description:"Editor theme: light or dark"});ws_config.push({id:"select2",type:"Editor",code_cfg:"
",code_init:function(){$("#label1-"+get_cfg("DBG_level")).button("toggle")},description:"Step-by-step: element in run mode"});ws_config.push({id:"select1",type:"Execution",code_cfg:"",code_init:function(){$("#img_select1").attr("src","images/stop/stop_"+get_cfg("ICON_theme")+".gif");$("#breakpointicon1").popover({html:true,content:wepsim_show_breakpoint_icon_list,sanitizeFn:function(a){return a}})},description:"Breakpoint icon: icon to be used for breakpoints"});ws_config.push({id:"select6",type:"Execution",code_cfg:"
",code_init:function(){$("#select6").val(get_cfg("DBG_limitins"))},description:"Limit instructions: number of instructions to be executed"});ws_config.push({id:"select3",type:"Execution",code_cfg:"
",code_init:function(){$("#select3").val(get_cfg("DBG_limitick"))},description:"Limit instruction ticks: to limit clock ticks"});ws_config.push({id:"radio2",type:"Register file",code_cfg:"
",code_init:function(){$("#label10-"+get_cfg("is_byvalue")).button("toggle")},description:"Show by value or by activation"});ws_config.push({id:"radio5",type:"Circuitry simulation",code_cfg:"
",code_init:function(){$("#label5-"+get_cfg("is_interactive")).button("toggle")},description:"Interactive mode: signal value can be updated"});ws_config.push({id:"radio6",type:"Circuitry simulation",code_cfg:"
",code_init:function(){$("#label6-"+get_cfg("is_quick_interactive")).button("toggle")},description:"Quick interactive mode: quick update of signal value"});ws_config.push({id:"radio11",type:"Accesibility",code_cfg:"
",code_init:function(){$("#label13-"+get_cfg("verbal_verbose")).button("toggle")},description:"Verbalization: textual or mathematical"});ws_config.push({id:"slider3",type:"Accesibility",code_cfg:"
",code_init:function(){$("#label8-"+get_cfg("NOTIF_delay")).button("toggle")},description:"Notification speed: time before disapear"});function wepsim_open_examples_index(){$("#container-example1").html(table_examples_html(ws_examples));i18n_update_tags("examples");$("#example1").modal("show");ga("send","event","ui","ui.dialog","ui.dialog.example")}function wepsim_close_examples(){$("#example1").modal("hide")}function load_from_example_assembly(f,g){inputasm.setValue("Please wait...");inputasm.refresh();var c=f.split(":");var e="";if(c.length>0){e=c[0]}else{console.log("warning: example without hardware id")}var b="";if(c.length>1){b=c[1]}else{console.log("warning: example without microcode id")}var h="";if(c.length>2){h=c[2]}else{console.log("warning: example without assembly id")}var d="examples/assembly/asm-"+h+".txt";var a=function(j){inputasm.setValue(j);inputasm.refresh();var k=false;var i=get_simware();if(i.firmware.length!=0){k=wepsim_compile_assembly(j)}if(false===k){wsweb_change_workspace_assembly();return}if(true===g){setTimeout(function(){wsweb_change_workspace_simulator();show_memories_values()},50)}wepsim_notify_success("INFO","Example ready to be used.")};wepsim_load_from_url(d,a);simcore_record_append_new("Load assembly from example "+f,'load_from_example_assembly("'+f+'", '+g+");\n");ga("send","event","example","example.assembly","example.assembly."+e+"."+h)}function load_from_example_firmware(f,g){inputfirm.setValue("Please wait...");inputfirm.refresh();var c=f.split(":");var e="";if(c.length>0){e=c[0]}else{console.log("warning: example without hardware id")}var b="";if(c.length>1){b=c[1]}else{console.log("warning: example without microcode id")}var h="";if(c.length>2){h=c[2]}else{console.log("warning: example without assembly id")}var d="examples/microcode/mc-"+b+".txt";inputfirm.setOption("readOnly",false);var a=function(i){inputfirm.setValue(i);inputfirm.refresh();var j=wepsim_compile_firmware(i);if(false===j){wsweb_change_workspace_microcode();return}if(true===g){setTimeout(function(){load_from_example_assembly(f,g)},50)}else{show_memories_values();wepsim_notify_success("INFO","Example ready to be used.")}};wepsim_load_from_url(d,a);simcore_record_append_new("Load firmware from example "+f,'load_from_example_firmware("'+f+'", false);\n');ga("send","event","example","example.firmware","example.firmware."+e+"."+b)}function table_examples_html(h){var l="ep";var r=["newbie","intro","wepmips","tutorial"];var j=get_cfg("ws_mode");if((j!=="null")&&(!r.includes(j))){l=j}var q=get_cfg("base_url");var d="";var e="";var f="";var p="";var b="";var s="";var a="";var n="";var k="";var i="";var c="";for(var g=0;g"+l.toUpperCase()+": "+h[g].level+"
"}if(c.trim()===""){c='<No examples are available for the selected hardware>'}c='
'+c+"
";return c}var ws_examples=[];ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s1_e1",description:"Simple example with fetch, arithmetic instructions, and basic .text segment."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E2",title:"Subrutine",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s2_e2",description:"Extended example with more instructions and I/O (keyboard, display)."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s2_e3",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s2_e4",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e1",assembly:"ep_s3_e1",description:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e2",assembly:"ep_s3_e2",description:"Instructive example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e3",assembly:"ep_s3_e3",description:"Instructive example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s4_e1",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"SC 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S4E3",title:"Threads",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e3",description:"Example of threads."});ws_examples.push({id:"S4E4",title:"Alloc.s",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e4",description:"Example of malloc + free."});ws_examples.push({id:"S5E1",title:"addv + seqv.",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e1",assembly:"ep_s5_e1",description:"Application-specific extension: addv + seqv."});ws_examples.push({id:"S5E2",title:"strlen_2 + skipasciicode_2",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e2",assembly:"ep_s5_e2",description:"Application-specific extension: strlen_2 + skipasciicode_2."});ws_examples.push({id:"S5E3",title:"madd, mmul, mxch",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e3",assembly:"ep_s5_e3",description:"Application-specific extension: madd + mmul + mxch."});ws_examples.push({id:"S6E1",title:"Dummy instruction",level:"Special",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_bare",assembly:"ep_s6_e1",description:"Test example."});ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e1",description:"Simple example with fetch, arithmetic instructions, and basic .text segment."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e1",description:"Example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e2",description:"Example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e3",description:"Example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"syscall 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S5E1",title:"strlen_2 + skipasciicode_2",level:"Laboratory",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s5_e2",description:"Application-specific extension: strlen_2 + skipasciicode_2."});ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"poc_s1_e1",description:"Simple example."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E2",title:"Subrutine",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e2",description:"Extended example with more instructions and I/O (keyboard, display)."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e1",description:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e2",description:"Instructive example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e3",description:"Instructive example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"SC 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S4E3",title:"Threads",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e3",description:"Example of threads."});ws_examples.push({id:"S4E4",title:"Alloc.s",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e4",description:"Example of malloc + free."});ws_examples.push({id:"S5E1",title:"Dummy instruction",level:"Special",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_bare",assembly:"poc_s5_e1",description:"Test example."});function wepsim_execute_reset(c,b){wepsim_state_history_reset();if(true===b){var a=get_simware();if(a.firmware.length!=0){update_memories(a)}}if(true===c){simcore_reset()}}function wepsim_execute_instruction(){var b=simcore_check_if_can_execute();if(false===b.ok){alert(b.msg);return false}var a={verbosity:0,cycles_limit:get_cfg("DBG_limitick")};b=simcore_execute_microprogram(a);if(false===b.ok){wepsim_show_stopbyevent("Info",b.msg);return false}return true}function wepsim_execute_microinstruction(){var a=simcore_check_if_can_execute();if(false===a.ok){alert(a.msg);return false}a=simcore_execute_microinstruction();if(false===a.ok){wepsim_show_stopbyevent("Info",a.msg);return false}return true}function wepsim_execute_set_breakpoint(a){return asmdbg_set_breakpoint(a)}var DBG_stop=true;var DBG_limit_instruction=0;function wepsim_execute_stop(b){var a=get_cfg("ws_idiom");var c=i18n_get("gui",a,"Run");$(b).html(" "+c+"");$(b).css("backgroundColor","#CCCCCC");DBG_stop=true;DBG_limit_instruction=0}function wepsim_execute_play(e,d){var a=get_cfg("ws_idiom");var b=i18n_get("gui",a,"Stop");var c=simcore_check_if_can_execute();if(false===c.ok){alert(c.msg);return false}$(e).css("backgroundColor","rgb(51, 136, 204)");$(e).html(" "+b+"");DBG_stop=false;DBG_limit_instruction=0;if(false===d){wepsim_execute_chainplay(e)}else{wepsim_execute_chainnotify(e)}}function wepsim_execute_toggle_play(b,a){if(DBG_stop===false){DBG_stop=true}else{wepsim_execute_play(b,a)}}function wepsim_check_stopbybreakpoint_firm(){var a=simhw_sim_ctrlStates_get().mpc.state;var c=get_value(simhw_sim_state(a));var b="0x"+c.toString(16);if(typeof simhw_internalState_get("MC_dashboard",c)==="undefined"){return false}return(simhw_internalState_get("MC_dashboard",c).breakpoint)}function wepsim_check_stopbybreakpoint_asm(){var a=simhw_sim_ctrlStates_get().pc.state;var c=get_value(simhw_sim_state(a));var d="0x"+c.toString(16);var b=simhw_internalState("FIRMWARE");if(typeof b.assembly[d]==="undefined"){return false}return(b.assembly[d].breakpoint)}function wepsim_show_stopbyevent(f,e){var h=simhw_sim_ctrlStates_get().mpc.state;var c=get_value(simhw_sim_state(h));var a="0x"+c.toString(16);var i=simhw_sim_ctrlStates_get().pc.state;var g=get_value(simhw_sim_state(i));var b="0x"+g.toString(16);var d=f+" @ pc="+b+"+mpc="+a;$("#dlg_title2").html(d);$("#dlg_body2").html(e);$("#current_state2").modal("show");return true}function wepsim_check_state_firm(){var a=simhw_sim_ctrlStates_get().mpc.state;var b=get_value(simhw_sim_state(a));if(false===simhw_internalState_get("MC_dashboard",b).state){return false}wepsim_state_history_add();return true}function wepsim_execute_chunk(a,e){var d=false;var c=0;var h=get_cfg("DBG_level");if(h==="instruction"){var j={verbosity:0,cycles_limit:get_cfg("DBG_limitick")};for(c=0;cget_cfg("DBG_limitins")){wepsim_show_stopbyevent("Limit","Number of executed instructions limit reached.
See related configuration options about limits: ");wepsim_execute_stop(d);return}setTimeout(wepsim_execute_chainplay,get_cfg("DBG_delay"),d)}function wepsim_execute_chainnotify(b){if(DBG_stop){wepsim_execute_stop(b);return}var g=false;var l=simhw_sim_ctrlStates_get().mpc.state;var j=simhw_sim_state(l);var c=0;var h=0;for(var e=0;e1){var f="Notify @ "+c+": "+simhw_internalState_get("MC_dashboard",c).notify[1];var a='
"}b=b+"";return b}function wepsim_help_refresh(){var c="#iframe_help1";var e="";var f=get_cfg("ws_idiom");var h=simhw_active().sim_short_name;var b=$("#help1_ref").data("relative");if((typeof b!="undefined")&&(b!="")){var g=b.split("#");e="help/"+g[0]+"-"+f+".html";$("#help1").modal("show");resolve_html_url(c,e,"#"+g[1],function(){});ga("send","event","help","help.simulator","help.simulator."+b);return}var a=$("#help1_ref").data("absolute");if((typeof a!="undefined")&&(a!="")){e="examples/hardware/"+h+"/help/"+a+"-"+f+".html";$("#help1").modal("show");resolve_html_url(c,e,"",function(){});ga("send","event","help","help."+a,"help."+a+".*");return}var d=$("#help1_ref").data("code");if((typeof d!="undefined")&&(d==="true")){ga("send","event","help","help.code","help.code.*");return}wepsim_open_help_index()}function wepsim_open_help_index(){$("#iframe_help1").html(table_helps_html(ws_help));$("#help1_ref").data("relative","");$("#help1_ref").data("absolute","");$("#help1_ref").data("code","false");i18n_update_tags("help");$("#help1").modal("show");ga("send","event","ui","ui.dialog","ui.dialog.help")}function wepsim_open_help_content(a){$("#iframe_help1").html(a);$("#help1_ref").data("relative","");$("#help1_ref").data("absolute","");$("#help1_ref").data("code","true");$("#help1").modal("show")}function wepsim_close_help(){$("#help1").modal("hide")}function wepsim_help_set_relative(a){$("#help1_ref").data("relative",a);$("#help1_ref").data("absolute","");$("#help1_ref").data("code","false")}function wepsim_help_set_absolute(a){$("#help1_ref").data("relative","");$("#help1_ref").data("absolute",a);$("#help1_ref").data("code","false")}var ws_help=[];ws_help.push({id:"simulator",title:"Welcome tutorial",i_type:"code",u_type:"tutorial",reference:"wepsim_close_help(); sim_tutorial_showframe('welcome', 0);",description:"Open the welcome tutorial. "});ws_help.push({id:"simulator",title:"Simple usage tutorial",i_type:"code",u_type:"tutorial",reference:"wepsim_close_help(); sim_tutorial_showframe('simpleusage', 0);",description:"Open the simple usage tutorial, for microprogramming and assembly programming. "});ws_help.push({id:"simulator",title:"Simulator: firmware",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_firmware",description:"How to work with the firmware to be loaded into the control memory. "});ws_help.push({id:"microcode",title:"Microcode format",i_type:"relative",u_type:"simulator",reference:"simulator#help_firmware_format",description:"Syntax of the microcode used. "});ws_help.push({id:"simulator",title:"Simulator: assembly",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_assembly",description:"How to work with the assembly that use the aforementioned firmware. "});ws_help.push({id:"assembly",title:"Assembly format",i_type:"relative",u_type:"simulator",reference:"simulator#help_assembly_format",description:"Syntax of the assembly elements. "});ws_help.push({id:"simulator",title:"Simulator: execution",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_execution",description:"How the simulator can execute the assembly and firmware. "});ws_help.push({id:"architecture",title:"Simulated architecture",i_type:"absolute",u_type:"simulated processor",reference:"hardware",description:"Description of the simulated processor architecture. "});ws_help.push({id:"architecture",title:"Simulated signals",i_type:"absolute",u_type:"simulated processor",reference:"signals",description:"Main signals summary of the simulated elemental processor. "});ws_help.push({id:"architecture",title:"Hardware summary",i_type:"code",u_type:"simulated processor",reference:"var ahw1 = simhw_active().sim_short_name ; var img1 = 'examples/hardware/' + ahw1 + '/images/cpu.svg?time=20190102' ; var txt1 = 'Your browser does not support SVG' ;var lyt1 = ''; wepsim_open_help_content(lyt1) ;",description:"Reference card for the simulated elemental processor hardware. "});ws_help.push({id:"about",title:"License, platforms, etc.",i_type:"relative",u_type:"info",reference:"about#help_about",description:"WepSIM license, supported platforms, technologies used. "});ws_help.push({id:"authors",title:"Authors",i_type:"code",u_type:"info",reference:"wepsim_close_help();$('#about2').modal('show');",description:"Authors of WepSIM. "});function wepsim_notify_success(a,b){return simcoreui_notify(a,b,"success",get_cfg("NOTIF_delay"))}function wepsim_notify_error(a,b){return simcoreui_notify(a,b,"danger",0)}function wepsim_notify_warning(a,b){return simcoreui_notify(a,b,"warning",get_cfg("NOTIF_delay"))}function wepsim_notify_close(){return simcoreui_notify_close()}function wepsim_preload_hash(e){var g="";if(e.mode!==""){wsweb_select_main(e.mode);g+="
"}if(typeof b[0]!=="undefined"){if(b[0]==="microcode"){wsweb_change_show_processor()}if(b[0]==="assembly"){wsweb_change_show_asmdbg()}}if(typeof b[1]!=="undefined"){var d=b[1].toUpperCase();wsweb_set_details(d)}if(g!==""){g="WepSIM has been instructed to preload some work for you:
"+g+'
To close this notification please press in the X mark. In order to execute an example please press the Run button. ';if(e.notify!=="false"){simcoreui_notify("WepSIM preloads some work",g,"info",0)}}return 0}function wepsim_preload_json(b,a){var c=1*1024*1024;var d=new XMLHttpRequest();d.open("HEAD",b,true);d.onreadystatechange=function(){if(this.readyState==this.DONE){var e=0;var f=d.getResponseHeader("Content-Length");if(f!==null){e=parseInt(f)}if(eµadd "+c}}var state_history=[];function wepsim_state_history_get(){return state_history}function wepsim_state_history_reset(){$("[data-toggle=popover4]").popover("hide");state_history=[]}function wepsim_state_history_add(){var a=wepsim_state_get_clk();var b=simcore_simstate_current2state();a.content=simcore_simstate_state2checklist(b);state_history.push(a)}function wepsim_state_results_empty(){var a='<Empty (only modified values are shown)>';$("#check_results1").html(a);$("#s_clip").html("clipboard");$("#s_ref").html("reference")}function wepsim_state_history_empty(){var a='<Empty history>';$("#history1").html(a)}function wepsim_state_history_list(){if(0==state_history.length){wepsim_state_history_empty();wepsim_state_results_empty();return}$("[data-toggle=popover4]").popover("hide");var c=0;var e="";var d="";var a="";var f="";for(var b=state_history.length-1;b>=0;b--){c=new Date(state_history[b].time);e=c.getFullYear()+"-"+(c.getMonth()+1)+"-"+c.getDate()+"-"+c.getHours()+"-"+c.getMinutes()+"-"+c.getSeconds()+"-"+c.getMilliseconds();d='
'+state_history[b].title+" was inserted at: Date: "+c.getFullYear()+"-"+(c.getMonth()+1)+"-"+c.getDate()+" Hour: "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()+"-"+c.getMilliseconds()+' Close
Copyto clipboardCheckdifferences with clipboard state± Show
'+d+'
'+state_history[b].content+'
"}$("#history1").html(f);wepsim_state_results_empty();$("[data-toggle=popover4]").popover({html:true,placement:"auto",trigger:"click",container:"body",animation:false,content:function(){var g=$(this).attr("id");return $("#popover-content-"+g).html()},sanitizeFn:function(g){return g}})}function wepsim_dialog_current_state(){wepsim_notify_success("INFO","Loading, please wait...");i18n_update_tags("states");$("#current_state1").modal("show");setTimeout(function(){var d=wepsim_state_get_clk();$("#curr_clk_maddr").html(d.title_short);var g=simcore_simstate_current2state();var e=simcore_simstate_state2checklist(g);$("#end_state1").tokenfield("setTokens",e);wepsim_notify_close();wepsim_notify_success("INFO","Current state loaded !");var c=0;var f=0;var h="";for(var b in g){f=0;for(var a in g[b]){f++}h=h+","+b+"="+f;c=c+f}ga("send","event","state","state.dump","state.dump.ci="+get_value(simhw_sim_state("REG_IR_DECO"))+",neltos="+c+h)},80)}function wepsim_dialog_check_state(c,b,e){var a=simcore_simstate_diff_results(b,e);var d="";if(0==a.errors){d=" Meets the specified requirements "}else{d=simcore_simstate_checkreport2html(a.result,true)}$("#"+c).html(d);ga("send","event","state","state.check","state.check,ci="+get_value(simhw_sim_state("REG_IR_DECO"))+".a="+a.neltos_expected+",b="+a.neltos_obtained+",sd="+a.errors);return true}function wepsim_dialog_check_reset(a,b){$("#"+b).tokenfield("setTokens",[]);$("#"+b).val("");$("#"+a).html("");return true}function sim_tutorial_goframe(c,a,b){if(typeof tutorials[c]=="undefined"){return}var d=tutorials[c][get_cfg("ws_idiom")];if(typeof d=="undefined"){return}d[a].code_post();tutbox.modal("hide");setTimeout(function(){sim_tutorial_showframe(c,b)},d[a].wait_next);if(simcoreui_voice_canSpeak()){window.speechSynthesis.cancel()}}function sim_tutorial_cancelframe(){var a=get_cfg("ws_mode");wsweb_select_main(a);tutbox.modal("hide");if(simcoreui_voice_canSpeak()){window.speechSynthesis.cancel()}}function sim_tutorial_showframe(c,b){if(typeof tutorials[c]=="undefined"){return}var e=tutorials[c][get_cfg("ws_idiom")];if(typeof e=="undefined"){return}if(b==e.length){return}if(b<0){return}ga("send","event","help","help.tutorial","help.tutorial.name="+c+",step="+b);e[b].code_pre();var a=get_cfg("ws_idiom");var d={};d.cancel={label:i18n_get("gui",a,"Disable tutorial mode"),className:"btn-danger col float-right",callback:function(){sim_tutorial_cancelframe()}};if(b!=0){d.prev={label:i18n_get("gui",a,"Prev."),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b-1)}}}if(b!=(e.length-1)){d.next={label:i18n_get("gui",a,"Next"),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b+1)}}}else{d.end={label:i18n_get("gui",a,"End"),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b+1)}}}tutbox=bootbox.dialog({title:e[b].title,message:e[b].message,buttons:d,size:"large",animate:false});simcoreui_voice_speak(e[b].title.replace(/<[^>]*>/g,"")+". "+e[b].message.replace(/<[^>]*>/g,""))}function sim_tutorial_loadFromCheckpoint(b){wsweb_recordbar_show();var a={name:"examples/checkpoint/tutorial_"+b+".txt"};wepsim_load_from_url(a.name,function(c){var d=null;if(c!==""){d=JSON.parse(c)}wepsim_checkpoint_loadFromObj(d,"FileNameToSaveAs1","tagToSave1",a)})}function wepsim_newbie_tour(){var a=get_cfg("ws_idiom");wepsim_newbie_tour_setLang(a);tour=introJs();tour.setOptions({steps:ws_tour,keyboardNavigation:true,showProgress:true,overlayOpacity:"0.1"});tour.onbeforechange(function(){ws_tour[this._currentStep].do_before()});tour.onexit(function(){$("#config2").modal("hide");$("#help1").modal("hide");$("#example1").modal("hide");if(get_cfg("ws_mode")!="ep"){wsweb_select_main("ep")}return true});tour.start();ga("send","event","ui","ui.tour","ui.tour.newbie")}function wepsim_newbie_tour_setLang(c){var b="";for(var a=0;aStep 0",step:"step0",position:"auto",do_before:function(){return true}});ws_tour.push({intro:"Step 1",step:"step1",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#select4",intro:"Step 2",step:"step2",position:"auto",do_before:function(){wsweb_select_main("ep");tour.refresh();return true}});ws_tour.push({element:"#btn_help1",intro:"Step 3",step:"step3",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#btn_example1",intro:"Step 4",step:"step4",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#btn_cfg1",intro:"Step 5",step:"step5",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({intro:"Step 6",step:"step6",position:"auto",do_before:function(){tour.refresh();return true}});function wepsim_load_from_file(c,b){var a=new FileReader();a.onload=function(d){var e=d.target.result;if(null!==b){b(e)}};a.onerror=function(d){console.error("File could not be read! Code "+d.target.error.code)};a.readAsText(c,"UTF-8")}function wepsim_save_to_file(d,c){var b=new Blob([d],{type:"text/plain"});var a=document.createElement("a");a.download=c;a.innerHTML="Download File";if(window.webkitURL!=null){a.href=window.webkitURL.createObjectURL(b)}else{a.href=window.URL.createObjectURL(b);a.onclick=function(e){document.body.removeChild(e.target)};a.style.display="none";document.body.appendChild(a)}a.click()}function getURLTimeStamp(){var b=new Date();var e=b.getUTCFullYear();var f=b.getUTCMonth()+1;var c=b.getUTCDate();var a=b.getUTCHours();var d=b.getUTCMinutes();return e+f+c+a+d}function fetchURL(a){if(navigator.onLine){return fetch(a+"?time="+getURLTimeStamp())}return caches.match(a)}function wepsim_load_from_url(b,a){if(false==is_mobile()){fetchURL(b).then(function(d){if(typeof d=="undefined"){console.error("File "+b+" could not be fetched: * Please check that you are on-line.");return}if(d.ok){d.text().then(function(e){a(e)})}})}else{var c=new XMLHttpRequest();c.onreadystatechange=function(){if((c.readyState==4)&&((c.status==200)||(c.status==0))){var d=c.responseText;if(null!=a){a(d)}}};c.open("GET",b,true);c.send()}}function wepsim_voice_init(){if(!annyang){return false}annyang.addCommands(wepsim_voice_commands);annyang.addCallback("errorNetwork",function(){annyang.abort();alert("Sorry but some network connection is needed in order to use the voice recognition engine.")});SpeechKITT.annyang();SpeechKITT.setStylesheet("external/speechkitt/themes/flat.css");SpeechKITT.setInstructionsText("What can I help you with? (list)");SpeechKITT.vroom();return true}function wepsim_voice_start(){if(!annyang){wepsim_notify_error("
Warning: annyang not available
","Voice support is not available in this platform.");return false}SpeechKITT.show();return true}function wepsim_voice_stop(){if(!annyang){return false}SpeechKITT.hide();return true}var wepsim_voice_commands={};var wepsim_voice_dialog=null;wepsim_voice_commands.hello=function(){var a="Hello, I am WepSIM, nice to meet you. ";simcoreui_voice_speak(a)};wepsim_voice_commands["(show) configuration"]=function(){wepsim_open_config_index()};wepsim_voice_commands["(show) examples"]=function(){wepsim_open_examples_index()};wepsim_voice_commands["load example :id (from) :level"]=function(d,c){var b=parseInt(d);var a=parseInt(c);load_from_example_firmware("ep:S"+a+"E"+a,true)};wepsim_voice_commands["(show) help"]=function(){wepsim_open_help_index();wepsim_help_refresh()};wepsim_voice_commands.close=function(){wepsim_close_help();wepsim_close_examples();wepsim_close_config();if(null!=wepsim_voice_dialog){wepsim_voice_dialog.modal("hide")}};wepsim_voice_commands.reset=function(){wepsim_execute_reset(true,true);var a="Current processor has been reset.";simcoreui_voice_speak(a)};wepsim_voice_commands.next=function(){wepsim_execute_instruction();var a="Next executed.";simcoreui_voice_speak(a)};wepsim_voice_commands["next micro(instruction)"]=function(){wepsim_execute_microinstruction();var a="Next microinstruction executed. ";simcoreui_voice_speak(a)};wepsim_voice_commands.play=function(){wepsim_execute_play("#qbp",false)};wepsim_voice_commands.stop=function(){wepsim_execute_stop("#qbp")};wepsim_voice_commands["describe micro(instruction)"]=function(){var a=get_verbal_from_current_mpc();simcoreui_voice_speak(a)};wepsim_voice_commands["describe instruction"]=function(){var a=get_verbal_from_current_pc();simcoreui_voice_speak(a)};wepsim_voice_commands.list=function(){var a="available commands: ";for(var b in wepsim_voice_commands){a=a+" * '"+b+"' "}wepsim_voice_dialog=bootbox.alert(a);wepsim_voice_dialog.modal("show");var c=$("
").html(a).text();simcoreui_voice_speak(c)};wepsim_voice_commands.silence=function(){simcoreui_voice_stopSpeak()};function sim_change_workspace(b,a){if((typeof $.mobile!="undefined")&&(typeof $.mobile.pageContainer!="undefined")&&(typeof $.mobile.pageContainer.pagecontainer!="undefined")){$.mobile.pageContainer.pagecontainer("change",b)}else{$("#carousel-8").carousel(a)}}function wepsim_load_hw(){return true}function wepsim_show_wepmips(){$(".multi-collapse-2").collapse("show");$("#slider_cpucu").hide();$("#tab26").hide();$("#tab21").hide();$("#tab24").click();inputfirm.setOption("readOnly",true);$("#btn_micro1").addClass("d-none");return true}function wepsim_hide_wepmips(){$(".multi-collapse-2").collapse("show");$("#slider_cpucu").show();$("#tab26").show();$("#tab21").show();inputfirm.setOption("readOnly",false);$("#btn_micro1").removeClass("d-none");return true}function wepsim_activehw(i){simhw_setActive(i);var h=document.getElementById("svg_p");if(h!=null){h.setAttribute("data",simhw_active().sim_img_processor)}h=document.getElementById("svg_cu");if(h!=null){h.setAttribute("data",simhw_active().sim_img_controlunit)}h=document.getElementById("svg_p2");if(h!=null){h.setAttribute("data",simhw_active().sim_img_cpu)}var f=document.getElementById("svg_p");f.addEventListener("load",function(){simcore_init_eventlistener("svg_p",hash_detail2action);refresh()},false);var d=document.getElementById("svg_cu");d.addEventListener("load",function(){simcore_init_eventlistener("svg_cu",hash_detail2action);refresh()},false);wepsim_notify_warning("WARNING","Please remember the current firmware and assembly might need to be reloaded, because previous working session of the simulated hardware are not kept.");wepsim_notify_success("INFO",'"'+simhw_active().sim_name+'" has been activated.');var c=get_simware();update_memories(c);simcore_reset();var g=default_asmdbg_content_horizontal();for(var e in c.assembly){g=assembly2html(c.mp,c.labels2,c.seg,c.assembly);break}$("#asm_debugger").html(g);showhideAsmElements();return true}function wepsim_change_mode(b){var a=-1;switch(b){case"newbie":case"intro":case"wepmips":case"tutorial":a=simhw_getIdByName("ep");wepsim_activehw(a);break;default:a=simhw_getIdByName(b);wepsim_activehw(a);break}if("wepmips"==b){wepsim_show_wepmips()}else{wepsim_hide_wepmips()}if("intro"==b){sim_tutorial_loadFromCheckpoint("2");return true}if("newbie"==b){wepsim_newbie_tour();return true}return true}function set_ab_size(f,d,g){var e=g;var c=12-e;$(f).removeClass();$(d).removeClass();if(e!=0){$(f).addClass("col-"+e)}else{$(f).addClass("col-12 order-1")}if(c!=0){$(d).addClass("col-"+c)}else{$(d).addClass("col-12 order-2")}}function wepsim_dialogbox_close_all(){$("#example1").modal("hide");$("#help1").modal("hide");$("#config2").modal("hide");$("#current_state1").modal("hide");$("#bin2").modal("hide")}var wepsim_updatediv_timer=null;function wepsim_updatetime(a,b){$(a).html("Close automatically after "+b+" seconds.");wepsim_updatediv_timer=setTimeout(wepsim_updatetime,1000,a,(b-1))}function wepsim_updatetime_start(a,b){clearTimeout(wepsim_updatediv_timer);wepsim_updatetime(a,b)}function wepsim_confirm_exit(a){var b="o/";(a||window.event).returnValue=b;return b}function wepsim_general_exception_handler(a){alert("Please try to cleanup the browser cache and try again.\nWepSIM was improperly used and found an error, sorry :-(\n\nDiagnostic:\n * Error message: "+a.message+"\n * Runtime stack:\n"+a.stack+"\nAfter close this alert, WepSIM will try to reload and by-pass the cache (just in case).\n");location.reload(true)}function wepsim_show_quick_menu(b){var a=get_cfg("ws_idiom");var c='
WARNING: loading binary might take time on slow mobile devices.
");$(a).css({width:"100%",height:"inherit !important"});$(b).modal("show");setTimeout(function(){var d=get_simware();$(a).html(mp2html(d.mp,d.labels2,d.seg));for(var c in d.seg){$("#compile_begin_"+c).html("0x"+d.seg[c].begin.toString(16));$("#compile_end_"+c).html("0x"+d.seg[c].end.toString(16))}},300)}function wepsim_show_binary_microcode(b,a){$(a).html("
Loading binary, please wait...
WARNING: loading binary might take time on slow mobile devices.
");$(a).css({width:"100%",height:"inherit !important"});$(b).modal("show");setTimeout(function(){var c=get_simware();$(a).html(firmware2html(c.firmware,true));$(a).css({width:"inherit !important",height:"inherit !important"});$(b).trigger("refresh")},300)}function wepsim_compile_assembly(b){var a=get_simware();if(a.firmware.length===0){alert("WARNING: please load the microcode first.");sim_change_workspace("#main3");return false}var c=simlang_compile(b,a);if(c.error!=null){showError(c.error,"inputasm");return false}wepsim_notify_success("INFO","Assembly was compiled and loaded.");set_simware(c);update_memories(a);$("#asm_debugger").html(assembly2html(c.mp,c.labels2,c.seg,c.assembly));showhideAsmElements();simcore_reset();return true}function wepsim_compile_firmware(b){var a=simcore_compile_firmware(b);if(false===a.ok){showError(a.msg,"inputfirm");return false}wepsim_notify_success("INFO","Microcode was compiled and loaded.");simcore_reset();return true}function wsweb_change_workspace_simulator(){sim_change_workspace("#main1",0);setTimeout(function(){ga("send","event","ui","ui.workspace","ui.workspace.simulator")},50);simcore_record_append_new("Change to workspace simulator","wsweb_change_workspace_simulator();\n");return true}function wsweb_change_workspace_microcode(){sim_change_workspace("#main3",1);setTimeout(function(){inputfirm.refresh();ga("send","event","ui","ui.workspace","ui.workspace.microcode")},50);simcore_record_append_new("Change to workspace microcode","wsweb_change_workspace_microcode();\n");return true}function wsweb_change_workspace_assembly(){sim_change_workspace("#main4",2);setTimeout(function(){inputasm.refresh();ga("send","event","ui","ui.workspace","ui.workspace.assembly")},50);simcore_record_append_new("Change to workspace assembly","wsweb_change_workspace_assembly();\n");return true}function wsweb_change_show_processor(){$("#tab26").tab("show");start_drawing();refresh();simcore_record_append_new("Show processor details","wsweb_change_show_processor();\n");return true}function wsweb_change_show_asmdbg(){stop_drawing();$("#tab24").tab("show");simcore_record_append_new("Show assembly debugger","wsweb_change_show_asmdbg();\n");var b=fullshow_asmdbg_pc();if(typeof b[0]=="undefined"){return true}var a=$("#asm_debugger_container");a[0].scrollTop=b[0].offsetTop;return true}function wsweb_execution_reset(){wepsim_execute_reset(true,true);simcoreui_show_hw();simcore_record_append_new("Reset","wsweb_execution_reset();\n");return true}function wsweb_execution_microinstruction(){wepsim_execute_microinstruction();simcoreui_show_hw();simcore_record_append_new("Execute microinstruction","wsweb_execution_microinstruction();\n");return true}function wsweb_execution_instruction(){wepsim_execute_instruction();simcoreui_init_hw("#config_HW");simcore_record_append_new("Execute instruction","wsweb_execution_instruction();\n");return true}function wsweb_execution_run(){var a=get_cfg("ws_mode");if("tutorial"==a){wepsim_notify_success("INFO","Tutorial mode on. Use the configuration to change it.")}wepsim_execute_toggle_play("#qbp",(a=="tutorial"));simcore_record_append_new("Run","wsweb_execution_run();\n");$("#current_state2").one("hidden.bs.modal",function(){simcore_record_append_new("Close execution summary","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_examples(){wepsim_open_examples_index();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open examples","wsweb_dialogbox_open_examples();\n");$("#example1").one("hidden.bs.modal",function(){simcore_record_append_new("Close examples","wsweb_dialogbox_close_all();\n")});wsweb_scroll_record("#container-example1");simcore_record_captureInit();return true}function wsweb_dialogbox_open_help(){wepsim_open_help_index();wepsim_help_refresh();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open help","wsweb_dialogbox_open_help();\n");$("#help1").one("hidden.bs.modal",function(){simcore_record_append_new("Close help","wsweb_dialogbox_close_all();\n")});simcore_record_captureInit();return true}function wsweb_dialogbox_open_config(){wepsim_open_config_index();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open configuration","wsweb_dialogbox_open_config();\n");$("#config2").one("hidden.bs.modal",function(){simcore_record_append_new("Close configuration","wsweb_dialogbox_close_all();\n")});wsweb_scroll_record("#container-config2");simcore_record_captureInit();return true}function wsweb_dialogbox_open_state(){wepsim_dialog_current_state();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open state","wsweb_dialogbox_open_state();\n");$("#current_state1").one("hidden.bs.modal",function(){simcore_record_append_new("Close state","wsweb_dialogbox_close_all();\n")});simcore_record_captureInit();return true}function wsweb_dialogbox_open_binary_assembly(){var a=inputasm.getValue();var b=wepsim_compile_assembly(a);if(true==b){wepsim_show_binary_code("#bin2","#compile_results")}simcore_record_append_new("Open binary assembly","wsweb_dialogbox_open_binary_assembly();\n");$("#bin2").one("hidden.bs.modal",function(){simcore_record_append_new("Close binary assembly","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_binary_firmware(){var b=inputfirm.getValue();var a=wepsim_compile_firmware(b);if(true==a){wepsim_show_binary_microcode("#bin2","#compile_results");wepsim_notify_success("INFO","Please remember to recompile the assembly code if needed.")}simcore_record_append_new("Open binary firmware","wsweb_dialogbox_open_binary_firmware();\n");$("#bin2").one("hidden.bs.modal",function(){simcore_record_append_new("Close binary firmware","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_hardware_summary(){var b=simhw_active().sim_short_name;var c="examples/hardware/"+b+"/images/cpu.svg?time=20190102";var a="";wepsim_open_help_content(a);simcore_record_append_new("Open hardware summary","wsweb_dialogbox_open_hardware_summary();\n");$("#help1").one("hidden.bs.modal",function(){simcore_record_append_new("Open hardware summary","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_close_state(){$("#current_state1").modal("hide");simcore_record_append_new("Close states dialogbox","wsweb_dialogbox_close_state();\n");return true}function wsweb_dialogbox_close_all(){$("#example1").modal("hide");$("#help1").modal("hide");$("#config2").modal("hide");$("#current_state1").modal("hide");$("#current_state2").modal("hide");$("#bin2").modal("hide");simcore_record_append_new("Close all dialogboxes","wsweb_dialogbox_close_all();\n");return true}function wsweb_set_details_select(b){$("#tab"+b).trigger("click");$("#select5a").val(b);var a=$("#s5b_"+b).html();$("#select5b").html(a);simcore_record_append_new("Change select details to "+b,"wsweb_set_details_select("+b+");\n");return true}var hash_detail2action={CLOCK:function(){wepsim_execute_microinstruction()},REGISTER_FILE:function(){wsweb_set_details_select(11);show_rf_values()},CONTROL_MEMORY:function(){wsweb_set_details_select(16);show_memories_values()},CPU_STATS:function(){wsweb_set_details_select(17);show_memories_values()},MEMORY:function(){wsweb_set_details_select(14);show_memories_values()},MEMORY_CONFIG:function(){wsweb_set_details_select(18);show_memories_values()},KEYBOARD:function(){wsweb_set_details_select(12);show_memories_values()},SCREEN:function(){wsweb_set_details_select(12);show_memories_values()},IO_STATS:function(){wsweb_set_details_select(15);show_memories_values()},IO_CONFIG:function(){wsweb_set_details_select(19);show_memories_values()},FRM_EDITOR:function(){wsweb_set_details_select(20);inputfirm.refresh()},ASM_EDITOR:function(){wsweb_set_details_select(21);inputasm.refresh()},HARDWARE:function(){wsweb_set_details_select(22);$("[data-toggle=tooltip]").tooltip("hide");simcoreui_init_hw("#config_HW");var a=get_cfg("ws_idiom");i18n_update_tags("gui",a)}};function wsweb_set_details(a){if(typeof hash_detail2action[a]!=="undefined"){hash_detail2action[a]()}simcore_record_append_new("Set details to "+a,"wsweb_set_details('"+a+"');\n");return true}function wsweb_select_main(b){set_cfg("ws_mode",b);save_cfg();wepsim_change_mode(b);$("#select4").css("background-color","#F6F6F6");if("tutorial"==b){$("#select4").css("background-color","#D4DB17")}var a=$("#s4_"+b).html();$("#select4").html(a);simcore_record_append_new("Set main work mode to "+b,'wsweb_select_main("'+b+'");\n');return true}function wsweb_mode_update(b){wsweb_select_main(b);simcore_init_ui("#states_ALL","#states_BR","#io_ALL","#cpu_ALL","#config_MP","#config_IO");simcoreui_init_hw("#config_HW");var a=get_cfg("ws_idiom");i18n_update_tags("gui",a);simcore_record_append_new("Update work mode to "+b,'wsweb_mode_update("'+b+'");\n');return true}function wsweb_set_cpucu_size(a){$("#slider2b").val(a);set_ab_size("#eltos_cpu_a","#eltos_cpu_b",a);set_cfg("CPUCU_size",a);save_cfg();simcore_record_append_new("Set cpu-cu size to "+a,"wsweb_set_cpucu_size("+a+");\n");return true}function wsweb_set_c1c2_size(a){$("#slider2a").val(a);set_ab_size("#col1","#col2",a);set_cfg("C1C2_size",a);save_cfg();simcore_record_append_new("Set c1-c2 size to "+a,"wsweb_set_c1c2_size("+a+");\n");return true}function wsweb_assembly_compile(){var a=inputasm.getValue();var b=wepsim_compile_assembly(a);simcore_record_append_new("Compile assembly","wsweb_assembly_compile();\n");return true}function wsweb_firmware_compile(){var b=inputfirm.getValue();wepsim_compile_firmware(b);var a="
Please remember that after updates on the microcode, the assembly code has be re-compiled too.
";$("#asm_debugger").html(a);simcore_record_append_new("Compile firmware","wsweb_firmware_compile();\n");return true}function wsweb_save_controlmemory_to_file(){var b=get_cfg("ws_idiom");var c=i18n_get("dialogs",b,"Sure Control Memory...")+"\n\n";if(confirm(c)){var a=get_simware();var d=saveFirmware(a);if(d.trim()==""){alert("The Microcode loaded in memory is empty!\nPlease load a Microcode first in memory in order to save it.")}else{inputfirm.setValue(d)}var f=document.getElementById("inputFileNameToSaveAs").value;var e=inputfirm.getValue();wepsim_save_to_file(e,f)}simcore_record_append_new("Save control memory to file","wsweb_save_controlmemory_to_file();\n");return true}var wsweb_nfbox=null;function wsweb_notifyuser_show(c,a,b){if(c.trim()===""){c="<empty title>"}if(a.trim()===""){a="<empty message>"}$("#notifyuser1_title").html(c);$("#notifyuser1_message").html(a);wepsim_updatetime_start("#notifyuser1_footer",b/1000);wsweb_nfbox=$("#notifyuser1");wsweb_nfbox.modal("show");return true}function wsweb_notifyuser_hide(){wsweb_nfbox.modal("hide");return true}function wsweb_notifyuser_add(){if(simcore_record_isRecording()===false){return}var a=get_cfg("ws_idiom");var c={};c.cancel={label:i18n_get("gui",a,"Close"),className:"btn-danger col float-left mr-auto"};c.end={label:i18n_get("gui",a,"Save"),className:"btn-success col float-right",callback:function(){var i=$("#frm_title1").val();var e=$("#frm_message1").val();var g=$("#frm_duration1").val();var j=i.replace(/<[^>]*>/g,"");var d=""+j+"";var h=e.replace(/<[^>]*>/g,"");var k=""+h+"";var l=h.replace(new RegExp("\r?\n","g"),"");var f=parseInt(g);if(isNaN(f)){f=5000}else{f=1000*f}simcore_record_setTimeBeforeNow(500);simcore_record_append_new('Show message with title "'+d+'" and body "'+k+'".','wsweb_notifyuser_show("'+j+'", "'+l+'", "'+f+'");\n');simcore_record_setTimeBeforeNow(f);simcore_record_append_new('Close message with title "'+d+'".',"wsweb_notifyuser_hide();\n")}};var b='
');f.prepend(h.append(e.append("×")).append(m));if(d!=0){window.setTimeout(function(){h.alert("close")},d)}var g="Notification type "+a+" and title "+k+":"+m+". ";g=$("").html(g).text();simcoreui_voice_speak(g)}var simcoreui_notifications=[];function simcoreui_notifications_get(){return simcoreui_notifications}function simcoreui_notifications_reset(){simcoreui_notifications=[]}function simcoreui_notifications_add(a){simcoreui_notifications.push({title:a.title,message:a.message,type:a.type,date:a.date})}function simcoreui_notify(e,f,a,d){simcoreui_notifications_add({title:$("
").html(e).text(),message:$("
").html(f).text(),type:a,date:new Date().getTime()});simcoreui_do_notify(e,f,a,d)}function simcoreui_notify_close(){$(".alert").alert("close");simcore_record_append_new("Close all notifications","simcoreui_notify_close();\n")}function simcoreui_notify_notifications(){var e="";var d=null;e+='
';simcoreui_notify_close();simcoreui_do_notify("notifications",e,"light",0);simcore_record_append_new("Open notification list","simcoreui_notify_notifications();")};var i18n={lang:{en:"English",es:"Español",fr:"Français",kr:"한국어"},eltos:{gui:{},cfg:{},examples:{},states:{},help:{},dialogs:{},tour_intro:{}}};var tutorials={};tutorials.welcome={};tutorials.simpleusage={};function i18n_init(){for(var a in i18n.lang){for(var b in i18n.eltos){i18n.eltos[b][a]={}}tutorials.welcome[a]=[];tutorials.simpleusage[a]=[]}return true}i18n_init();function i18n_update_tags(b){var a=get_cfg("ws_idiom");i18n_update_tagsFor(b,a)}function i18n_update_tagsFor(b,c){if(typeof i18n.eltos[b]=="undefined"){return}var a=document.querySelectorAll("span");Array.from(a).forEach(function(f,d){var e=f.dataset.langkey;if(i18n.eltos[b][c][e]){f.innerHTML=i18n.eltos[b][c][e]}})}function i18n_get(a,c,b){var d=i18n.eltos[a][c][b];if(typeof d==="undefined"){d=b}return d}function i18n_get_TagFor(b,c){var a;try{a=get_cfg("ws_idiom")}catch(d){a="en"}var f=c;if(typeof i18n.eltos[b][a][c]!=="undefined"){f=i18n.eltos[b][a][c]}return f}function i18n_get_dropdown(c,d){var e="";for(var a in i18n.lang){e+=' '+a.toUpperCase()+' ('+i18n.lang[a]+")"}return e}function i18n_get_select(){var b=" ";return b}i18n.eltos.gui.es={"Loading WepSIM...":"Cargando WepSIM...",Configuration:"Configuración",MicroCode:"MicroCódigo",Assembly:"Ensamblador",Simulator:"Simulador",Examples:"Ejemplos",Load:"Cargar",Save:"Guardar",Restore:"Restaurar",Help:"Ayuda","Help Index":"Índice ayuda",Processor:"Procesador","Assembly Debugger":"Depurador de Ensamblador",Reset:"Reiniciar",Instruction:"Instrucción",Run:"Ejecutar","Hardware Summary":"Hardware Resumido",processor:"procesador",details:"detalles",microcode:"microcódigo",Signals:"Señales",Behaviors:"Comportamientos",States:"Estados","Control States":"Estados de Control",Dependencies:"Dependencias",Close:"Cerrar",Show:"Mostrar","Show Main Memory":"Mostrar Memoria Principal",compile:"compilar",Compile:"Compilar","Please write the file name":"Por favor indique el nombre de fichero","Load from this File":"Cargar de este fichero",labels:"etiquetas",addr:"dir",ess:"ección",content:"contenido",assembly:"ensamblador",instructions:"instrucciones","simulator intro 1":"Primero se ha de cargar y microcompilar el microcódigo que define el conjunto de instrucciones a usar. Puede usar un ejemplo, cargar uno desde fichero o editar uno nuevo.","simulator intro 2":"A continuación ha de cargar y compilar el código ensamblador a ser ejecutado. Puede usar un ejemplo, cargar uno desde fichero o editar uno nuevo.","simulator intro 3":"En la pantalla de simulación, puede ejecutar el microcode+assembly cargardo anteriormente. Se puede ejecutar paso a paso a nivel de ensamblador o microinstrucción.","Prev.":"Anterior",Next:"Siguiente",End:"Fin","Disable tutorial mode":"Deshabilitar modo tutorial",Comment:"Comentar",Pause:"Pausar",Play:"Reproducir",Stop:"Parar",Record:"Grabar",Recent:"Reciente",Refresh:"Refrescar"};tutorials.welcome.es.push({id:"welcome",title:"¡Bienvenidos al simulador WepSIM!",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.es.push({id:"welcome",title:"Cómo cargar algunos ejemplos.",message:"
Haga click en el botón de 'examples' y haga click en el 'título' del ejemplo que desea cargar.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.es.push({id:"welcome",title:"Cómo cargar algunos ejemplos.",message:"
Haga click en next instruction/microinstruction para ejecutar paso a paso. Haga click en run para ejecutar hasta el primer punto de ruptura o el fin del programa en ensamblador.
Haga click en el botón de configuración para configurar diversos aspectos de WepSIM para su comididad.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.es.push({id:"welcome",title:"Cómo conseguir la ayuda básica.",message:"
Haga click en el botón verde de ayuda 'help'. Puede obtener la ayuda en Spanish/English, ir al índice de la ayuda o cerrar la pantalla de ayuda.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.es.push({id:"welcome",title:"¡Bienvenido a WepSIM!",message:"
Por favor explorer las secciones de la ayuda para más información. Si hace click en el botón 'end' del tutorial entonces WepSIM cargará el primer ejemplo por usted. ¡Diviertase aprendiendo!
",code_pre:function(){},code_post:function(){load_from_example_firmware("ep:S1E1",true)},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
El primer paso es microprogramar el firmware a ser usado. Por favor use el botón de 'Microcode' para ir a la pantalla de trabajo del microcódigo.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
La pantalla de microprogramación ofrece:
El editor de microcródigo.
El microcompilador.
El resumen del hardware y la ayuda.
Una vez que el microcódigo esté listo (editado y compile sin errores) el siguiente paso el el código ensamblador.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
El segundo paso es programar el ensamblador a ser ejecutado. Por favor use el botón de 'Assembly' para ir a la pantalla de ensamblador.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
La pantalla de programación en ensamblador ofrece:
El editor para el código ensamblador.
El compilador de ensamblador.
El visualizador de mapa de memoria y ayuda.
Asegure antes de ir a la pantalla del simulador que su código este listo (editado y compilado sin errores).
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.es.push({id:"simpleusage",title:"WepSIM: microprogramar, ensamblar y simular",message:"
El tercer paso es ejecutar el código ensamblador en el ensamblador. La pantalla de simulación ofrece:
Las vista de ensamblador y hardware.
Los detalles de registros, memoria de control, memoria principal, etc.
Las acciones de reinicio, ejecución paso a paso o hasta punto de ruptura (o fin).
Este tutorial ha introducido el uso típico de WepSIM para estudiantes y profesores. ¡Disfrute con WepSIM!.
",code_pre:function(){},code_post:function(){},wait_next:100});i18n.eltos.tour_intro.es={step0:' Welcome to WepSIM! ¡Bienvenido a WepSIM!
SpanishEnglish ',step1:"WepSIM ayudará a entender mejor cómo funciona un computador: es visual, interactivo, integra interrupciones, llamadas al sistema, etc.
Nosotros realmente creemos que WepSIM es una herramienta revolucionaria. Este breve tour le muestra las partes clave de la interfaz de WepSIM.",step2:"En la esquina superior derecha está el selector de 'modo de ejecución'.
Permite seleccionar el hardware con el que trabajar (ejemplo: procesador elemental o EP). O también el tutorial inicial, recomendado para principiantes.",step3:"En la esquina superior derecha el botón de ayuda abre el panel de ayuda asociado.
El cuadro de diálogo permite el acceso a tutoriales, información, etc.",step4:"En la esquina superior izquierda, el botón de 'ejemplos' abre el panel asociado.
Hay muchos ejemplos muy útiles para el aprendizaje incremental.",step5:"En la esquina superior izquierda está el botón de configuracion que abre el cuadro de diálogo de la configuración.
Con la configuracióón se puede adaptar distintos aspectos de ejecución, interfaz de usuario/a, preferencias, etc.",step6:"¡Felicidades!. Ya conoce las partes clave de la interfaz de WepSIM. Desde el panel de 'Ayuda' puede acceder al 'Tutorial de bienvenida'. para continuar aprendiendo. "};i18n.eltos.cfg.es={General:"General","Idiom for help, examples, etc.":"Idioma para ayuda, ejemplos, etc.","Notification speed: time before disapear":"Velocidad en notificaciones: tiempo en desaparecer",Editor:"Editor","Editor theme: light or dark":"Tema de editor: claro u oscuro",Light:"Claro",Dark:"Oscuro","Editor mode: vim, emacs, etc.":"Modo de edición: vim, emacs, etc.",Execution:"Ejecución","Running speed: execution speed":"Velocidad de ejecución",Slow:"Lento",Normal:"Normal",Fast:"Veloz","Step-by-step: element in run mode":"Paso-a-paso: elemento a ejecutar de uno a uno",Instructions:"Instrucciones",Instruction:"Instrucción","µinstructions":"µinstrucciones",microInstruction:"µInstrucción","Breakpoint icon: icon to be used for breakpoints":"Icono a ser usado en puntos de ruptura","Limit instructions: number of instructions to be executed":"Límite instrucciones: número de instrucciones a ser ejecutadas","Limit instruction ticks: to limit clock ticks":"Límite ticks: limitación de ticks de reloj por instrucción","Register file":"Banco de registros","Display format":"Formato de presentación","Register file names":"Nombre de los registros",Numbers:"Números",Labels:"Etiquetas","Editable registers: edit register file values":"Registros editables: editar los valores de los registros","Circuitry simulation":"Circuitería","Data-path color":"Color del camino de datos","Signal color":"Color de las seńales activas","Show by value or by activation":"Mostrar por valor o por activación",Value:"Valor",Activation:"Activación","Interactive mode: signal value can be updated":"Modo interactivo: valores de las seńales puede actualizarse","Quick interactive mode: quick update of signal value":"Modo interactivo-rápido: actualización rápida de valores de seńales","WepSIM User Interface Skin":"Variante de Interfaz de Usuario para WepSIM","(example)":"(ejemplo)",Accesibility:"Accesibilidad","Active voice: external voice control":"Activar voz: control por voz (externo)","Verbalization: textual or mathematical":"Tipo de verbalizar: texto o matem&aacutre;tica","Enable experimental features":"Habilitar características experimentales"};i18n.eltos.help.es={"Welcome tutorial":"Tutorial de bienvenida",help_01_01:"Abre el tutorial de bienvenida","Simple usage tutorial":"Tutorial simple de uso",help_01_02:"Tutorial de uso simple, ejemplo básico para microprogramar y programar en ensamblador","Simulator: firmware":"Simulador: microcódigo",help_02_01:"Descripción de cómo trabajar en el simulador con el microcódigo","Microcode format":"Formato del microcódigo",help_02_02:"Sintáxis del microcódigo usado","Simulator: assembly":"Simulador: ensamblador",help_02_03:"Descripción de cómo trabajar en el simulador con el ensamblador","Assembly format":"Formato del ensamblador",help_02_04:"Sintáxis del ensamblador","Simulator: execution":"Simulador: ejecución",help_02_05:"Descripción de cómo ejecutar en el simulador el ensamblador y microcódigo","Simulated architecture":"Arquitectura del simulador",help_03_01:"Descripción de la arquitectura del procesador simulado","Simulated signals":"Señales simuladas",help_03_02:"Resumen de las señales principales del procesador elemental","Hardware summary":"Resumen del Hardware",help_03_03:"Resumen del hardware del procesador elemental simulado","License, platforms, etc.":"Licencia, plataformas, etc.",help_04_01:"Licencia de WepSIM, plataformas disponibles, tecnologías usadas",Authors:"Autores",help_04_02:"Autores de WepSIM"};i18n.eltos.states.es={States:"Estados",Current:"Actual","Current State":"Estado Actual",History:"Historia",None:"Ninguno","Empty history":"Historia vacía","Empty (only modified values are shown)":"Vacío (solo se muestra los valores modificados)",Differences:"Diferencias","differences with clipboard state":"diferencias con estado en portapapeles","Meets the specified requirements":"Iguales (cumple los requisitos)",history:"historial",Add:"Añadir","'Current State' to History":"'Estado Actual' al historial",Check:"Comprobar",Copy:"Copiar","to clipboard":"al portapapeles",Checkpoint:"Checkpoint","File name":"Nombre de fichero","Tag for checkpoint":"Etiqueta para checkpoint","File to be loaded":"Fichero a cargar","Save to File":"Guardar a fichero","State(s) to checkpoint":"Estados para checkpoint","Record to checkpoint":"Grabación para checkpoint"};i18n.eltos.examples.es={"addv + seqv.":"addv + seqv.","Alloc.s":"Alloc.s","Dummy instruction":"Instrucción vacía",Exception:"Excepción",Instructions:"Instrucciones",Interruptions:"Interrupciones","Int. + syscall + except.":"Int. + syscall + excep.","I/O":"E/S",Looping:"Blucles","madd, mmul, mxch":"madd, mmul, mxch","Masks & shift":"Máscaras y desplazamientos",Matrix:"Matriz","Memory access":"Acceso a memoria","SC 1, 4-5, 8, 11-12":"SC 1, 4-5, 8, 11-12","strlen_2 + skipasciicode_2":"strlen_2 + skipasciicode_2",Subrutine:"Subrutina","syscall 1, 4-5, 8, 11-12":"syscall 1, 4-5, 8, 11-12","System call":"Llamada a systema",Threads:"Hilos",Vector:"Vector",example_04_01:"Ejemplo avanzado con interrupciones, llamada al sistema y excepciones.",example_05_01:"Extensiones Específicas de Aplicación: addv + seqv.",example_05_03:"Extensiones Específicas de Aplicación: madd + mmul + mxch.",example_05_02:"Extensiones Específicas de Aplicación: strlen_2 + skipasciicode_2.",example_03_01:"Ejemplo Instructive con excepción de coma flotante.",example_03_02:"Ejemplo Instructive con interrupciones: fetch, RETI y .ktext/.kdata.",example_03_03:"Ejemplo Instructive con llamada al sistema.",example_04_04:"Examplo de malloc + free.",example_04_02:"Examplo de llamada a sistema para imprimir/leer enteros y string.",example_04_03:"Examplo de hilos.",example_03_01b:"Examplo con excepción de coma flotante.",example_03_02b:"Examplo con interrupciones: fetch, RETI y .ktext/.kdata.",example_02_01:"Examplo con acceso con E/S programada y segmento de .text/.data básico.",example_03_03b:"Examplo con llamada a sistema.",example_02_02:"Ejemplo extendido con más instrucciones y E/S (teclado y pantalla).",example_02_04:"Ejemplo extendido con subrutina y matriz.",example_02_03:"Ejemplo extendido con máscaras, desplazamiento y segmentos básicos.",example_01_01:"Ejemplo simple con fetch, instrucciones artiméticas y segmentos básicos.",example_01_04:"Ejemplo simple con fetch, salto y segmento básico de .text/.data.",example_01_03:"Ejemplo simple con fetch, salto y segmento básico de .text.",example_01_02:"Ejemplo simple con fetch, acceso a memoria, y segmento básico de .text/.data.",example_06_01:"Ejemplo de prueba.",Advanced:"Avanzado",Initial:"Inicial",Intermediate:"Intermedio",Laboratory:"Laboratorio","Operating Systems":"Sistemas Operativos",Special:"Especial","Load Assembly only":"Cargar Ensamblador solo","Load Firmware only":"Cargar Firmware solo","Copy reference to clipboard":"Copiar referencia al portapapeles","No examples available...":"No examples are available for the selected hardware","Simple example":"Ejemplo simple."};i18n.eltos.dialogs.es={"Show Notifications":"Mostrar notificaciones","Show/Hide RecordBar":"Mostrar/Ocultar grabación","Show/Hide ActionBar":"Mostrar/Ocultar barra","Show/Hide Slider":"Mostrar/Ocultar sliders","Initial intro":"Intro inicial","About WepSIM":"Sobre WepSIM",Title:"Título",Message:"Mensaje",Duration:"Duración","Confirm remove record...":"¿Seguro que quiere borrar la grabación actual?","Close or Reset...":"Por favor haga click en Cerrar para mantener la grabación o en Reiniciar para borrarla.","Sure Control Memory...":"¿Seguro que quiere salvar el contenido actual de la memoria de control en lugar del contenido del editor?.",Close:"Cerrar"};i18n.eltos.gui.en={"Loading WepSIM...":"Loading WepSIM...",Configuration:"Configuration",MicroCode:"MicroCode",Assembly:"Assembly",Simulator:"Simulator",Examples:"Examples",Load:"Load",Save:"Save",Restore:"Restore",Help:"Help","Help Index":"Help Index",Processor:"Processor","Assembly Debugger":"Assembly Debugger",Reset:"Reset",Instruction:"Instruction",Run:"Run","Hardware Summary":"Hardware Summary",processor:"processor",details:"details",microcode:"microcode",Signals:"Signals",Behaviors:"Behaviors",States:"States","Control States":"Control States",Dependencies:"Dependencies",Close:"Close",Show:"Show","Show Main Memory":"Show Main Memory",compile:"compile",Compile:"Compile","Please write the file name":"Please write the file name","Load from this File":"Load from this File",labels:"labels",addr:"addr",ess:"ess",content:"content",assembly:"assembly",instructions:"instructions","simulator intro 1":"First, you are going to load and microcompile the microcode that defines the instruction set to be used. You can use an example, load it from a file or you can edit a new one.","simulator intro 2":"Next, you need to load and compile the assembly code to be executed. You can use an example, load it from a file or you can edit a new one.","simulator intro 3":"Finally, in the simulator you are able to execute the microcode plus assembly loaded before. It can be executed step by step at microinstruction level or assembly instruction level.","Prev.":"Prev.",Next:"Next",End:"End","Disable tutorial mode":"Disable tutorial mode",Comment:"Comment",Pause:"Pause",Play:"Play",Stop:"Stop",Record:"Record",Recent:"Recent",Refresh:"Refresh"};tutorials.welcome.en.push({id:"welcome",title:"Welcome to the WepSIM simulator!",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.en.push({id:"welcome",title:"How to load some example.",message:"
Click in the 'example' button, then click in the example 'title' name. Then the example for microcode and assembly is loaded and microcompiled and compiled.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.en.push({id:"welcome",title:"How to execute an example.",message:"
Click on next instruction/microinstruction to execute step by step. Click on run button to execute until the first breakpoint or the end of the assembly program.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.en.push({id:"welcome",title:"How to configure WepSIM.",message:"
Click in the 'configuration' button and users are able to customize different parts of WepSIM.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.en.push({id:"welcome",title:"How to get the basic help.",message:"
Please click in the green 'help' button to reach the help dialog. You are able to switch idiom (Spanish/English), go to the help index, or close the help dialog.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.en.push({id:"welcome",title:"Welcome to WepSIM!",message:"
Please explorer the help sections for more information. If you click on the end button of this tutorial, WepSIM is going to load the first example for you. Enjoy!
",code_pre:function(){},code_post:function(){load_from_example_firmware("ep:S1E1",true)},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The first step is to microprogramming the firmware to be used. Please use the 'Microcode' button to switch to the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The microprogramming screen provides:
The editor for the microcode.
The microcompiler.
The hardware summary and help.
Once your code is ready (compiled without errors), next step is to go to the assembly screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The second step is to programming the assembly to be executed. Please use the 'Assembly' button from both, the simulator screen or the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The programming screen provides:
The editor for the assembly code.
The assembly compiler.
The memory map viewer and help.
Once your assebly code is ready (edited and compiled without errors) next step is to go into the simulation screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.en.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The third step is to execute the assembly code in the simulator. The simulator screen provides:
The assembly and hardware view.
The detail view of registers, control memory, main memory, etc.
The reset, step by step or run until breakpoint/end actions.
This tutorial has introduced the typical usage of WepSIM for students and teachers. Enjoy WepSIM!
",code_pre:function(){},code_post:function(){},wait_next:100});i18n.eltos.tour_intro.en={step0:' Welcome to WepSIM! ¡Bienvenido a WepSIM!
SpanishEnglish ',step1:"WepSIM helps to better understand how a computer works: it is visual, interactive, integrates from signals up to interruptions, system calls, exceptions, etc.
We really believe WepSIM is a revolutionary teaching tool. This brief tour introduces the key elements of its interface.",step2:"This button on the top-right let users choose the 'execution mode'.
For example, the hardware to work with (e.g. the elemental processor or EP). Or the tutorial mode, recommended at the beginning ;-).",step3:"On the top-right, the 'help' button opens the associated dialog.
The help dialog summarizes the tutorials, descriptions, information, etc.",step4:"And on the left, the 'examples' button open the example dialog.
There are many examples that can be used to learn incrementally.",step5:"On the top-left, the 'configuration' button opens the configuration dialog.
It let users to adapt several aspects of the execution, user interface, preferences, etc.",step6:"Congrat! You know the key elements in the WepSIM interface. From the 'Help' dialog you can access the 'Welcome tutorial' to continue learning. "};i18n.eltos.cfg.en={General:"General","Idiom for help, examples, etc.":"Idiom for help, examples, etc.","Notification speed: time before disapear":"Notification speed: time before disapear",Editor:"Editor","Editor theme: light or dark":"Editor theme: light or dark",Light:"Light",Dark:"Dark","Editor mode: vim, emacs, etc.":"Editor mode: vim, emacs, etc.",Execution:"Execution","Running speed: execution speed":"Running speed: execution speed",Slow:"Slow",Normal:"Normal",Fast:"Fast","Step-by-step: element in run mode":"Step-by-step: element in run mode",Instructions:"Instructions",Instruction:"Instruction","µinstructions":"µinstructions",microInstruction:"µInstruction","Breakpoint icon: icon to be used for breakpoints":"Breakpoint icon: icon to be used for breakpoints","Limit instructions: number of instructions to be executed":"Limit instructions: number of instructions to be executed","Limit instruction ticks: to limit clock ticks":"Limit instruction ticks: clock ticks limit per instruction","Register file":"Register file","Display format":"Display format","Register file names":"Register file names",Numbers:"Numbers",Labels:"Labels","Editable registers: edit register file values":"Editable registers: edit register file values","Circuitry simulation":"Circuitry simulation","Data-path color":"Data-path color","Signal color":"Signal color","Show by value or by activation":"Show by value or by activation",Value:"Value",Activation:"Activation","Interactive mode: signal value can be updated":"Interactive mode: signal value can be updated","Quick interactive mode: quick update of signal value":"Quick interactive mode: quick update of signal value","WepSIM User Interface Skin":"WepSIM User Interface Skin","(example)":"(example)",Accesibility:"Accesibility","Active voice: external voice control":"Active voice: external voice control","Verbalization: textual or mathematical":"Verbalization: textual or mathematical","Enable experimental features":"Enable experimental features"};i18n.eltos.help.en={"Welcome tutorial":"Welcome tutorial",help_01_01:"Open the welcome tutorial","Simple usage tutorial":"Simple usage tutorial",help_01_02:"Open the simple usage tutorial, for microprogramming and assembly programming","Simulator: firmware":"Simulator: firmware",help_02_01:"How to work with the firmware to be loaded into the control memory","Microcode format":"Microcode format",help_02_02:"Syntax of the microcode used","Simulator: assembly":"Simulator: assembly",help_02_03:"How to work with the assembly that use the aforementioned firmware","Assembly format":"Assembly format",help_02_04:"Syntax of the assembly elements","Simulator: execution":"Simulator: execution",help_02_05:"How the simulator can execute the assembly and firmware","Simulated architecture":"Simulated architecture",help_03_01:"Description of the simulated processor architecture","Simulated signals":"Simulated signals",help_03_02:"Main signals summary of the simulated elemental processor","Hardware summary":"Hardware summary",help_03_03:"Reference card for the simulated elemental processor hardware","License, platforms, etc.":"License, platforms, etc.",help_04_01:"WepSIM license, supported platforms, technologies used",Authors:"Authors",help_04_02:"Authors of WepSIM"};i18n.eltos.states.en={States:"States",Current:"Current","Current State":"Current State",History:"History",None:"None","Empty history":"Empty history","Empty (only modified values are shown)":"Empty (only modified values are shown)",Differences:"Differences","differences with clipboard state":"differences with clipboard state","Meets the specified requirements":"Meets the specified requirements",history:"history",Add:"Add","'Current State' to History":"'Current State' to History",Check:"Check",Copy:"Copy","to clipboard":"to clipboard",Checkpoint:"Checkpoint","File name":"File name","Tag for checkpoint":"Tag for checkpoint","File to be loaded":"File to be loaded","Save to File":"Save to File","State(s) to checkpoint":"State(s) to checkpoint","Record to checkpoint":"Record to checkpoint"};i18n.eltos.examples.en={"addv + seqv.":"addv + seqv.","Alloc.s":"Alloc.s","Dummy instruction":"Dummy instruction",Exception:"Exception",Instructions:"Instructions",Interruptions:"Interruptions","Int. + syscall + except.":"Int. + syscall + except.","I/O":"I/O",Looping:"Looping","madd, mmul, mxch":"madd, mmul, mxch","Masks & shift":"Masks & shift",Matrix:"Matrix","Memory access":"Memory access","SC 1, 4-5, 8, 11-12":"SC 1, 4-5, 8, 11-12","strlen_2 + skipasciicode_2":"strlen_2 + skipasciicode_2",Subrutine:"Subrutine","syscall 1, 4-5, 8, 11-12":"syscall 1, 4-5, 8, 11-12","System call":"System call",Threads:"Threads",Vector:"Vector",example_04_01:"Advanced example with interruption, system call, and exception.",example_05_01:"Application-specific extension: addv + seqv.",example_05_03:"Application-specific extension: madd + mmul + mxch.",example_05_02:"Application-specific extension: strlen_2 + skipasciicode_2.",example_03_01:"Instructive example with floating point exception.",example_03_02:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata.",example_03_03:"Instructive example with system call support.",example_04_04:"Example of malloc + free.",example_04_02:"Example of syscall for printing/reading integer and string.",example_04_03:"Example of threads.",example_03_01b:"Example with floating point exception.",example_03_02b:"Example with interruptions support: fetch, RETI, and .ktext/.kdata.",example_02_01:"Example with programmed I/O access, and basic .text/.data segment.",example_03_03b:"Example with system call support.",example_02_02:"Extended example with more instructions and I/O (keyboard, display).",example_02_04:"Extended example with subrutine and matrix.",example_02_03:"More extended example with masks, shift, and basic .text/.data segment.",example_01_01:"Simple example with fetch, arithmetic instructions, and basic .text segment.",example_01_04:"Simple example with fetch, branch, and basic .text/.data segment.",example_01_03:"Simple example with fetch, branch, and basic .text segment.",example_01_02:"Simple example with fetch, memory access, and basic .text/.data segment.",example_06_01:"Test example.",Advanced:"Advanced",Initial:"Initial",Intermediate:"Intermediate",Laboratory:"Laboratory","Operating Systems":"Operating Systems",Special:"Special","Load Assembly only":"Load Assembly only","Load Firmware only":"Load Firmware only","Copy reference to clipboard":"Copy reference to clipboard","No examples available...":"No examples are available for the selected hardware","Simple example":"Simple example."};i18n.eltos.dialogs.en={"Show Notifications":"Show Notifications","Show/Hide RecordBar":"Show/Hide RecordBar","Show/Hide ActionBar":"Show/Hide ActionBar","Show/Hide Slider":"Show/Hide Slider","Initial intro":"Initial intro","About WepSIM":"About WepSIM",Title:"Title",Message:"Message",Duration:"Duration","Confirm remove record...":"Do you want to remove the actual record?","Close or Reset...":"Please click on Close to keep it, or click on the Reset button to remove it.","Sure Control Memory...":"Do you want me to save the current Control Memory contents rather than the editor contents?.",Close:"Close"};i18n.eltos.gui.fr={"Loading WepSIM...":"Chargement de WepSIM ...",Configuration:"Configuration",MicroCode:"MicroCode",Assembly:"Assembly",Simulator:"Simulator",Examples:"Exemples",Load:"Charger",Save:"Enregistrer",Restore:"Restaurer",Help:"Aide","Help Index":"Index de l'aide",Processor:"Processeur","Assembly Debugger":"Débogueur d'assemblage",Reset:"Réinitialiser",Instruction:"Instruction",Run:"Exécuter","Hardware Summary":"Résumé du matériel.",processor:"processeur",details:"détails",microcode:"microcode",Signals:"Signaux",Behaviors:"Comportements",States:"États","Control States":"États de contrôle",Dependencies:"Dépendances",Close:"Fermer",Show:"Afficher","Show Main Memory":"Afficher la mémoire principale",compile:"compiler",Compile:"Compiler","Please write the file name":"Merci d'écrire le nom du fichier","Load from this File":"Charger à partir de ce fichier",labels:"étiquettes",addr:"addr",ess:"ess",content:"content",assembly:"assembly",instructions:"instructions","simulator intro 1":"Tout d'abord, vous vont charger et micro-compiler t Le microcode qui définit le jeu d’instructions à utiliser. Vous pouvez utiliser un exemple, le charger à partir d’un fichier ou en éditer un nouveau.","simulator intro 2":"Ensuite, vous devez charger et compiler le code d'assemblage à exécuter. Vous pouvez utiliser un exemple: le charger à partir d'un fichier ou en éditer un nouveau.","simulator intro 3":"Enfin, dans le simulateur, vous pouvez exécuter le microcode. plus assemblée chargée avant. Il peut être exécuté pas à pas au niveau de la micro-instruction ou de l’instruction d’assemblage.","Prev.":"Prev.",Next:"Next",End:"End","Disable tutorial mode":"Désactiver le mode tutoriel",Comment:"Commentaire",Pause:"Pause",Play:"Lecture",Stop:"Arrêt",Record:"Enregistrement",Recent:"Récent",Refresh:"Actualiser"};tutorials.welcome.fr.push({id:"welcome",title:"Welcome to the WepSIM simulator!",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.fr.push({id:"welcome",title:"How to load some example.",message:"
Click in the 'example' button, then click in the example 'title' name. Then the example for microcode and assembly is loaded and microcompiled and compiled.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.fr.push({id:"welcome",title:"How to execute an example.",message:"
Click on next instruction/microinstruction to execute step by step. Click on run button to execute until the first breakpoint or the end of the assembly program.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.fr.push({id:"welcome",title:"How to configure WepSIM.",message:"
Click in the 'configuration' button and users are able to customize different parts of WepSIM.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.fr.push({id:"welcome",title:"How to get the basic help.",message:"
Please click in the green 'help' button to reach the help dialog. You are able to switch idiom (Spanish/English), go to the help index, or close the help dialog.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.fr.push({id:"welcome",title:"Welcome to WepSIM!",message:"
Please explorer the help sections for more information. If you click on the end button of this tutorial, WepSIM is going to load the first example for you. Enjoy!
",code_pre:function(){},code_post:function(){load_from_example_firmware("ep:S1E1",true)},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The first step is to microprogramming the firmware to be used. Please use the 'Microcode' button to switch to the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The microprogramming screen provides:
The editor for the microcode.
The microcompiler.
The hardware summary and help.
Once your code is ready (compiled without errors), next step is to go to the assembly screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The second step is to programming the assembly to be executed. Please use the 'Assembly' button from both, the simulator screen or the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The programming screen provides:
The editor for the assembly code.
The assembly compiler.
The memory map viewer and help.
Once your assebly code is ready (edited and compiled without errors) next step is to go into the simulation screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.fr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The third step is to execute the assembly code in the simulator. The simulator screen provides:
The assembly and hardware view.
The detail view of registers, control memory, main memory, etc.
The reset, step by step or run until breakpoint/end actions.
This tutorial has introduced the typical usage of WepSIM for students and teachers. Enjoy WepSIM!
",code_pre:function(){},code_post:function(){},wait_next:100});i18n.eltos.tour_intro.fr={step0:' Welcome to WepSIM! ¡Bienvenido a WepSIM!
SpanishEnglish ',step1:"WepSIM helps to better understand how a computer works: it is visual, interactive, integrates from signals up to interruptions, system calls, exceptions, etc.
We really believe WepSIM is a revolutionary teaching tool. This brief tour introduces the key elements of its interface.",step2:"This button on the top-right let users choose the 'execution mode'.
For example, the hardware to work with (e.g. the elemental processor or EP). Or the tutorial mode, recommended at the beginning ;-).",step3:"On the top-right, the 'help' button opens the associated dialog.
The help dialog summarizes the tutorials, descriptions, information, etc.",step4:"And on the left, the 'examples' button open the example dialog.
There are many examples that can be used to learn incrementally.",step5:"On the top-left, the 'configuration' button opens the configuration dialog.
It let users to adapt several aspects of the execution, user interface, preferences, etc.",step6:"Congrat! You know the key elements in the WepSIM interface. From the 'Help' dialog you can access the 'Welcome tutorial' to continue learning. "};i18n.eltos.cfg.fr={General:"Général","Idiom for help, examples, etc.":"Idiome pour l'aide, exemples, etc.","Notification speed: time before disapear":"Vitesse de notification: heure avant la disparition",Editor:"L'éditeur","Editor theme: light or dark":"Thème de l'éditeur: clair ou sombre",Light:"Clair",Dark:"Sombre","Editor mode: vim, emacs, etc.":"Mode éditeur: vim, emacs, etc.",Execution:"Exécution","Running speed: execution speed":"Vitesse d'exécution: vitesse d'exécution",Slow:"Lent",Normal:"Normal",Fast:"Rapide","Step-by-step: element in run mode":"Pas à pas: élément en mode d'exécution",Instructions:"Instructions",Instruction:"Instruction","µinstructions":"µinstructions",microInstruction:"µInstruction","Breakpoint icon: icon to be used for breakpoints":"Icône de point d'arrêt: icône à utiliser pour les points d'arrêt","Limit instructions: number of instructions to be executed":"Instructions limites: nombre d'instructions à exécuter","Limit instruction ticks: to limit clock ticks":"Limites des ticks d'instruction: nombre de ticks d'horloge nstruction","Register file":"Enregistrer un fichier","Display format":"Format d'affichage","Register file names":"Enregistrer un nom de fichier",Numbers:"Numéros",Labels:"Étiquettes","Editable registers: edit register file values":"Registres modifiables: modifier les valeurs du fichier de registre","Circuitry simulation":"Simulation de circuit","Data-path color":"Couleur du chemin de données","Signal color":"Couleur du signal","Show by value or by activation":"Afficher par valeur ou par activation",Value:"Valeur",Activation:"Activation","Interactive mode: signal value can be updated":"Mode interactif: la valeur du signal peut être mise à jour","Quick interactive mode: quick update of signal value":"Mode interactif rapide: mise à jour rapide de la valeur du signal","WepSIM User Interface Skin":"Apparence de l'interface utilisateur WepSIM","(example)":"(exemple)",Accesibility:"Accessibilité","Active voice: external voice control":"Voix active: commande vocale externe","Verbalization: textual or mathematical":"Verbalisation: textuelle ou mathématique","Enable experimental features":"Activer experim caractéristiques entales"};i18n.eltos.help.fr={"Welcome tutorial":"Tutoriel de bienvenue",help_01_01:"Ouvrez le tutoriel de bienvenue","Simple usage tutorial":"Tutoriel d'utilisation simple",help_01_02:"Ouvrez le tutoriel d'utilisation simple, pour la microprogrammation et l'assemblage. programmation","Simulator: firmware":"Simulateur: firmware",help_02_01:"Comment utiliser le firmware à charger dans la mémoire de contrôle","Microcode format":"Format du microcode",help_02_02:"Syntaxe du microcode utilisé","Simulator: assembly":"Simulateur: assemblage",help_02_03:"Comment utiliser l'assemblage utilisant le microprogramme susmentionné","Assembly format":"Format d'assemblage",help_02_04:"Syntaxe des éléments d'assemblage","Simulator: execution":"Simulateur: exécution",help_02_05:"Comment le simulateur peut exécuter l'assemblage et le firmware","Simulated architecture":"Architecture simulée",help_03_01:"Description de l'architecture du processeur simulé","Simulated signals":"Signaux simulés",help_03_02:"Résumé des signaux principaux du processeur élémentaire simulé","Hardware summary":"Résumé du matériel",help_03_03:"Carte de référence pour le matériel du processeur élémentaire simulé","License, platforms, etc.":"Licence, plates-formes, etc.",help_04_01:"Licence WepSIM, prise en charge plateformes, technologies utilisées",Authors:"Auteurs",help_04_02:"Auteurs de WepSIM"};i18n.eltos.states.fr={States:"États",Current:"Actuel","Current State":"État actuel",History:"Histoire",None:"Aucune","Empty history":"Historique vide","Empty (only modified values are shown)":"Vide (seules les valeurs modifiées sont affichées)",Differences:"Différences","differences with clipboard state":"Différences avec l'état du presse-papiers","Meets the specified requirements":"Répond aux exigences spécifiées",history:"historique",Add:"Ajouter","'Current State' to History":"'État actuel' à l'historique",Check:"Vérifier",Copy:"Copier","to clipboard":"dans le presse-papiers",Checkpoint:"Point de contrôle","File name":"Nom de fichier","Tag for checkpoint":"Balise pour point de contrôle","File to be loaded":"Fichier à charger","Save to File":"Enregistrer dans un fichier","State(s) to checkpoint":"État (s) au point de contrôle","Record to checkpoint":"Enregistrer au point de contrôle"};i18n.eltos.examples.fr={"addv + seqv.":"addv + seqv.","Alloc.s":"Alloc.s","Dummy instruction":"Instruction fictive",Exception:"Exception",Instructions:"Instructions",Interruptions:"Interruptions","Int. + syscall + except.":"Int. + syscall + except.","I/O":"I/O",Looping:"En boucle","madd, mmul, mxch":"madd, mmul, mxch","Masks & shift":"Masques et décalage",Matrix:"Matrice","Memory access":"Accès mémoire","SC 1, 4-5, 8, 11-12":"SC 1, 4-5, 8, 11-12","strlen_2 + skipasciicode_2":"strlen_2 + skipasciicode_2",Subrutine:"Subrutine","syscall 1, 4-5, 8, 11-12":"Appel système 1, 4-5, 8, 11-12","System call":"Appel système",Threads:"Fils",Vector:"Vecteur",example_04_01:"Exemple avancé avec interruption, appel système et exception.",example_05_01:"Extension spécifique à l'application: addv + seqv.",example_05_03:"Extension spécifique à l'application: madd + mmul + mxch.",example_05_02:"Extension spécifique à l'application: strlen_2 + skipasciicode_2.",example_03_01:"Exemple Instructive avec exception de virgule flottante.",example_03_02:"Exemple Instructive avec prise en charge des interruptions: fetch, RETI et .ktext/.kdata.",example_03_03:"Exemple Instructive avec prise en charge des appels système.",example_04_04:"Exemple de malloc + free.",example_04_02:"Exemple de appel système pour l'impression/la lecture de nombres entiers et de chaînes.",example_04_03:"Exemple de fils.",example_03_01b:"Exemple avec exception en virgule flottante.",example_03_02b:"Exemple avec prise en charge des interruptions: fetch, RETI et .ktext/.kdata.",example_02_01:"Exemple avec accès I/O programmé et segment de base .text/.data.",example_03_03b:"Exemple avec prise en charge des appels système.",example_02_02:"Exemple étendu avec davantage d'instructions et d'E/S (clavier, affichage).",example_02_04:"Exemple étendu avec sous-programme et matrice.",example_02_03:"Exemple plus détaillé avec masques, décalage et segment de base .text/.data.",example_01_01:"Exemple simple avec récupération, instructions arithmétiques et segment de base .text.",example_01_04:"Exemple simple avec récupération, branche et segment de base .text/.data.",example_01_03:"Exemple simple avec fetch, branche et segment de base .text.",example_01_02:"Exemple simple avec récupération, accès à la mémoire et .text/.data de base segment.",example_06_01:"Exemple de test.",Advanced:"Avancé",Initial:"Initiale",Intermediate:"Intermédiaire",Laboratory:"Laboratoire","Operating Systems":"Systèmes d'exploitation",Special:"Spécial","Load Assembly only":"Charger uniquement l'assemblage","Load Firmware only":"Charger uniquement le microprogramme","Copy reference to clipboard":"Copier la référence dans le presse-papiers","No examples available...":"Aucun exemple disponible pour le matériel sélectionné","Simple example":"Exemple simple"};i18n.eltos.dialogs.fr={"Show Notifications":"Afficher les notifications","Show/Hide RecordBar":"Afficher/masquer la barre d'enregistrement","Show/Hide ActionBar":"Afficher/masquer la barre d'action","Show/Hide Slider":"Afficher/masquer le curseur","Initial intro":"Intro initiale","About WepSIM":"À propos de WepSIM",Title:"Titre",Message:"Message",Duration:"Durée","Confirm remove record...":"Voulez-vous supprimer l'enregistrement en cours?","Close or Reset...":"Cliquez sur Fermer pour le conserver, ou cliquez sur le bouton Réinitialiser pour le supprimer.","Sure Control Memory...":"Voulez-vous que je sauvegarde le contenu actuel de la mémoire de contrôle plutôt que le contenu de l'éditeur?.",Close:"Fermer"};i18n.eltos.gui.kr={"Loading WepSIM...":"WepSIM로드 중...",Configuration:"구성",MicroCode:"마이크로 코드",Assembly:"어셈블리",Simulator:"모의 실험 장치",Examples:"예제들",Load:"하중",Save:"구하다",Restore:"복원",Help:"도움","Help Index":"도움말 색인",Processor:"프로세서","Assembly Debugger":"어셈블리 디버거",Reset:"다시 놓기",Instruction:"교수",Run:"조업","Hardware Summary":"하드웨어 요약",processor:"프로세서",details:"세부",microcode:"마이크로 코드",Signals:"신호",Behaviors:"행동",States:"주","Control States":"제어 상태",Dependencies:"종속성",Close:"닫기",Show:"보여주기","Show Main Memory":"주 메모리보기",compile:"보여주기",Compile:"보여주기","Please write the file name":"파일 이름을 적어주세요.","Load from this File":"이 파일에서로드",labels:"라벨",addr:"주소",ess:"",content:"함유량",assembly:"어셈블리",instructions:"명령","simulator intro 1":"먼저, 사용할 명령어 세트를 정의하는 마이크로 코드를로드하고 마이크로 컴파일합니다 You can use an example, load it from a file or you can edit a new one.","simulator intro 2":"다음으로, 실행할 어셈블리 코드를로드하고 컴파일해야합니다. You can use an example, load it from a file or you can edit a new one.","simulator intro 3":"마지막으로 시뮬레이터에서 이전에로드 된 마이크로 코드 플러스 어셈블리를 실행할 수 있습니다. It can be executed step by step at microinstruction level or assembly instruction level.","Prev.":"너무 이른",Next:"다음 것",End:"끝","Disable tutorial mode":"자습서 모드 사용 안함",Comment:"의견을 남기다",Pause:"일시 정지하다",Play:"연주하다",Stop:"그치다",Record:"기록하다",Recent:"충적세",Refresh:"새롭게 하다"};tutorials.welcome.kr.push({id:"welcome",title:"Welcome to the WepSIM simulator!",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.kr.push({id:"welcome",title:"How to load some example.",message:"
Click in the 'example' button, then click in the example 'title' name. Then the example for microcode and assembly is loaded and microcompiled and compiled.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.kr.push({id:"welcome",title:"How to execute an example.",message:"
Click on next instruction/microinstruction to execute step by step. Click on run button to execute until the first breakpoint or the end of the assembly program.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.kr.push({id:"welcome",title:"How to configure WepSIM.",message:"
Click in the 'configuration' button and users are able to customize different parts of WepSIM.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.kr.push({id:"welcome",title:"How to get the basic help.",message:"
Please click in the green 'help' button to reach the help dialog. You are able to switch idiom (Spanish/English), go to the help index, or close the help dialog.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.welcome.kr.push({id:"welcome",title:"Welcome to WepSIM!",message:"
Please explorer the help sections for more information. If you click on the end button of this tutorial, WepSIM is going to load the first example for you. Enjoy!
",code_pre:function(){},code_post:function(){load_from_example_firmware("ep:S1E1",true)},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The first step is to microprogramming the firmware to be used. Please use the 'Microcode' button to switch to the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The microprogramming screen provides:
The editor for the microcode.
The microcompiler.
The hardware summary and help.
Once your code is ready (compiled without errors), next step is to go to the assembly screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The second step is to programming the assembly to be executed. Please use the 'Assembly' button from both, the simulator screen or the microcode screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The programming screen provides:
The editor for the assembly code.
The assembly compiler.
The memory map viewer and help.
Once your assebly code is ready (edited and compiled without errors) next step is to go into the simulation screen.
",code_pre:function(){},code_post:function(){},wait_next:100});tutorials.simpleusage.kr.push({id:"simpleusage",title:"Simple WepSIM experience: microprogramming and programming",message:"
The third step is to execute the assembly code in the simulator. The simulator screen provides:
The assembly and hardware view.
The detail view of registers, control memory, main memory, etc.
The reset, step by step or run until breakpoint/end actions.
This tutorial has introduced the typical usage of WepSIM for students and teachers. Enjoy WepSIM!
",code_pre:function(){},code_post:function(){},wait_next:100});i18n.eltos.tour_intro.kr={step0:' Welcome to WepSIM! ¡Bienvenido a WepSIM!
SpanishEnglish ',step1:"WepSIM helps to better understand how a computer works: it is visual, interactive, integrates from signals up to interruptions, system calls, exceptions, etc.
We really believe WepSIM is a revolutionary teaching tool. This brief tour introduces the key elements of its interface.",step2:"This button on the top-right let users choose the 'execution mode'.
For example, the hardware to work with (e.g. the elemental processor or EP). Or the tutorial mode, recommended at the beginning ;-).",step3:"On the top-right, the 'help' button opens the associated dialog.
The help dialog summarizes the tutorials, descriptions, information, etc.",step4:"And on the left, the 'examples' button open the example dialog.
There are many examples that can be used to learn incrementally.",step5:"On the top-left, the 'configuration' button opens the configuration dialog.
It let users to adapt several aspects of the execution, user interface, preferences, etc.",step6:"Congrat! You know the key elements in the WepSIM interface. From the 'Help' dialog you can access the 'Welcome tutorial' to continue learning. "};i18n.eltos.cfg.kr={General:"일반","Idiom for help, examples, etc.":"Idiom for help, examples, etc.","Notification speed: time before disapear":"Notification speed: time before disapear",Editor:"편집자","Editor theme: light or dark":"Editor theme: light or dark",Light:"빛",Dark:"어두운","Editor mode: vim, emacs, etc.":"Editor mode: vim, emacs, etc.",Execution:"실행","Running speed: execution speed":"실행 속도 : 실행 속도",Slow:"느린",Normal:"표준",Fast:"빠른","Step-by-step: element in run mode":"단계별 : 실행 모드의 요소",Instructions:"교수",Instruction:"교수","µinstructions":"µ교수",microInstruction:"µ교수","Breakpoint icon: icon to be used for breakpoints":"Breakpoint icon: icon to be used for breakpoints","Limit instructions: number of instructions to be executed":"Limit instructions: number of instructions to be executed","Limit instruction ticks: to limit clock ticks":"Limit instruction ticks: clock ticks limit per instruction","Register file":"Register file","Display format":"Display format","Register file names":"Register file names",Numbers:"번호",Labels:"레이블","Editable registers: edit register file values":"Editable registers: edit register file values","Circuitry simulation":"Circuitry simulation","Data-path color":"Data-path color","Signal color":"Signal color","Show by value or by activation":"Show by value or by activation",Value:"Value",Activation:"Activation","Interactive mode: signal value can be updated":"Interactive mode: signal value can be updated","Quick interactive mode: quick update of signal value":"Quick interactive mode: quick update of signal value","WepSIM User Interface Skin":"WepSIM 사용자 인터페이스 스킨","(example)":"(예)",Accesibility:"접근성","Active voice: external voice control":"활성 음성 : 외부 음성 제어","Verbalization: textual or mathematical":"언어학 : 텍스트 또는 수학","Enable experimental features":"실험 사용"};i18n.eltos.help.kr={"Welcome tutorial":"환영 자습서",help_01_01:"환영하는 자습서 열기","Simple usage tutorial":"간단한 사용법 자습서",help_01_02:"마이크로 프로그래밍 및 어셈블리 프로그래밍을위한 간단한 사용법 자습서 열기","Simulator: firmware":"시뮬레이터 : 펌웨어",help_02_01:"펌웨어를 제어 메모리에로드하는 방법","Microcode format":"마이크로 코드 형식",help_02_02:"사용 된 마이크로 코드의 구문","Simulator: assembly":"시뮬레이터 : 어셈블리",help_02_03:"앞서 언급 한 펌웨어를 사용하는 어셈블리 작업 방법","Assembly format":"어셈블리 형식",help_02_04:"어셈블리 요소의 구문","Simulator: execution":"시뮬레이터 : 실행",help_02_05:"시뮬레이터가 어셈블리 및 펌웨어를 실행할 수있는 방법","Simulated architecture":"시뮬레이션 된 아키텍처",help_03_01:"시뮬레이트 된 프로세서 아키텍처에 대한 설명","Simulated signals":"시뮬레이션 된 신호",help_03_02:"시뮬레이션 된 기본 프로세서의 주요 신호 요약","Hardware summary":"하드웨어 요약",help_03_03:"시뮬레이트 된 기본 프로세서 하드웨어에 대한 참조 카드","License, platforms, etc.":"라이센스, 플랫폼 등",help_04_01:"WEPSIM 라이센스, 지원 플랫폼, 사용 된 기술",Authors:"저자",help_04_02:"WepSIM의 저자"};i18n.eltos.states.kr={States:"주",Current:"현재","Current State":"현재 상태",History:"역사",None:"없음","Empty history":"비어있는 기록","Empty (only modified values are shown)":"비어 있음 (수정 된 값만 표시됨)",Differences:"차이점","differences with clipboard state":"클립 보드 상태와의 차이점","Meets the specified requirements":"지정된 요구 사항 충족",history:"역사",Add:"추가","'Current State' to History":"역사에 ''현재 국가 ",Check:"확인",Copy:"복사","to clipboard":"클립 보드에",Checkpoint:"검사 점","File name":"파일 이름","Tag for checkpoint":"검사 점을위한 태그","File to be loaded":"로드 할 파일","Save to File":"파일에 저장","State(s) to checkpoint":"검사 점의 상태","Record to checkpoint":"체크 포인트에 기록"};i18n.eltos.examples.kr={"addv + seqv.":"addv + seqv.","Alloc.s":"Alloc.s","Dummy instruction":"Dummy instruction",Exception:"Exception",Instructions:"Instructions",Interruptions:"Interruptions","Int. + syscall + except.":"Int. + syscall + except.","I/O":"I/O",Looping:"Looping","madd, mmul, mxch":"madd, mmul, mxch","Masks & shift":"Masks & shift",Matrix:"Matrix","Memory access":"Memory access","SC 1, 4-5, 8, 11-12":"SC 1, 4-5, 8, 11-12","strlen_2 + skipasciicode_2":"strlen_2 + skipasciicode_2",Subrutine:"Subrutine","syscall 1, 4-5, 8, 11-12":"syscall 1, 4-5, 8, 11-12","System call":"System call",Threads:"Threads",Vector:"Vector",example_04_01:"Advanced example with interruption, system call, and exception.",example_05_01:"Application-specific extension: addv + seqv.",example_05_03:"Application-specific extension: madd + mmul + mxch.",example_05_02:"Application-specific extension: strlen_2 + skipasciicode_2.",example_03_01:"Instructive example with floating point exception.",example_03_02:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata.",example_03_03:"Instructive example with system call support.",example_04_04:"Example of malloc + free.",example_04_02:"Example of syscall for printing/reading integer and string.",example_04_03:"Example of threads.",example_03_01b:"Example with floating point exception.",example_03_02b:"Example with interruptions support: fetch, RETI, and .ktext/.kdata.",example_02_01:"Example with programmed I/O access, and basic .text/.data segment.",example_03_03b:"Example with system call support.",example_02_02:"Extended example with more instructions and I/O (keyboard, display).",example_02_04:"Extended example with subrutine and matrix.",example_02_03:"More extended example with masks, shift, and basic .text/.data segment.",example_01_01:"Simple example with fetch, arithmetic instructions, and basic .text segment.",example_01_04:"Simple example with fetch, branch, and basic .text/.data segment.",example_01_03:"Simple example with fetch, branch, and basic .text segment.",example_01_02:"Simple example with fetch, memory access, and basic .text/.data segment.",example_06_01:"Test example.",Advanced:"Advanced",Initial:"Initial",Intermediate:"Intermediate",Laboratory:"Laboratory","Operating Systems":"Operating Systems",Special:"Special","Load Assembly only":"Load Assembly only","Load Firmware only":"Load Firmware only","Copy reference to clipboard":"Copy reference to clipboard","No examples available...":"No examples are available for the selected hardware","Simple example":"Simple example."};i18n.eltos.dialogs.kr={"Show Notifications":"알림 표시","Show/Hide RecordBar":"RecordBar보기 / 가리기","Show/Hide ActionBar":"ActionBar 표시 / 숨기기","Show/Hide Slider":"슬라이더 표시 / 숨기기","Initial intro":"초기 소개","About WepSIM":"WepSIM 소개",Title:"제목",Message:"메시지",Duration:"재생 시간","Confirm remove record...":"현재 레코드를 제거 하시겠습니까?","Close or Reset...":"계속하려면 닫기를 클릭하고, 단추를 클릭하여 제거하십시오.","Sure Control Memory...":"편집기 내용이 아닌 현재 컨트롤 메모리 내용을 저장 하시겠습니까?",Close:"닫다"};function showhideAsmElements(){var e=["label","addr","hex","ins","pins"];for(var d=0;d
";simcore_record_set(g.record);if(f!==""){f="WepSIM has been instructed to restore a checkpoint:
"+f+'
To close this notification please press in the X mark. '}if(g.notify===true){simcoreui_notify("Restored Checkpoint",f,"info",get_cfg("NOTIF_delay"))}return f}var clipboard_copy="";function get_clipboard_copy(){return clipboard_copy}function SelectText(b){var d=document,e=d.getElementById(b),a,c;if(d.body.createTextRange){a=document.body.createTextRange();a.moveToElementText(e);a.select()}else{if(window.getSelection){c=window.getSelection();a=document.createRange();a.selectNodeContents(e);c.removeAllRanges();c.addRange(a)}}}function wepsim_clipboard_CopyFromDiv(b){var c="unsuccessful";try{SelectText(b);if(document.execCommand("copy")){clipboard_copy=$("#"+b).text();c="successful"}}catch(a){c+=c+" because "+a}wepsim_notify_success("INFO","Copied "+c+"!.")}function wepsim_clipboard_CopyFromTextarea(c){var d="successful";try{var b=document.getElementById(c);b.select();document.execCommand("copy");clipboard_copy=$("#"+c).val()}catch(a){d="unsuccessful"}wepsim_notify_success("INFO","Copied "+d+"!.")}function wepsim_open_config_index(){$("#container-config2").html(table_config_html(ws_config));for(m=0;m';for(e=0;e"+d[e].type+""}h=d[e].type;j=d[e].code_cfg;i=d[e].description;g=d[e].id;if(b==""){b="bg-light"}else{b=""}a=a+c+"
",code_init:function(){$("#select7").val(get_cfg("ws_idiom"))},description:"Idiom for help, examples, etc."});ws_config.push({id:"select8",type:"General",code_cfg:"
",code_init:function(){$("#select8").val(get_cfg("ws_skin"))},description:"WepSIM User Interface Skin"});ws_config.push({id:"radio14",type:"General",code_cfg:"
",code_init:function(){$("#label7-"+get_cfg("editor_theme")).button("toggle")},description:"Editor theme: light or dark"});ws_config.push({id:"select2",type:"Editor",code_cfg:"
",code_init:function(){$("#label1-"+get_cfg("DBG_level")).button("toggle")},description:"Step-by-step: element in run mode"});ws_config.push({id:"select1",type:"Execution",code_cfg:"",code_init:function(){$("#img_select1").attr("src","images/stop/stop_"+get_cfg("ICON_theme")+".gif");$("#breakpointicon1").popover({html:true,content:wepsim_show_breakpoint_icon_list,sanitizeFn:function(a){return a}})},description:"Breakpoint icon: icon to be used for breakpoints"});ws_config.push({id:"select6",type:"Execution",code_cfg:"
",code_init:function(){$("#select6").val(get_cfg("DBG_limitins"))},description:"Limit instructions: number of instructions to be executed"});ws_config.push({id:"select3",type:"Execution",code_cfg:"
",code_init:function(){$("#select3").val(get_cfg("DBG_limitick"))},description:"Limit instruction ticks: to limit clock ticks"});ws_config.push({id:"radio2",type:"Register file",code_cfg:"
",code_init:function(){$("#label10-"+get_cfg("is_byvalue")).button("toggle")},description:"Show by value or by activation"});ws_config.push({id:"radio5",type:"Circuitry simulation",code_cfg:"
",code_init:function(){$("#label5-"+get_cfg("is_interactive")).button("toggle")},description:"Interactive mode: signal value can be updated"});ws_config.push({id:"radio6",type:"Circuitry simulation",code_cfg:"
",code_init:function(){$("#label6-"+get_cfg("is_quick_interactive")).button("toggle")},description:"Quick interactive mode: quick update of signal value"});ws_config.push({id:"radio11",type:"Accesibility",code_cfg:"
",code_init:function(){$("#label13-"+get_cfg("verbal_verbose")).button("toggle")},description:"Verbalization: textual or mathematical"});ws_config.push({id:"slider3",type:"Accesibility",code_cfg:"
",code_init:function(){$("#label8-"+get_cfg("NOTIF_delay")).button("toggle")},description:"Notification speed: time before disapear"});function wepsim_open_examples_index(){$("#container-example1").html(table_examples_html(ws_examples));i18n_update_tags("examples");$("#example1").modal("show");ga("send","event","ui","ui.dialog","ui.dialog.example")}function wepsim_close_examples(){$("#example1").modal("hide")}function load_from_example_assembly(f,g){inputasm.setValue("Please wait...");inputasm.refresh();var c=f.split(":");var e="";if(c.length>0){e=c[0]}else{console.log("warning: example without hardware id")}var b="";if(c.length>1){b=c[1]}else{console.log("warning: example without microcode id")}var h="";if(c.length>2){h=c[2]}else{console.log("warning: example without assembly id")}var d="examples/assembly/asm-"+h+".txt";var a=function(j){inputasm.setValue(j);inputasm.refresh();var k=false;var i=get_simware();if(i.firmware.length!=0){k=wepsim_compile_assembly(j)}if(false===k){wsweb_change_workspace_assembly();return}if(true===g){setTimeout(function(){wsweb_change_workspace_simulator();show_memories_values()},50)}wepsim_notify_success("INFO","Example ready to be used.")};wepsim_load_from_url(d,a);simcore_record_append_new("Load assembly from example "+f,'load_from_example_assembly("'+f+'", '+g+");\n");ga("send","event","example","example.assembly","example.assembly."+e+"."+h)}function load_from_example_firmware(f,g){inputfirm.setValue("Please wait...");inputfirm.refresh();var c=f.split(":");var e="";if(c.length>0){e=c[0]}else{console.log("warning: example without hardware id")}var b="";if(c.length>1){b=c[1]}else{console.log("warning: example without microcode id")}var h="";if(c.length>2){h=c[2]}else{console.log("warning: example without assembly id")}var d="examples/microcode/mc-"+b+".txt";inputfirm.setOption("readOnly",false);var a=function(i){inputfirm.setValue(i);inputfirm.refresh();var j=wepsim_compile_firmware(i);if(false===j){wsweb_change_workspace_microcode();return}if(true===g){setTimeout(function(){load_from_example_assembly(f,g)},50)}else{show_memories_values();wepsim_notify_success("INFO","Example ready to be used.")}};wepsim_load_from_url(d,a);simcore_record_append_new("Load firmware from example "+f,'load_from_example_firmware("'+f+'", false);\n');ga("send","event","example","example.firmware","example.firmware."+e+"."+b)}function table_examples_html(h){var l="ep";var r=["newbie","intro","wepmips","tutorial"];var j=get_cfg("ws_mode");if((j!=="null")&&(!r.includes(j))){l=j}var q=get_cfg("base_url");var d="";var e="";var f="";var p="";var b="";var s="";var a="";var n="";var k="";var i="";var c="";for(var g=0;g"+l.toUpperCase()+": "+h[g].level+"
"}if(c.trim()===""){c='<No examples are available for the selected hardware>'}c='
'+c+"
";return c}var ws_examples=[];ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s1_e1",description:"Simple example with fetch, arithmetic instructions, and basic .text segment."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_base",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E2",title:"Subrutine",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_enhanced",assembly:"ep_s2_e2",description:"Extended example with more instructions and I/O (keyboard, display)."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s2_e3",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s2_e4",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e1",assembly:"ep_s3_e1",description:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e2",assembly:"ep_s3_e2",description:"Instructive example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s3_e3",assembly:"ep_s3_e3",description:"Instructive example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s4_e1",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"SC 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S4E3",title:"Threads",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e3",description:"Example of threads."});ws_examples.push({id:"S4E4",title:"Alloc.s",level:"Operating Systems",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_os",assembly:"ep_s4_e4",description:"Example of malloc + free."});ws_examples.push({id:"S5E1",title:"addv + seqv.",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e1",assembly:"ep_s5_e1",description:"Application-specific extension: addv + seqv."});ws_examples.push({id:"S5E2",title:"strlen_2 + skipasciicode_2",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e2",assembly:"ep_s5_e2",description:"Application-specific extension: strlen_2 + skipasciicode_2."});ws_examples.push({id:"S5E3",title:"madd, mmul, mxch",level:"Laboratory",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_s5_e3",assembly:"ep_s5_e3",description:"Application-specific extension: madd + mmul + mxch."});ws_examples.push({id:"S6E1",title:"Dummy instruction",level:"Special",modes:"newbie,intro,tutorial,ep",hardware:"ep",microcode:"ep_bare",assembly:"ep_s6_e1",description:"Test example."});ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e1",description:"Simple example with fetch, arithmetic instructions, and basic .text segment."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e1",description:"Example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e2",description:"Example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s3_e3",description:"Example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"syscall 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S5E1",title:"strlen_2 + skipasciicode_2",level:"Laboratory",modes:"newbie,intro,wepmips,tutorial",hardware:"ep",microcode:"ep_mips",assembly:"ep_s5_e2",description:"Application-specific extension: strlen_2 + skipasciicode_2."});ws_examples.push({id:"S1E1",title:"Instructions",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"poc_s1_e1",description:"Simple example."});ws_examples.push({id:"S1E2",title:"Memory access",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e2",description:"Simple example with fetch, memory access, and basic .text/.data segment."});ws_examples.push({id:"S1E3",title:"Looping",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e3",description:"Simple example with fetch, branch, and basic .text segment."});ws_examples.push({id:"S1E4",title:"Vector",level:"Initial",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s1_e4",description:"Simple example with fetch, branch, and basic .text/.data segment."});ws_examples.push({id:"S2E1",title:"I/O",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e1",description:"Example with programmed I/O access, and basic .text/.data segment."});ws_examples.push({id:"S2E2",title:"Subrutine",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e2",description:"Extended example with more instructions and I/O (keyboard, display)."});ws_examples.push({id:"S2E3",title:"Masks & shift",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e3",description:"More extended example with masks, shift, and basic .text/.data segment."});ws_examples.push({id:"S2E4",title:"Matrix",level:"Intermediate",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_base",assembly:"ep_s2_e4",description:"Extended example with subrutine and matrix."});ws_examples.push({id:"S3E1",title:"Interruptions",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e1",description:"Instructive example with interruptions support: fetch, RETI, and .ktext/.kdata."});ws_examples.push({id:"S3E2",title:"System call",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e2",description:"Instructive example with system call support."});ws_examples.push({id:"S3E3",title:"Exception",level:"Advanced",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_s3",assembly:"ep_s3_e3",description:"Instructive example with floating point exception."});ws_examples.push({id:"S4E1",title:"Int. + syscall + except.",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e1",description:"Advanced example with interruption, system call, and exception."});ws_examples.push({id:"S4E2",title:"SC 1, 4-5, 8, 11-12",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e2",description:"Example of syscall for printing/reading integer and string."});ws_examples.push({id:"S4E3",title:"Threads",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e3",description:"Example of threads."});ws_examples.push({id:"S4E4",title:"Alloc.s",level:"Operating Systems",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_os",assembly:"ep_s4_e4",description:"Example of malloc + free."});ws_examples.push({id:"S5E1",title:"Dummy instruction",level:"Special",modes:"newbie,intro,tutorial,poc",hardware:"poc",microcode:"poc_bare",assembly:"poc_s5_e1",description:"Test example."});function wepsim_execute_reset(c,b){wepsim_state_history_reset();if(true===b){var a=get_simware();if(a.firmware.length!=0){update_memories(a)}}if(true===c){simcore_reset()}}function wepsim_execute_instruction(){var b=simcore_check_if_can_execute();if(false===b.ok){alert(b.msg);return false}var a={verbosity:0,cycles_limit:get_cfg("DBG_limitick")};b=simcore_execute_microprogram(a);if(false===b.ok){wepsim_show_stopbyevent("Info",b.msg);return false}return true}function wepsim_execute_microinstruction(){var a=simcore_check_if_can_execute();if(false===a.ok){alert(a.msg);return false}a=simcore_execute_microinstruction();if(false===a.ok){wepsim_show_stopbyevent("Info",a.msg);return false}return true}function wepsim_execute_set_breakpoint(a){return asmdbg_set_breakpoint(a)}var DBG_stop=true;var DBG_limit_instruction=0;function wepsim_execute_stop(b){var a=get_cfg("ws_idiom");var c=i18n_get("gui",a,"Run");$(b).html(" "+c+"");$(b).css("backgroundColor","#CCCCCC");DBG_stop=true;DBG_limit_instruction=0}function wepsim_execute_play(e,d){var a=get_cfg("ws_idiom");var b=i18n_get("gui",a,"Stop");var c=simcore_check_if_can_execute();if(false===c.ok){alert(c.msg);return false}$(e).css("backgroundColor","rgb(51, 136, 204)");$(e).html(" "+b+"");DBG_stop=false;DBG_limit_instruction=0;if(false===d){wepsim_execute_chainplay(e)}else{wepsim_execute_chainnotify(e)}}function wepsim_execute_toggle_play(b,a){if(DBG_stop===false){DBG_stop=true}else{wepsim_execute_play(b,a)}}function wepsim_check_stopbybreakpoint_firm(){var a=simhw_sim_ctrlStates_get().mpc.state;var c=get_value(simhw_sim_state(a));var b="0x"+c.toString(16);if(typeof simhw_internalState_get("MC_dashboard",c)==="undefined"){return false}return(simhw_internalState_get("MC_dashboard",c).breakpoint)}function wepsim_check_stopbybreakpoint_asm(){var a=simhw_sim_ctrlStates_get().pc.state;var c=get_value(simhw_sim_state(a));var d="0x"+c.toString(16);var b=simhw_internalState("FIRMWARE");if(typeof b.assembly[d]==="undefined"){return false}return(b.assembly[d].breakpoint)}function wepsim_show_stopbyevent(f,e){var h=simhw_sim_ctrlStates_get().mpc.state;var c=get_value(simhw_sim_state(h));var a="0x"+c.toString(16);var i=simhw_sim_ctrlStates_get().pc.state;var g=get_value(simhw_sim_state(i));var b="0x"+g.toString(16);var d=f+" @ pc="+b+"+mpc="+a;$("#dlg_title2").html(d);$("#dlg_body2").html(e);$("#current_state2").modal("show");return true}function wepsim_check_state_firm(){var a=simhw_sim_ctrlStates_get().mpc.state;var b=get_value(simhw_sim_state(a));if(false===simhw_internalState_get("MC_dashboard",b).state){return false}wepsim_state_history_add();return true}function wepsim_execute_chunk(a,e){var d=false;var c=0;var h=get_cfg("DBG_level");if(h==="instruction"){var j={verbosity:0,cycles_limit:get_cfg("DBG_limitick")};for(c=0;cget_cfg("DBG_limitins")){wepsim_show_stopbyevent("Limit","Number of executed instructions limit reached.
See related configuration options about limits: ");wepsim_execute_stop(d);return}setTimeout(wepsim_execute_chainplay,get_cfg("DBG_delay"),d)}function wepsim_execute_chainnotify(b){if(DBG_stop){wepsim_execute_stop(b);return}var g=false;var l=simhw_sim_ctrlStates_get().mpc.state;var j=simhw_sim_state(l);var c=0;var h=0;for(var e=0;e1){var f="Notify @ "+c+": "+simhw_internalState_get("MC_dashboard",c).notify[1];var a='
"}b=b+"";return b}function wepsim_help_refresh(){var c="#iframe_help1";var e="";var f=get_cfg("ws_idiom");var h=simhw_active().sim_short_name;var b=$("#help1_ref").data("relative");if((typeof b!="undefined")&&(b!="")){var g=b.split("#");e="help/"+g[0]+"-"+f+".html";$("#help1").modal("show");resolve_html_url(c,e,"#"+g[1],function(){});ga("send","event","help","help.simulator","help.simulator."+b);return}var a=$("#help1_ref").data("absolute");if((typeof a!="undefined")&&(a!="")){e="examples/hardware/"+h+"/help/"+a+"-"+f+".html";$("#help1").modal("show");resolve_html_url(c,e,"",function(){});ga("send","event","help","help."+a,"help."+a+".*");return}var d=$("#help1_ref").data("code");if((typeof d!="undefined")&&(d==="true")){ga("send","event","help","help.code","help.code.*");return}wepsim_open_help_index()}function wepsim_open_help_index(){$("#iframe_help1").html(table_helps_html(ws_help));$("#help1_ref").data("relative","");$("#help1_ref").data("absolute","");$("#help1_ref").data("code","false");i18n_update_tags("help");$("#help1").modal("show");ga("send","event","ui","ui.dialog","ui.dialog.help")}function wepsim_open_help_content(a){$("#iframe_help1").html(a);$("#help1_ref").data("relative","");$("#help1_ref").data("absolute","");$("#help1_ref").data("code","true");$("#help1").modal("show")}function wepsim_close_help(){$("#help1").modal("hide")}function wepsim_help_set_relative(a){$("#help1_ref").data("relative",a);$("#help1_ref").data("absolute","");$("#help1_ref").data("code","false")}function wepsim_help_set_absolute(a){$("#help1_ref").data("relative","");$("#help1_ref").data("absolute",a);$("#help1_ref").data("code","false")}var ws_help=[];ws_help.push({id:"simulator",title:"Welcome tutorial",i_type:"code",u_type:"tutorial",reference:"wepsim_close_help(); sim_tutorial_showframe('welcome', 0);",description:"Open the welcome tutorial. "});ws_help.push({id:"simulator",title:"Simple usage tutorial",i_type:"code",u_type:"tutorial",reference:"wepsim_close_help(); sim_tutorial_showframe('simpleusage', 0);",description:"Open the simple usage tutorial, for microprogramming and assembly programming. "});ws_help.push({id:"simulator",title:"Simulator: firmware",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_firmware",description:"How to work with the firmware to be loaded into the control memory. "});ws_help.push({id:"microcode",title:"Microcode format",i_type:"relative",u_type:"simulator",reference:"simulator#help_firmware_format",description:"Syntax of the microcode used. "});ws_help.push({id:"simulator",title:"Simulator: assembly",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_assembly",description:"How to work with the assembly that use the aforementioned firmware. "});ws_help.push({id:"assembly",title:"Assembly format",i_type:"relative",u_type:"simulator",reference:"simulator#help_assembly_format",description:"Syntax of the assembly elements. "});ws_help.push({id:"simulator",title:"Simulator: execution",i_type:"relative",u_type:"simulator",reference:"simulator#help_simulator_execution",description:"How the simulator can execute the assembly and firmware. "});ws_help.push({id:"architecture",title:"Simulated architecture",i_type:"absolute",u_type:"simulated processor",reference:"hardware",description:"Description of the simulated processor architecture. "});ws_help.push({id:"architecture",title:"Simulated signals",i_type:"absolute",u_type:"simulated processor",reference:"signals",description:"Main signals summary of the simulated elemental processor. "});ws_help.push({id:"architecture",title:"Hardware summary",i_type:"code",u_type:"simulated processor",reference:"var ahw1 = simhw_active().sim_short_name ; var img1 = 'examples/hardware/' + ahw1 + '/images/cpu.svg?time=20190102' ; var txt1 = 'Your browser does not support SVG' ;var lyt1 = ''; wepsim_open_help_content(lyt1) ;",description:"Reference card for the simulated elemental processor hardware. "});ws_help.push({id:"about",title:"License, platforms, etc.",i_type:"relative",u_type:"info",reference:"about#help_about",description:"WepSIM license, supported platforms, technologies used. "});ws_help.push({id:"authors",title:"Authors",i_type:"code",u_type:"info",reference:"wepsim_close_help();$('#about2').modal('show');",description:"Authors of WepSIM. "});function wepsim_notify_success(a,b){return simcoreui_notify(a,b,"success",get_cfg("NOTIF_delay"))}function wepsim_notify_error(a,b){return simcoreui_notify(a,b,"danger",0)}function wepsim_notify_warning(a,b){return simcoreui_notify(a,b,"warning",get_cfg("NOTIF_delay"))}function wepsim_notify_close(){return simcoreui_notify_close()}function wepsim_preload_hash(e){var g="";if(e.mode!==""){wsweb_select_main(e.mode);g+="
"}if(typeof b[0]!=="undefined"){if(b[0]==="microcode"){wsweb_change_show_processor()}if(b[0]==="assembly"){wsweb_change_show_asmdbg()}}if(typeof b[1]!=="undefined"){var d=b[1].toUpperCase();wsweb_set_details(d)}if(g!==""){g="WepSIM has been instructed to preload some work for you:
"+g+'
To close this notification please press in the X mark. In order to execute an example please press the Run button. ';if(e.notify!=="false"){simcoreui_notify("WepSIM preloads some work",g,"info",0)}}return 0}function wepsim_preload_json(b,a){var c=1*1024*1024;var d=new XMLHttpRequest();d.open("HEAD",b,true);d.onreadystatechange=function(){if(this.readyState==this.DONE){var e=0;var f=d.getResponseHeader("Content-Length");if(f!==null){e=parseInt(f)}if(eµadd "+c}}var state_history=[];function wepsim_state_history_get(){return state_history}function wepsim_state_history_reset(){$("[data-toggle=popover4]").popover("hide");state_history=[]}function wepsim_state_history_add(){var a=wepsim_state_get_clk();var b=simcore_simstate_current2state();a.content=simcore_simstate_state2checklist(b);state_history.push(a)}function wepsim_state_results_empty(){var a='<Empty (only modified values are shown)>';$("#check_results1").html(a);$("#s_clip").html("clipboard");$("#s_ref").html("reference")}function wepsim_state_history_empty(){var a='<Empty history>';$("#history1").html(a)}function wepsim_state_history_list(){if(0==state_history.length){wepsim_state_history_empty();wepsim_state_results_empty();return}$("[data-toggle=popover4]").popover("hide");var c=0;var e="";var d="";var a="";var f="";for(var b=state_history.length-1;b>=0;b--){c=new Date(state_history[b].time);e=c.getFullYear()+"-"+(c.getMonth()+1)+"-"+c.getDate()+"-"+c.getHours()+"-"+c.getMinutes()+"-"+c.getSeconds()+"-"+c.getMilliseconds();d='
'+state_history[b].title+" was inserted at: Date: "+c.getFullYear()+"-"+(c.getMonth()+1)+"-"+c.getDate()+" Hour: "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()+"-"+c.getMilliseconds()+' Close
Copyto clipboardCheckdifferences with clipboard state± Show
'+d+'
'+state_history[b].content+'
"}$("#history1").html(f);wepsim_state_results_empty();$("[data-toggle=popover4]").popover({html:true,placement:"auto",trigger:"click",container:"body",animation:false,content:function(){var g=$(this).attr("id");return $("#popover-content-"+g).html()},sanitizeFn:function(g){return g}})}function wepsim_dialog_current_state(){wepsim_notify_success("INFO","Loading, please wait...");i18n_update_tags("states");$("#current_state1").modal("show");setTimeout(function(){var d=wepsim_state_get_clk();$("#curr_clk_maddr").html(d.title_short);var g=simcore_simstate_current2state();var e=simcore_simstate_state2checklist(g);$("#end_state1").tokenfield("setTokens",e);wepsim_notify_close();wepsim_notify_success("INFO","Current state loaded !");var c=0;var f=0;var h="";for(var b in g){f=0;for(var a in g[b]){f++}h=h+","+b+"="+f;c=c+f}ga("send","event","state","state.dump","state.dump.ci="+get_value(simhw_sim_state("REG_IR_DECO"))+",neltos="+c+h)},80)}function wepsim_dialog_check_state(c,b,e){var a=simcore_simstate_diff_results(b,e);var d="";if(0==a.errors){d=" Meets the specified requirements "}else{d=simcore_simstate_checkreport2html(a.result,true)}$("#"+c).html(d);ga("send","event","state","state.check","state.check,ci="+get_value(simhw_sim_state("REG_IR_DECO"))+".a="+a.neltos_expected+",b="+a.neltos_obtained+",sd="+a.errors);return true}function wepsim_dialog_check_reset(a,b){$("#"+b).tokenfield("setTokens",[]);$("#"+b).val("");$("#"+a).html("");return true}function sim_tutorial_goframe(c,a,b){if(typeof tutorials[c]=="undefined"){return}var d=tutorials[c][get_cfg("ws_idiom")];if(typeof d=="undefined"){return}d[a].code_post();tutbox.modal("hide");setTimeout(function(){sim_tutorial_showframe(c,b)},d[a].wait_next);if(simcoreui_voice_canSpeak()){window.speechSynthesis.cancel()}}function sim_tutorial_cancelframe(){var a=get_cfg("ws_mode");wsweb_select_main(a);tutbox.modal("hide");if(simcoreui_voice_canSpeak()){window.speechSynthesis.cancel()}}function sim_tutorial_showframe(c,b){if(typeof tutorials[c]=="undefined"){return}var e=tutorials[c][get_cfg("ws_idiom")];if(typeof e=="undefined"){return}if(b==e.length){return}if(b<0){return}ga("send","event","help","help.tutorial","help.tutorial.name="+c+",step="+b);e[b].code_pre();var a=get_cfg("ws_idiom");var d={};d.cancel={label:i18n_get("gui",a,"Disable tutorial mode"),className:"btn-danger col float-right",callback:function(){sim_tutorial_cancelframe()}};if(b!=0){d.prev={label:i18n_get("gui",a,"Prev."),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b-1)}}}if(b!=(e.length-1)){d.next={label:i18n_get("gui",a,"Next"),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b+1)}}}else{d.end={label:i18n_get("gui",a,"End"),className:"btn-success col float-right",callback:function(){sim_tutorial_goframe(c,b,b+1)}}}tutbox=bootbox.dialog({title:e[b].title,message:e[b].message,buttons:d,size:"large",animate:false});simcoreui_voice_speak(e[b].title.replace(/<[^>]*>/g,"")+". "+e[b].message.replace(/<[^>]*>/g,""))}function sim_tutorial_loadFromCheckpoint(b){wsweb_recordbar_show();var a={name:"examples/checkpoint/tutorial_"+b+".txt"};wepsim_load_from_url(a.name,function(c){var d=null;if(c!==""){d=JSON.parse(c)}wepsim_checkpoint_loadFromObj(d,"FileNameToSaveAs1","tagToSave1",a)})}function wepsim_newbie_tour(){var a=get_cfg("ws_idiom");wepsim_newbie_tour_setLang(a);tour=introJs();tour.setOptions({steps:ws_tour,keyboardNavigation:true,showProgress:true,overlayOpacity:"0.1"});tour.onbeforechange(function(){ws_tour[this._currentStep].do_before()});tour.onexit(function(){$("#config2").modal("hide");$("#help1").modal("hide");$("#example1").modal("hide");if(get_cfg("ws_mode")!="ep"){wsweb_select_main("ep")}return true});tour.start();ga("send","event","ui","ui.tour","ui.tour.newbie")}function wepsim_newbie_tour_setLang(c){var b="";for(var a=0;aStep 0",step:"step0",position:"auto",do_before:function(){return true}});ws_tour.push({intro:"Step 1",step:"step1",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#select4",intro:"Step 2",step:"step2",position:"auto",do_before:function(){wsweb_select_main("ep");tour.refresh();return true}});ws_tour.push({element:"#btn_help1",intro:"Step 3",step:"step3",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#btn_example1",intro:"Step 4",step:"step4",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({element:"#btn_cfg1",intro:"Step 5",step:"step5",position:"auto",do_before:function(){tour.refresh();return true}});ws_tour.push({intro:"Step 6",step:"step6",position:"auto",do_before:function(){tour.refresh();return true}});function wepsim_load_from_file(c,b){var a=new FileReader();a.onload=function(d){var e=d.target.result;if(null!==b){b(e)}};a.onerror=function(d){console.error("File could not be read! Code "+d.target.error.code)};a.readAsText(c,"UTF-8")}function wepsim_save_to_file(d,c){var b=new Blob([d],{type:"text/plain"});var a=document.createElement("a");a.download=c;a.innerHTML="Download File";if(window.webkitURL!=null){a.href=window.webkitURL.createObjectURL(b)}else{a.href=window.URL.createObjectURL(b);a.onclick=function(e){document.body.removeChild(e.target)};a.style.display="none";document.body.appendChild(a)}a.click()}function getURLTimeStamp(){var b=new Date();var e=b.getUTCFullYear();var f=b.getUTCMonth()+1;var c=b.getUTCDate();var a=b.getUTCHours();var d=b.getUTCMinutes();return e+f+c+a+d}function fetchURL(a){if(navigator.onLine){return fetch(a+"?time="+getURLTimeStamp())}return caches.match(a)}function wepsim_load_from_url(b,a){if(false==is_mobile()){fetchURL(b).then(function(d){if(typeof d=="undefined"){console.error("File "+b+" could not be fetched: * Please check that you are on-line.");return}if(d.ok){d.text().then(function(e){a(e)})}})}else{var c=new XMLHttpRequest();c.onreadystatechange=function(){if((c.readyState==4)&&((c.status==200)||(c.status==0))){var d=c.responseText;if(null!=a){a(d)}}};c.open("GET",b,true);c.send()}}function wepsim_voice_init(){if(!annyang){return false}annyang.addCommands(wepsim_voice_commands);annyang.addCallback("errorNetwork",function(){annyang.abort();alert("Sorry but some network connection is needed in order to use the voice recognition engine.")});SpeechKITT.annyang();SpeechKITT.setStylesheet("external/speechkitt/themes/flat.css");SpeechKITT.setInstructionsText("What can I help you with? (list)");SpeechKITT.vroom();return true}function wepsim_voice_start(){if(!annyang){wepsim_notify_error("
Warning: annyang not available
","Voice support is not available in this platform.");return false}SpeechKITT.show();return true}function wepsim_voice_stop(){if(!annyang){return false}SpeechKITT.hide();return true}var wepsim_voice_commands={};var wepsim_voice_dialog=null;wepsim_voice_commands.hello=function(){var a="Hello, I am WepSIM, nice to meet you. ";simcoreui_voice_speak(a)};wepsim_voice_commands["(show) configuration"]=function(){wepsim_open_config_index()};wepsim_voice_commands["(show) examples"]=function(){wepsim_open_examples_index()};wepsim_voice_commands["load example :id (from) :level"]=function(d,c){var b=parseInt(d);var a=parseInt(c);load_from_example_firmware("ep:S"+a+"E"+a,true)};wepsim_voice_commands["(show) help"]=function(){wepsim_open_help_index();wepsim_help_refresh()};wepsim_voice_commands.close=function(){wepsim_close_help();wepsim_close_examples();wepsim_close_config();if(null!=wepsim_voice_dialog){wepsim_voice_dialog.modal("hide")}};wepsim_voice_commands.reset=function(){wepsim_execute_reset(true,true);var a="Current processor has been reset.";simcoreui_voice_speak(a)};wepsim_voice_commands.next=function(){wepsim_execute_instruction();var a="Next executed.";simcoreui_voice_speak(a)};wepsim_voice_commands["next micro(instruction)"]=function(){wepsim_execute_microinstruction();var a="Next microinstruction executed. ";simcoreui_voice_speak(a)};wepsim_voice_commands.play=function(){wepsim_execute_play("#qbp",false)};wepsim_voice_commands.stop=function(){wepsim_execute_stop("#qbp")};wepsim_voice_commands["describe micro(instruction)"]=function(){var a=get_verbal_from_current_mpc();simcoreui_voice_speak(a)};wepsim_voice_commands["describe instruction"]=function(){var a=get_verbal_from_current_pc();simcoreui_voice_speak(a)};wepsim_voice_commands.list=function(){var a="available commands: ";for(var b in wepsim_voice_commands){a=a+" * '"+b+"' "}wepsim_voice_dialog=bootbox.alert(a);wepsim_voice_dialog.modal("show");var c=$("").html(a).text();simcoreui_voice_speak(c)};wepsim_voice_commands.silence=function(){simcoreui_voice_stopSpeak()};function sim_change_workspace(b,a){if((typeof $.mobile!="undefined")&&(typeof $.mobile.pageContainer!="undefined")&&(typeof $.mobile.pageContainer.pagecontainer!="undefined")){$.mobile.pageContainer.pagecontainer("change",b)}else{$("#carousel-8").carousel(a)}}function wepsim_load_hw(){return true}function wepsim_show_wepmips(){$(".multi-collapse-2").collapse("show");$("#slider_cpucu").hide();$("#tab26").hide();$("#tab21").hide();$("#tab24").click();inputfirm.setOption("readOnly",true);$("#btn_micro1").addClass("d-none");return true}function wepsim_hide_wepmips(){$(".multi-collapse-2").collapse("show");$("#slider_cpucu").show();$("#tab26").show();$("#tab21").show();inputfirm.setOption("readOnly",false);$("#btn_micro1").removeClass("d-none");return true}function wepsim_activehw(i){simhw_setActive(i);var h=document.getElementById("svg_p");if(h!=null){h.setAttribute("data",simhw_active().sim_img_processor)}h=document.getElementById("svg_cu");if(h!=null){h.setAttribute("data",simhw_active().sim_img_controlunit)}h=document.getElementById("svg_p2");if(h!=null){h.setAttribute("data",simhw_active().sim_img_cpu)}var f=document.getElementById("svg_p");f.addEventListener("load",function(){simcore_init_eventlistener("svg_p",hash_detail2action);refresh()},false);var d=document.getElementById("svg_cu");d.addEventListener("load",function(){simcore_init_eventlistener("svg_cu",hash_detail2action);refresh()},false);wepsim_notify_warning("WARNING","Please remember the current firmware and assembly might need to be reloaded, because previous working session of the simulated hardware are not kept.");wepsim_notify_success("INFO",'"'+simhw_active().sim_name+'" has been activated.');var c=get_simware();update_memories(c);simcore_reset();var g=default_asmdbg_content_horizontal();for(var e in c.assembly){g=assembly2html(c.mp,c.labels2,c.seg,c.assembly);break}$("#asm_debugger").html(g);showhideAsmElements();return true}function wepsim_change_mode(b){var a=-1;switch(b){case"newbie":case"intro":case"wepmips":case"tutorial":a=simhw_getIdByName("ep");wepsim_activehw(a);break;default:a=simhw_getIdByName(b);wepsim_activehw(a);break}if("wepmips"==b){wepsim_show_wepmips()}else{wepsim_hide_wepmips()}if("intro"==b){sim_tutorial_loadFromCheckpoint("2");return true}if("newbie"==b){wepsim_newbie_tour();return true}return true}function set_ab_size(f,d,g){var e=g;var c=12-e;$(f).removeClass();$(d).removeClass();if(e!=0){$(f).addClass("col-"+e)}else{$(f).addClass("col-12 order-1")}if(c!=0){$(d).addClass("col-"+c)}else{$(d).addClass("col-12 order-2")}}function wepsim_dialogbox_close_all(){$("#example1").modal("hide");$("#help1").modal("hide");$("#config2").modal("hide");$("#current_state1").modal("hide");$("#bin2").modal("hide")}var wepsim_updatediv_timer=null;function wepsim_updatetime(a,b){$(a).html("Close automatically after "+b+" seconds.");wepsim_updatediv_timer=setTimeout(wepsim_updatetime,1000,a,(b-1))}function wepsim_updatetime_start(a,b){clearTimeout(wepsim_updatediv_timer);wepsim_updatetime(a,b)}function wepsim_confirm_exit(a){var b="o/";(a||window.event).returnValue=b;return b}function wepsim_general_exception_handler(a){alert("Please try to cleanup the browser cache and try again.\nWepSIM was improperly used and found an error, sorry :-(\n\nDiagnostic:\n * Error message: "+a.message+"\n * Runtime stack:\n"+a.stack+"\nAfter close this alert, WepSIM will try to reload and by-pass the cache (just in case).\n");location.reload(true)}function wepsim_show_quick_menu(b){var a=get_cfg("ws_idiom");var c='
WARNING: loading binary might take time on slow mobile devices.
");$(a).css({width:"100%",height:"inherit !important"});$(b).modal("show");setTimeout(function(){var d=get_simware();$(a).html(mp2html(d.mp,d.labels2,d.seg));for(var c in d.seg){$("#compile_begin_"+c).html("0x"+d.seg[c].begin.toString(16));$("#compile_end_"+c).html("0x"+d.seg[c].end.toString(16))}},300)}function wepsim_show_binary_microcode(b,a){$(a).html("
Loading binary, please wait...
WARNING: loading binary might take time on slow mobile devices.
");$(a).css({width:"100%",height:"inherit !important"});$(b).modal("show");setTimeout(function(){var c=get_simware();$(a).html(firmware2html(c.firmware,true));$(a).css({width:"inherit !important",height:"inherit !important"});$(b).trigger("refresh")},300)}function wepsim_compile_assembly(b){var a=get_simware();if(a.firmware.length===0){alert("WARNING: please load the microcode first.");sim_change_workspace("#main3");return false}var c=simlang_compile(b,a);if(c.error!=null){showError(c.error,"inputasm");return false}wepsim_notify_success("INFO","Assembly was compiled and loaded.");set_simware(c);update_memories(a);$("#asm_debugger").html(assembly2html(c.mp,c.labels2,c.seg,c.assembly));showhideAsmElements();simcore_reset();return true}function wepsim_compile_firmware(b){var a=simcore_compile_firmware(b);if(false===a.ok){showError(a.msg,"inputfirm");return false}wepsim_notify_success("INFO","Microcode was compiled and loaded.");simcore_reset();return true}function wsweb_change_workspace_simulator(){sim_change_workspace("#main1",0);setTimeout(function(){ga("send","event","ui","ui.workspace","ui.workspace.simulator")},50);simcore_record_append_new("Change to workspace simulator","wsweb_change_workspace_simulator();\n");return true}function wsweb_change_workspace_microcode(){sim_change_workspace("#main3",1);setTimeout(function(){inputfirm.refresh();ga("send","event","ui","ui.workspace","ui.workspace.microcode")},50);simcore_record_append_new("Change to workspace microcode","wsweb_change_workspace_microcode();\n");return true}function wsweb_change_workspace_assembly(){sim_change_workspace("#main4",2);setTimeout(function(){inputasm.refresh();ga("send","event","ui","ui.workspace","ui.workspace.assembly")},50);simcore_record_append_new("Change to workspace assembly","wsweb_change_workspace_assembly();\n");return true}function wsweb_change_show_processor(){$("#tab26").tab("show");start_drawing();refresh();simcore_record_append_new("Show processor details","wsweb_change_show_processor();\n");return true}function wsweb_change_show_asmdbg(){stop_drawing();$("#tab24").tab("show");simcore_record_append_new("Show assembly debugger","wsweb_change_show_asmdbg();\n");var b=fullshow_asmdbg_pc();if(typeof b[0]=="undefined"){return true}var a=$("#asm_debugger_container");a[0].scrollTop=b[0].offsetTop;return true}function wsweb_execution_reset(){wepsim_execute_reset(true,true);simcoreui_show_hw();simcore_record_append_new("Reset","wsweb_execution_reset();\n");return true}function wsweb_execution_microinstruction(){wepsim_execute_microinstruction();simcoreui_show_hw();simcore_record_append_new("Execute microinstruction","wsweb_execution_microinstruction();\n");return true}function wsweb_execution_instruction(){wepsim_execute_instruction();simcoreui_init_hw("#config_HW");simcore_record_append_new("Execute instruction","wsweb_execution_instruction();\n");return true}function wsweb_execution_run(){var a=get_cfg("ws_mode");if("tutorial"==a){wepsim_notify_success("INFO","Tutorial mode on. Use the configuration to change it.")}wepsim_execute_toggle_play("#qbp",(a=="tutorial"));simcore_record_append_new("Run","wsweb_execution_run();\n");$("#current_state2").one("hidden.bs.modal",function(){simcore_record_append_new("Close execution summary","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_examples(){wepsim_open_examples_index();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open examples","wsweb_dialogbox_open_examples();\n");$("#example1").one("hidden.bs.modal",function(){simcore_record_append_new("Close examples","wsweb_dialogbox_close_all();\n")});wsweb_scroll_record("#container-example1");simcore_record_captureInit();return true}function wsweb_dialogbox_open_help(){wepsim_open_help_index();wepsim_help_refresh();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open help","wsweb_dialogbox_open_help();\n");$("#help1").one("hidden.bs.modal",function(){simcore_record_append_new("Close help","wsweb_dialogbox_close_all();\n")});simcore_record_captureInit();return true}function wsweb_dialogbox_open_config(){wepsim_open_config_index();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open configuration","wsweb_dialogbox_open_config();\n");$("#config2").one("hidden.bs.modal",function(){simcore_record_append_new("Close configuration","wsweb_dialogbox_close_all();\n")});wsweb_scroll_record("#container-config2");simcore_record_captureInit();return true}function wsweb_dialogbox_open_state(){wepsim_dialog_current_state();$("[data-toggle=tooltip]").tooltip("hide");simcore_record_append_new("Open state","wsweb_dialogbox_open_state();\n");$("#current_state1").one("hidden.bs.modal",function(){simcore_record_append_new("Close state","wsweb_dialogbox_close_all();\n")});simcore_record_captureInit();return true}function wsweb_dialogbox_open_binary_assembly(){var a=inputasm.getValue();var b=wepsim_compile_assembly(a);if(true==b){wepsim_show_binary_code("#bin2","#compile_results")}simcore_record_append_new("Open binary assembly","wsweb_dialogbox_open_binary_assembly();\n");$("#bin2").one("hidden.bs.modal",function(){simcore_record_append_new("Close binary assembly","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_binary_firmware(){var b=inputfirm.getValue();var a=wepsim_compile_firmware(b);if(true==a){wepsim_show_binary_microcode("#bin2","#compile_results");wepsim_notify_success("INFO","Please remember to recompile the assembly code if needed.")}simcore_record_append_new("Open binary firmware","wsweb_dialogbox_open_binary_firmware();\n");$("#bin2").one("hidden.bs.modal",function(){simcore_record_append_new("Close binary firmware","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_open_hardware_summary(){var b=simhw_active().sim_short_name;var c="examples/hardware/"+b+"/images/cpu.svg?time=20190102";var a="";wepsim_open_help_content(a);simcore_record_append_new("Open hardware summary","wsweb_dialogbox_open_hardware_summary();\n");$("#help1").one("hidden.bs.modal",function(){simcore_record_append_new("Open hardware summary","wsweb_dialogbox_close_all();\n")});return true}function wsweb_dialogbox_close_state(){$("#current_state1").modal("hide");simcore_record_append_new("Close states dialogbox","wsweb_dialogbox_close_state();\n");return true}function wsweb_dialogbox_close_all(){$("#example1").modal("hide");$("#help1").modal("hide");$("#config2").modal("hide");$("#current_state1").modal("hide");$("#current_state2").modal("hide");$("#bin2").modal("hide");simcore_record_append_new("Close all dialogboxes","wsweb_dialogbox_close_all();\n");return true}function wsweb_set_details_select(b){$("#tab"+b).trigger("click");$("#select5a").val(b);var a=$("#s5b_"+b).html();$("#select5b").html(a);simcore_record_append_new("Change select details to "+b,"wsweb_set_details_select("+b+");\n");return true}var hash_detail2action={CLOCK:function(){wepsim_execute_microinstruction()},REGISTER_FILE:function(){wsweb_set_details_select(11);show_rf_values()},CONTROL_MEMORY:function(){wsweb_set_details_select(16);show_memories_values()},CPU_STATS:function(){wsweb_set_details_select(17);show_memories_values()},MEMORY:function(){wsweb_set_details_select(14);show_memories_values()},MEMORY_CONFIG:function(){wsweb_set_details_select(18);show_memories_values()},KEYBOARD:function(){wsweb_set_details_select(12);show_memories_values()},SCREEN:function(){wsweb_set_details_select(12);show_memories_values()},IO_STATS:function(){wsweb_set_details_select(15);show_memories_values()},IO_CONFIG:function(){wsweb_set_details_select(19);show_memories_values()},FRM_EDITOR:function(){wsweb_set_details_select(20);inputfirm.refresh()},ASM_EDITOR:function(){wsweb_set_details_select(21);inputasm.refresh()},HARDWARE:function(){wsweb_set_details_select(22);$("[data-toggle=tooltip]").tooltip("hide");simcoreui_init_hw("#config_HW");var a=get_cfg("ws_idiom");i18n_update_tags("gui",a)}};function wsweb_set_details(a){if(typeof hash_detail2action[a]!=="undefined"){hash_detail2action[a]()}simcore_record_append_new("Set details to "+a,"wsweb_set_details('"+a+"');\n");return true}function wsweb_select_main(b){set_cfg("ws_mode",b);save_cfg();wepsim_change_mode(b);$("#select4").css("background-color","#F6F6F6");if("tutorial"==b){$("#select4").css("background-color","#D4DB17")}var a=$("#s4_"+b).html();$("#select4").html(a);simcore_record_append_new("Set main work mode to "+b,'wsweb_select_main("'+b+'");\n');return true}function wsweb_mode_update(b){wsweb_select_main(b);simcore_init_ui("#states_ALL","#states_BR","#io_ALL","#cpu_ALL","#config_MP","#config_IO");simcoreui_init_hw("#config_HW");var a=get_cfg("ws_idiom");i18n_update_tags("gui",a);simcore_record_append_new("Update work mode to "+b,'wsweb_mode_update("'+b+'");\n');return true}function wsweb_set_cpucu_size(a){$("#slider2b").val(a);set_ab_size("#eltos_cpu_a","#eltos_cpu_b",a);set_cfg("CPUCU_size",a);save_cfg();simcore_record_append_new("Set cpu-cu size to "+a,"wsweb_set_cpucu_size("+a+");\n");return true}function wsweb_set_c1c2_size(a){$("#slider2a").val(a);set_ab_size("#col1","#col2",a);set_cfg("C1C2_size",a);save_cfg();simcore_record_append_new("Set c1-c2 size to "+a,"wsweb_set_c1c2_size("+a+");\n");return true}function wsweb_assembly_compile(){var a=inputasm.getValue();var b=wepsim_compile_assembly(a);simcore_record_append_new("Compile assembly","wsweb_assembly_compile();\n");return true}function wsweb_firmware_compile(){var b=inputfirm.getValue();wepsim_compile_firmware(b);var a="
Please remember that after updates on the microcode, the assembly code has be re-compiled too.
";$("#asm_debugger").html(a);simcore_record_append_new("Compile firmware","wsweb_firmware_compile();\n");return true}function wsweb_save_controlmemory_to_file(){var b=get_cfg("ws_idiom");var c=i18n_get("dialogs",b,"Sure Control Memory...")+"\n\n";if(confirm(c)){var a=get_simware();var d=saveFirmware(a);if(d.trim()==""){alert("The Microcode loaded in memory is empty!\nPlease load a Microcode first in memory in order to save it.")}else{inputfirm.setValue(d)}var f=document.getElementById("inputFileNameToSaveAs").value;var e=inputfirm.getValue();wepsim_save_to_file(e,f)}simcore_record_append_new("Save control memory to file","wsweb_save_controlmemory_to_file();\n");return true}var wsweb_nfbox=null;function wsweb_notifyuser_show(c,a,b){if(c.trim()===""){c="<empty title>"}if(a.trim()===""){a="<empty message>"}$("#notifyuser1_title").html(c);$("#notifyuser1_message").html(a);wepsim_updatetime_start("#notifyuser1_footer",b/1000);wsweb_nfbox=$("#notifyuser1");wsweb_nfbox.modal("show");return true}function wsweb_notifyuser_hide(){wsweb_nfbox.modal("hide");return true}function wsweb_notifyuser_add(){if(simcore_record_isRecording()===false){return}var a=get_cfg("ws_idiom");var c={};c.cancel={label:i18n_get("gui",a,"Close"),className:"btn-danger col float-left mr-auto"};c.end={label:i18n_get("gui",a,"Save"),className:"btn-success col float-right",callback:function(){var i=$("#frm_title1").val();var e=$("#frm_message1").val();var g=$("#frm_duration1").val();var j=i.replace(/<[^>]*>/g,"");var d=""+j+"";var h=e.replace(/<[^>]*>/g,"");var k=""+h+"";var l=h.replace(new RegExp("\r?\n","g"),"");var f=parseInt(g);if(isNaN(f)){f=5000}else{f=1000*f}simcore_record_setTimeBeforeNow(500);simcore_record_append_new('Show message with title "'+d+'" and body "'+k+'".','wsweb_notifyuser_show("'+j+'", "'+l+'", "'+f+'");\n');simcore_record_setTimeBeforeNow(f);simcore_record_append_new('Close message with title "'+d+'".',"wsweb_notifyuser_hide();\n")}};var b='
';wsweb_nfbox=bootbox.dialog({title:"Form to add a message during playback...",message:b,buttons:c,size:"large",animate:false});return true}function wsweb_record_on(){simcore_record_start();return true}function wsweb_record_off(){simcore_record_stop();return true}function wsweb_record_reset(){simcore_record_reset();return true}function wsweb_record_play(){simcore_record_play();return true}function wsweb_record_pause(){simcore_record_pause();return true}function wsweb_record_playInterval(b,a){simcore_record_playInterval(b,a);return true}function wsweb_record_confirmReset(){var a=get_cfg("ws_idiom");wsweb_nfbox=bootbox.dialog({title:i18n_get("dialogs",a,"Confirm remove record..."),message:i18n_get("dialogs",a,"Close or Reset..."),buttons:{reset:{label:i18n_get("gui",a,"Reset"),className:"btn-dark col float-left",callback:function(){wsweb_record_reset();return true}},close:{label:i18n_get("gui",a,"Close"),className:"btn-danger col float-right"}},keyboard:true,animate:false});return true}function wsweb_about_show(){$("#about2").modal("show");simcore_record_append_new('Open the "about" dialogbox',"wsweb_about_show();\n");return true}function wsweb_about_close(){$("#about2").modal("hide");simcore_record_append_new('Close the "about" dialogbox',"wsweb_about_close();\n");return true}function wsweb_quickmenu_show(){$("#po1").popover("show");simcore_record_append_new('Open the "quick menu"',"wsweb_quickmenu_show();\n");return true}function wsweb_quickmenu_close(){$("#po1").popover("hide");simcore_record_append_new('Close the "quick menu"',"wsweb_quickmenu_close();\n");return true}function wsweb_quickmenu_toggle(){$("#po1").popover("toggle");simcore_record_append_new('Toggle the "quick menu"',"wsweb_quickmenu_toggle();\n");return true}function wsweb_recordbar_show(){$("#record_div").collapse("show");simcore_record_append_new('Open the "record toolbar"',"wsweb_recordbar_show();\n");return true}function wsweb_recordbar_toggle(){$("#record_div").collapse("toggle");simcore_record_append_new('Toggle the "record toolbar"',"wsweb_recordbar_toggle();\n");return true}function wsweb_recordbar_close(){$("#record_div").collapse("hide");simcore_record_append_new('Close the "record toolbar"',"wsweb_recordbar_close();\n");return true}var wsweb_scroll_timer=null;function wsweb_scroll_to(b,c){var a=$(b);a.scrollTop(c)}function wsweb_scroll_record(c){var a=$(c);var b=function(){var d=a.scrollTop();simcore_record_append_new("Scroll content",'wsweb_scroll_to("'+c+'", '+d+");\n")};a.scroll(function(){if(wsweb_scroll_timer!==null){clearTimeout(wsweb_scroll_timer)}wsweb_scroll_timer=setTimeout(b,150)})};/*
* Copyright 2015-2019 Felix Garcia Carballeira, Alejandro Calderon Mateos, Javier Prieto Cepeda, Saul Alonso Monsalve
*
* This file is part of WepSIM.
diff --git a/ws_dist/min.wepsim_web_pwa.js b/ws_dist/min.wepsim_web_pwa.js
index 28cd11348..0b101a865 100644
--- a/ws_dist/min.wepsim_web_pwa.js
+++ b/ws_dist/min.wepsim_web_pwa.js
@@ -23,7 +23,7 @@
* cache versioning
*/
-var cacheName = 'v206b_static';
+var cacheName = 'v207a_static';
/*
diff --git a/ws_dist/wepsim-classic.html b/ws_dist/wepsim-classic.html
index 347d514bc..116a80b0a 100644
--- a/ws_dist/wepsim-classic.html
+++ b/ws_dist/wepsim-classic.html
@@ -148,7 +148,7 @@
-
+
diff --git a/ws_dist/wepsim-compact.html b/ws_dist/wepsim-compact.html
index c49fa9557..239f4f8bf 100644
--- a/ws_dist/wepsim-compact.html
+++ b/ws_dist/wepsim-compact.html
@@ -148,7 +148,7 @@
-
+
diff --git a/ws_dist/wepsim_node.sh b/ws_dist/wepsim_node.sh
index b026fd4fe..babad7cc1 100755
--- a/ws_dist/wepsim_node.sh
+++ b/ws_dist/wepsim_node.sh
@@ -23,7 +23,7 @@
{
console.log('') ;
console.log('WepSIM-cl v1.5') ;
- console.log('+ WepSIM simulator v2.0.6 interface for command line.') ;
+ console.log('+ WepSIM simulator v2.0.7 interface for command line.') ;
console.log('') ;
console.log('Usage:') ;
console.log(' * ./wepsim_node.sh [] [options*]') ;