Skip to content

Commit

Permalink
2.3.1: minor updates on hw
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldero committed Jan 5, 2024
1 parent fc9ce43 commit 08005ea
Show file tree
Hide file tree
Showing 31 changed files with 1,857 additions and 3,417 deletions.
41 changes: 19 additions & 22 deletions devel/mk_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,25 @@ cat sim_core/sim_cfg.js \
sim_hw/sim_hw_values.js \
sim_hw/sim_hw_behavior.js \
sim_hw/sim_hw_eltos.js \
sim_hw/sim_hw_ep/sim_ep.js \
sim_hw/sim_hw_ep/sim_hw_board.js \
sim_hw/sim_hw_ep/sim_hw_cpu.js \
sim_hw/sim_hw_ep/sim_hw_mem.js \
sim_hw/sim_hw_ep/sim_hw_io.js \
sim_hw/sim_hw_ep/sim_hw_kbd.js \
sim_hw/sim_hw_ep/sim_hw_scr.js \
sim_hw/sim_hw_ep/sim_hw_l3d.js \
sim_hw/sim_hw_ep/sim_hw_ldm.js \
sim_hw/sim_hw_poc/sim_poc.js \
sim_hw/sim_hw_poc/sim_hw_board.js \
sim_hw/sim_hw_poc/sim_hw_cpu.js \
sim_hw/sim_hw_poc/sim_hw_mem.js \
sim_hw/sim_hw_poc/sim_hw_io.js \
sim_hw/sim_hw_poc/sim_hw_kbd.js \
sim_hw/sim_hw_poc/sim_hw_scr.js \
sim_hw/sim_hw_poc/sim_hw_l3d.js \
sim_hw/sim_hw_poc/sim_hw_ldm.js \
sim_hw/sim_hw_rv/sim_rv.js \
sim_hw/sim_hw_rv/sim_hw_board.js \
sim_hw/sim_hw_rv/sim_hw_cpu.js \
sim_hw/sim_hw_rv/sim_hw_mem.js \
\
sim_hw/hw_items/board_base.js \
sim_hw/hw_items/mem_ep.js \
sim_hw/hw_items/mem_poc.js \
sim_hw/hw_items/cpu_ep.js \
sim_hw/hw_items/cpu_poc.js \
sim_hw/hw_items/io_clk_base.js \
sim_hw/hw_items/io_screen_base.js \
sim_hw/hw_items/io_keyboard_base.js \
sim_hw/hw_items/io_ldm_base.js \
sim_hw/hw_items/io_l3d_base.js \
\
sim_hw/hw_ep.js \
sim_hw/hw_poc.js \
\
sim_hw/hw_rv/sim_rv.js \
sim_hw/hw_rv/sim_hw_board.js \
sim_hw/hw_rv/sim_hw_cpu.js \
sim_hw/hw_rv/sim_hw_mem.js \
\
sim_sw/firmware/lexical.js \
sim_sw/firmware/firm_mcode.js \
Expand Down
47 changes: 30 additions & 17 deletions devel/test_jshint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ echo "checking sim_sw..."
jshint ./sim_sw/firmware/firm_registers.js
jshint ./sim_sw/firmware/firm_pseudoinstructions.js
#jshint ./sim_sw/firmware/firm_instruction_v1.js
jshint ./sim_sw/firmware/firm_fields_v1.js
#jshint ./sim_sw/firmware/firm_fields_v1.js
#jshint ./sim_sw/firmware/firm_fields_v2.js
#jshint ./sim_sw/firmware/firm_instruction.js
#jshint ./sim_sw/firmware.js
Expand All @@ -56,24 +56,37 @@ echo "checking sim_hw..."
jshint ./sim_hw/sim_hw_values.js
#jshint ./sim_hw/sim_hw_behavior.js
jshint ./sim_hw/sim_hw_eltos.js
jshint ./sim_hw/sim_hw_poc/sim_poc.js
jshint ./sim_hw/sim_hw_poc/sim_hw_mem.js
jshint ./sim_hw/sim_hw_poc/sim_hw_board.js
jshint ./sim_hw/sim_hw_poc/sim_hw_kbd.js
jshint ./sim_hw/sim_hw_poc/sim_hw_scr.js
jshint ./sim_hw/sim_hw_poc/sim_hw_io.js

jshint ./sim_hw/hw_items/board_base.js
jshint ./sim_hw/hw_items/mem_ep.js
#jshint ./sim_hw/hw_items/cpu_ep.js
jshint ./sim_hw/hw_items/io_screen_base.js
jshint ./sim_hw/hw_items/io_keyboard_base.js
jshint ./sim_hw/hw_items/io_clk_base.js
#jshint ./sim_hw/hw_items/io_l3d_ep.js
#jshint ./sim_hw/hw_items/io_ldm_ep.js

