]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_table_tests.ma
(no commit message)
[helm.git] / helm / software / matita / contribs / ng_assembly / emulator / opcodes / HC05_table_tests.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ********************************************************************** *)
16 (*                          Progetto FreeScale                            *)
17 (*                                                                        *)
18 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
19 (*   Sviluppo: 2008-2010                                                  *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "emulator/opcodes/opcode.ma".
24 include "emulator/opcodes/HC05_table.ma".
25
26 (* ***************** *)
27 (* TABELLA DELL'HC05 *)
28 (* ***************** *)
29
30 (* HC05: opcode non implementati come da manuale *)
31 ndefinition HC05_not_impl_byte ≝
32  [〈x3,x1〉;〈x3,x2〉;〈x3,x5〉;〈x3,xB〉;〈x3,xE〉
33  ;〈x4,x1〉;〈x4,x5〉;〈x4,xB〉;〈x4,xE〉
34  ;〈x5,x1〉;〈x5,x2〉;〈x5,x5〉;〈x5,xB〉;〈x5,xE〉
35  ;〈x6,x1〉;〈x6,x2〉;〈x6,x5〉;〈x6,xB〉;〈x6,xE〉
36  ;〈x7,x1〉;〈x7,x2〉;〈x7,x5〉;〈x7,xB〉;〈x7,xE〉
37  ;〈x8,x2〉;〈x8,x4〉;〈x8,x5〉;〈x8,x6〉;〈x8,x7〉;〈x8,x8〉;〈x8,x9〉;〈x8,xA〉;〈x8,xB〉;〈x8,xC〉;〈x8,xD〉
38  ;〈x9,x0〉;〈x9,x1〉;〈x9,x2〉;〈x9,x3〉;〈x9,x4〉;〈x9,x5〉;〈x9,x6〉;〈x9,xE〉
39  ;〈xA,x7〉;〈xA,xC〉;〈xA,xF〉
40  ].
41
42 (* test bytecode non implementati *)
43 nlemma ok_byte_table_HC05 : forall_b8 (λb.
44  (test_not_impl_byte b HC05_not_impl_byte     ⊙ eq_w16 (get_byte_count HC05 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
45  (⊖ (test_not_impl_byte b HC05_not_impl_byte) ⊙ eq_w16 (get_byte_count HC05 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x0〉〉))
46  = true.
47  napply refl_eq.
48 nqed.
49
50 (* tutti op implementati *)
51 nlemma ok_pseudo_table_HC05 :
52  forall_op HC05 (λo.
53   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC05 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
54  napply refl_eq.
55 nqed.
56
57 (* tutte im implementate *)
58 nlemma ok_mode_table_HC05 :
59  forall_im HC05 (λi.
60   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC05 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
61  napply refl_eq.
62 nqed.
63
64 (* nessuna ripetizione di combinazione op + imm *)
65 nlemma ok_OpIm_table_HC05 :
66  forall_im HC05 (λi.
67   forall_op HC05 (λo.
68    le_w16 (get_OpIm_count HC05 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
69  napply refl_eq.
70 nqed.