]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/opcodes/HC05_table_tests.ma
freescale porting
[helm.git] / helm / software / matita / contribs / ng_assembly / 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 "opcodes/opcode.ma".
24
25 (* ***************** *)
26 (* TABELLA DELL'HC05 *)
27 (* ***************** *)
28
29 (* HC05: opcode non implementati come da manuale *)
30 ndefinition HC05_not_impl_byte ≝
31  [〈x3,x1〉;〈x3,x2〉;〈x3,x5〉;〈x3,xB〉;〈x3,xE〉
32  ;〈x4,x1〉;〈x4,x5〉;〈x4,xB〉;〈x4,xE〉
33  ;〈x5,x1〉;〈x5,x2〉;〈x5,x5〉;〈x5,xB〉;〈x5,xE〉
34  ;〈x6,x1〉;〈x6,x2〉;〈x6,x5〉;〈x6,xB〉;〈x6,xE〉
35  ;〈x7,x1〉;〈x7,x2〉;〈x7,x5〉;〈x7,xB〉;〈x7,xE〉
36  ;〈x8,x2〉;〈x8,x4〉;〈x8,x5〉;〈x8,x6〉;〈x8,x7〉;〈x8,x8〉;〈x8,x9〉;〈x8,xA〉;〈x8,xB〉;〈x8,xC〉;〈x8,xD〉
37  ;〈x9,x0〉;〈x9,x1〉;〈x9,x2〉;〈x9,x3〉;〈x9,x4〉;〈x9,x5〉;〈x9,x6〉;〈x9,xE〉
38  ;〈xA,x7〉;〈xA,xC〉;〈xA,xF〉
39  ].
40
41 (* test bytecode non implementati *)
42 nlemma ok_byte_table_HC05 : forall_b8 (λb.
43  (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〉〉) ⊗
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,x0〉〉))
45  = true.
46  napply refl_eq.
47 nqed.
48
49 (* tutti op implementati *)
50 nlemma ok_pseudo_table_HC05 :
51  forall_op HC05 (λo.
52   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC05 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
53  napply refl_eq.
54 nqed.
55
56 (* tutte im implementate *)
57 nlemma ok_mode_table_HC05 :
58  forall_im HC05 (λi.
59   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC05 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
60  napply refl_eq.
61 nqed.
62
63 (* nessuna ripetizione di combinazione op + imm *)
64 nlemma ok_OpIm_table_HC05 :
65  forall_im HC05 (λi.
66   forall_op HC05 (λo.
67    le_w16 (get_OpIm_count HC05 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
68  napply refl_eq.
69 nqed.