jshint ./sim_hw/hw_ep.js
jshint ./sim_hw/hw_poc.js

#jshint ./sim_hw/sim_hw_poc/sim_poc.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_mem.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_board.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_kbd.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_scr.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_io.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_cpu.js
jshint ./sim_hw/sim_hw_poc/sim_hw_l3d.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_l3d.js
#jshint ./sim_hw/sim_hw_poc/sim_hw_ldm.js

jshint ./sim_hw/sim_hw_ep/sim_hw_mem.js
jshint ./sim_hw/sim_hw_ep/sim_ep.js
jshint ./sim_hw/sim_hw_ep/sim_hw_io.js
jshint ./sim_hw/sim_hw_ep/sim_hw_board.js
jshint ./sim_hw/sim_hw_ep/sim_hw_kbd.js
jshint ./sim_hw/sim_hw_ep/sim_hw_scr.js
#jshint ./sim_hw/sim_hw_ep/sim_ep.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_mem.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_io.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_board.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_kbd.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_scr.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_cpu.js
jshint ./sim_hw/sim_hw_ep/sim_hw_l3d.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_l3d.js
#jshint ./sim_hw/sim_hw_ep/sim_hw_ldm.js

echo "checking wepsim_core..."
Expand All @@ -83,7 +96,7 @@ echo "checking wepsim_core..."
jshint ./wepsim_core/wepsim_preload.js
jshint ./wepsim_core/wepsim_share.js
jshint ./wepsim_core/wepsim_voice.js
jshint ./wepsim_core/wepsim_execute.js
#jshint ./wepsim_core/wepsim_execute.js
jshint ./wepsim_core/wepsim_dbg_breakpointicons.js
jshint ./wepsim_core/wepsim_tour_commands.js
jshint ./wepsim_core/wepsim_mode.js
Expand All @@ -109,7 +122,7 @@ echo "checking wepsim_web..."
jshint ./wepsim_web/wepsim_uielto_console.js
jshint ./wepsim_web/wepsim_uielto_cpu.js
#jshint ./wepsim_web/wepsim_uielto_cpusvg.js
jshint ./wepsim_web/wepsim_uielto_dbg_asm.js
#jshint ./wepsim_web/wepsim_uielto_dbg_asm.js
jshint ./wepsim_web/wepsim_uielto_dbg_mc.js
jshint ./wepsim_web/wepsim_uielto_editas.js
jshint ./wepsim_web/wepsim_uielto_editmc.js
Expand Down
10 changes: 10 additions & 0 deletions sim_hw/sim_hw_ep/sim_ep.js → sim_hw/hw_ep.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,15 @@
events: {}
} ;

// registering elements
board_base_register ( ep_def ) ;
cpu_ep_register ( ep_def ) ;
mem_ep_register ( ep_def ) ;
io_screen_base_register ( ep_def ) ;
io_keyboard_base_register ( ep_def ) ;
io_clk_base_register ( ep_def ) ;
io_l3d_base_register ( ep_def ) ;
io_ldm_base_register ( ep_def ) ;

simhw_add(ep_def) ;

16 changes: 10 additions & 6 deletions sim_hw/sim_hw_ep/sim_hw_board.js → sim_hw/hw_items/board_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,37 @@
*/


function board_base_register ( sim_p )
{
/*
* Syntax of behaviors
*/

// Print Signal
sim.ep.behaviors.PRINT_S = { nparameters: 2,
sim_p.behaviors.PRINT_S = { nparameters: 2,
types: ["S"],
operation: function(s_expr)
{
console.log(s_expr[1] + ': 0x' + sim.ep.signals[s_expr[1]].value.toString(16));
console.log(s_expr[1] + ': 0x' + sim_p.signals[s_expr[1]].value.toString(16));
},
verbal: function (s_expr)
{
return "Print value of signal " + s_expr[1] + ': 0x' + sim.ep.signals[s_expr[1]].value.toString(16) + ". " ;
return "Print value of signal " + s_expr[1] + ': 0x' + sim_p.signals[s_expr[1]].value.toString(16) + ". " ;
}
};

// Print State
sim.ep.behaviors.PRINT_E = { nparameters: 2,
sim_p.behaviors.PRINT_E = { nparameters: 2,
types: ["E"],
operation: function(s_expr)
{
console.log(s_expr[1] + ': 0x' + sim.ep.states[s_expr[1]].value.toString(16));
console.log(s_expr[1] + ': 0x' + sim_p.states[s_expr[1]].value.toString(16));
},
verbal: function (s_expr)
{
return "Print value of state " + s_expr[1] + ': 0x' + sim.ep.states[s_expr[1]].value.toString(16) + ". " ;
return "Print value of state " + s_expr[1] + ': 0x' + sim_p.states[s_expr[1]].value.toString(16) + ". " ;
}
};

}

Loading

0 comments on commit 08005ea

Please sign in to comment.