Skip to content

Commit 8771aab

Browse files
committed
2.3.6: minor updates
1 parent 59e04bd commit 8771aab

File tree

15 files changed

+56
-51
lines changed

15 files changed

+56
-51
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
```
4444
* Get WepSIM by executing:
4545
```bash
46-
wget https://github.com/wepsim/wepsim/releases/download/v2.3.5/wepsim-2.3.5.zip
47-
unzip wepsim-2.3.5.zip
48-
cd wepsim-2.3.5
46+
wget https://github.com/wepsim/wepsim/releases/download/v2.3.6/wepsim-2.3.6.zip
47+
unzip wepsim-2.3.6.zip
48+
cd wepsim-2.3.6
4949
npm install terser jq jshint yargs clear inquirer fuzzy inquirer-command-prompt inquirer-autocomplete-prompt
5050
```
5151
* Execute wepsim.sh with the help flag in order to show the available command switches:
@@ -310,12 +310,12 @@ Micropc at 0x1. Activated signals are: TA R BW M1 C1. Associated actions are: Co
310310
!echo "(1/4) Installing pre-requisites..."
311311
!npm install terser jq jshint yargs clear inquirer >& /dev/null
312312
!echo "(2/4) Downloading WepSIM..."
313-
!wget https://github.com/wepsim/wepsim/releases/download/v2.3.5/wepsim-2.3.5.zip >& /dev/null
314-
!unzip -o wepsim-2.3.5.zip >& /dev/null
315-
!rm -fr wepsim-2.3.5.zip
313+
!wget https://github.com/wepsim/wepsim/releases/download/v2.3.6/wepsim-2.3.6.zip >& /dev/null
314+
!unzip -o wepsim-2.3.6.zip >& /dev/null
315+
!rm -fr wepsim-2.3.6.zip
316316
!echo "(3/4) Executing WepSIM..."
317-
!./wepsim-2.3.5/wepsim.sh -a stepbystep -m ep -f ./wepsim-2.3.5/repo/microcode/mips/ep_base.mc -s ./wepsim-2.3.5/repo/assembly/mips/s1e1.asm > ./result.csv
318-
!rm -fr wepsim-2.3.5
317+
!./wepsim-2.3.6/wepsim.sh -a stepbystep -m ep -f ./wepsim-2.3.6/repo/microcode/mips/ep_base.mc -s ./wepsim-2.3.6/repo/assembly/mips/s1e1.asm > ./result.csv
318+
!rm -fr wepsim-2.3.6
319319
!echo "(4/4) Showing execution trace as table..."
320320
321321
import pandas as pd

repo/assembly/mips/s6e8.asm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sys_prt_ch: out $a0 0x1000
2323
reti
2424

2525
rt_int: # 1.- interruption
26-
lw $s2 ($s1) # get time
26+
lb $s2 ($s1) # get time
2727
beq $s2 $0 rt1e1
2828
out $s2 0x4008 # out time
2929

@@ -32,8 +32,8 @@ sys_prt_ch: out $a0 0x1000
3232
li $s2 2 # play + silence
3333
out $s2 0x4000 # play + silence
3434

35+
addi $s1 $s1 1
3536
addi $s0 $s0 4
36-
addi $s1 $s1 4
3737
rt1e1: reti
3838

3939
rt_sys: # 2.- syscall
@@ -46,7 +46,7 @@ sys_prt_ch: out $a0 0x1000
4646

4747
.data
4848
notes: .ascii " G2", " ", " G2", " ", " Bb2", " C3", " G2", " ", " G2", " ", " F2", " F#2", " G2", " ", " G2", " ", " "
49-
times: .word 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
49+
times: .byte 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
5050

5151
.text
5252
main:
@@ -56,7 +56,7 @@ main:
5656
la $t1 times
5757
loop2:
5858
# play untill time is 0
59-
lw $t2 ($t1) # get time
59+
lb $t2 ($t1) # get time
6060
beq $t2 $0 end2
6161
out $t2 0x4008 # out time
6262

@@ -69,8 +69,8 @@ main:
6969
li $v0 11
7070
syscall
7171

72+
addi $t1 $t1 1
7273
addi $t0 $t0 4
73-
addi $t1 $t1 4
7474
beq $0 $0 loop2
7575

7676
end2: li $a0 '\n'

repo/assembly/rv32/s6e8.asm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sys_prt_ch: out a0 0x1000
2323
sret
2424

2525
rt_int: # 1.- interruption
26-
lw s2 0(s1) # time
26+
lb s2 0(s1) # time
2727
beq s2 x0 rt1e1
2828
out s2 0x4008
2929

@@ -32,8 +32,8 @@ sys_prt_ch: out a0 0x1000
3232
li s2 2 # play + silence
3333
out s2 0x4000
3434

35+
addi s1 s1 1
3536
addi s0 s0 4
36-
addi s1 s1 4
3737
rt1e1: sret
3838

3939
rt_sys: # 2.- ecall
@@ -46,7 +46,7 @@ sys_prt_ch: out a0 0x1000
4646

4747
.data
4848
notes: .ascii " G2", " ", " G2", " ", " Bb2", " C3", " G2", " ", " G2", " ", " F2", " F#2", " G2", " ", " G2", " ", " "
49-
times: .word 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
49+
times: .byte 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
5050

5151
.text
5252
main:
@@ -56,7 +56,7 @@ main:
5656
la t1 times
5757
loop2:
5858
# play untill time is 0
59-
lw t2 0(t1) # get time
59+
lb t2 0(t1) # get time
6060
beq t2 x0 end2
6161
out t2 0x4008 # out time
6262

@@ -69,8 +69,8 @@ main:
6969
li a7 11
7070
ecall
7171

72+
addi t1 t1 1
7273
addi t0 t0 4
73-
addi t1 t1 4
7474
beq x0 x0 loop2
7575

7676
end2: li a0 '\n'

repo/assembly/rv32/s6e8_native.asm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ sys_prt_ch: out a0 0x1000
2323
sret
2424

2525
rt_int: # 1.- interruption
26-
lw s2 0(s1) # time: 8n
26+
lb s2 0(s1) # time: 8n
2727
beq s2 x0 rt1e1
2828
out s2 0x4008
2929
lw s2 0(s0) # note: A4
3030
out s2 0x4004
3131
li s2 2 # play + silence
3232
out s2 0x4000
33+
addi s1 s1 1
3334
addi s0 s0 4
34-
addi s1 s1 4
3535
rt1e1: sret
3636

3737
rt_sys: # 2.- ecall
@@ -44,7 +44,7 @@ sys_prt_ch: out a0 0x1000
4444

4545
.data
4646
notes: .ascii " G2", " ", " G2", " ", " Bb2", " C3", " G2", " ", " G2", " ", " F2", " F#2", " G2", " ", " G2", " ", " "
47-
times: .word 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
47+
times: .byte 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 5, 8, 8, 8, 0
4848

4949
.text
5050
main:
@@ -54,7 +54,7 @@ main:
5454
la t1 times
5555
loop2:
5656
# play untill time is 0
57-
lw t2 0(t1) # get time
57+
lb t2 0(t1) # get time
5858
beq t2 x0 end2
5959
out t2 0x4008 # out time
6060

@@ -67,8 +67,8 @@ main:
6767
li a7 11
6868
ecall
6969

70+
addi t1 t1 1
7071
addi t0 t0 4
71-
addi t1 t1 4
7272
beq x0 x0 loop2
7373

7474
end2: li a0 '\n'

sim_core/sim_core_sound.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
try
5252
{
53-
await Tone.start() ;
53+
await Tone.Transport.start() ;
5454
if (Tone.context.state !== 'running') {
5555
Tone.context.resume() ;
5656
}
@@ -72,7 +72,7 @@
7272

7373
try
7474
{
75-
await Tone.stop() ;
75+
await Tone.Transport.stop() ;
7676
}
7777
catch (e)
7878
{

sim_hw/hw_items/io_sound_base.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ function io_sound_base_register ( sim_p )
218218

219219
var bus_db = get_value(sim_p.states[s_expr[2]]) ;
220220
var clk = get_value(sim_p.states[s_expr[3]]) ;
221+
var ret_ok = 1 ;
221222

222223
if (bus_ab == SDR1_ID)
223224
{
@@ -241,10 +242,14 @@ function io_sound_base_register ( sim_p )
241242
var n1t1 = n1 + ',' + t1 + ';' ;
242243
sim_p.internal_states.sound_content += n1t1 ;
243244

244-
simcore_sound_playNote(n1, t1) ;
245+
ret_ok = simcore_sound_playNote(n1, t1) ;
246+
}
247+
if (1 == bus_db) {
248+
ret_ok = simcore_sound_start() ;
249+
}
250+
if (0 == bus_db) {
251+
ret_ok = simcore_sound_stop() ;
245252
}
246-
if (0 == bus_db) simcore_sound_stop() ;
247-
if (1 == bus_db) simcore_sound_start() ;
248253
}
249254
}
250255
if (bus_ab == SDR2_ID) {
@@ -254,7 +259,7 @@ function io_sound_base_register ( sim_p )
254259
set_value(sim_p.states[s_expr[7]], bus_db) ;
255260
}
256261

257-
set_value(sim_p.states[s_expr[4]], 1) ;
262+
set_value(sim_p.states[s_expr[4]], ret_ok) ;
258263
},
259264
verbal: function (s_expr)
260265
{

ws_dist/min.external.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ws_dist/min.sim_all.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ws_dist/min.wepsim_node.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ws_dist/min.wepsim_web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)