diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-07 15:51:01 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-07 15:51:01 +0100 |
commit | 176cc04414d44b9eebdc9627c99f9b6e5e92ba98 (patch) | |
tree | 1a3b2e736bb57e05efe43f7e308eaaca8b3e543b /cpu/cpu.ml | |
parent | d9f8744ea219fb04057059cdcbf7162534c63852 (diff) | |
download | SystDigit-Projet-176cc04414d44b9eebdc9627c99f9b6e5e92ba98.tar.gz SystDigit-Projet-176cc04414d44b9eebdc9627c99f9b6e5e92ba98.zip |
Document ; add hlt instruction ; make monitor faster.
Diffstat (limited to 'cpu/cpu.ml')
-rw-r--r-- | cpu/cpu.ml | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -203,6 +203,12 @@ let rl, rh, i, ex, exf, pc = let wr = mux instr_lra wr (const "101") in let rwd = mux instr_lra rwd (nadder 16 pc (sign_extend 11 16 i_jd)) in + (* instruction : hlt *) + let instr_hlt = exec ^& eq_c 5 i_i 0b01111 in + let halted, set_halted = loop 1 in + let halted = set_halted (instr_hlt ^| (reg 1 halted)) in + let exec_finished = mux halted exec_finished (const "0") in + (* instruction : lw/lwr/sw/swr *) let instr_lsw = eq_c 4 (i_i % (1, 4)) 0b1000 in let instr_lswr = eq_c 4 (i_i % (1, 4)) 0b1010 in |