diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-10 15:07:34 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-01-10 15:07:34 +0100 |
commit | 6de7ebfc3fa320b639a292a174f213005d5ce2c2 (patch) | |
tree | dd290bad14f5326b49a2dffefe82c1fdd01af961 /cpu/cpu.ml | |
parent | 25e1beee38cba662f62f2de85855091a4e718064 (diff) | |
download | SystDigit-Projet-6de7ebfc3fa320b639a292a174f213005d5ce2c2.tar.gz SystDigit-Projet-6de7ebfc3fa320b639a292a174f213005d5ce2c2.zip |
Unsigned multiplication works (uses as many cycles as necessary) ; unit tests.
Diffstat (limited to 'cpu/cpu.ml')
-rw-r--r-- | cpu/cpu.ml | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -154,8 +154,8 @@ let rl, rh, i, ex, exf, pc = (* instruction : add/sub/mul/div/unsigned/or/and/xor/nor/lsl/lsr/asr *) let instr_alu = eq_c 3 (i_i % (2, 4)) 0b000 in - let f0 = i_i ** 0 in let f1 = i_i ** 1 in + let f0 = i_i ** 0 in let double_instr_alu = instr_alu ^& (not f1) ^& (i_f ** 1) ^& (ne_n 3 i_r (const "101")) in let alu_d1, alu_d2, instr_alu_finished = alu f1 f0 i_f v_ra v_rb (exec ^& instr_alu) in @@ -278,6 +278,11 @@ let rl, rh, i, ex, exf, pc = ( (* lil *) i_id ++ (mux instr_lixz (v_r % (8, 15)) (zeroes 8))) ( (* liu *) (mux instr_lixz (v_r % (0, 7)) (zeroes 8)) ++ i_id)) in + (* instruction : lie *) + let instr_lie = eq_c 5 i_i 0b11100 in + let wr = mux instr_lie wr i_r in + let rwd= mux instr_lie rwd (sign_extend 8 16 i_id) in + save_cpu_regs wr rwd ^. save_ram_read (cpu_ram ra we wa d) ^. save_next_read exec_finished ^. |