]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/assembly/freescale/table_HC05_tests.ma
tagged 0.5.0-rc1
[helm.git] / matita / contribs / assembly / freescale / table_HC05_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:                                                         *)
19 (*   Cosimo Oliboni, oliboni@cs.unibo.it                                  *)
20 (*                                                                        *)
21 (* Questo materiale fa parte della tesi:                                  *)
22 (*   "Formalizzazione Interattiva dei Microcontroller a 8bit FreeScale"   *)
23 (*                                                                        *)
24 (*                    data ultima modifica 15/11/2007                     *)
25 (* ********************************************************************** *)
26
27 include "freescale/table_HC05.ma".
28
29 (* HC05: opcode non implementati come da manuale *)
30 definition 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 lemma ok_byte_table_HC05 : forall_byte8 (λb.
42  (test_not_impl_byte b HC05_not_impl_byte     ⊙ eqb (get_byte_count HC05 b 0 opcode_table_HC05) 1) ⊗
43  (⊖ (test_not_impl_byte b HC05_not_impl_byte) ⊙ eqb (get_byte_count HC05 b 0 opcode_table_HC05) 0))
44  = true.
45  reflexivity.
46 qed.
47
48 (* HC05: pseudocodici non implementati come da manuale *)
49 definition HC05_not_impl_pseudo ≝
50  [ AIS ; AIX ; BGE ; BGND ; BGT ; BLE ; BLT ; CBEQA ; CBEQX ; CPHX ; DAA
51  ; DBNZ ; DIV ; LDHX ; MOV ; NSA ; PSHA ; PSHH ; PSHX ; PULA ; PULH ; PULX
52  ; SHA ; SLA ; STHX ; TAP ; TPA ; TSX ; TXS ].
53
54 lemma ok_pseudo_table_HC05 : forall_opcode (λo.
55  (test_not_impl_pseudo o HC05_not_impl_pseudo     ⊙ leb 1 (get_pseudo_count HC05 o 0 opcode_table_HC05)) ⊗
56  (⊖ (test_not_impl_pseudo o HC05_not_impl_pseudo) ⊙ eqb (get_pseudo_count HC05 o 0 opcode_table_HC05) 0))
57  = true.
58  reflexivity.
59 qed.
60
61 (* HC05: modalita' non implementate come da manuale *)
62 definition HC05_not_impl_mode ≝
63  [ MODE_INHH ; MODE_SP1 ; MODE_SP2 ; MODE_DIR1_to_DIR1
64  ; MODE_IMM1_to_DIR1 ; MODE_IX0p_to_DIR1 ; MODE_DIR1_to_IX0p
65  ; MODE_INHA_and_IMM1 ; MODE_INHX_and_IMM1 ; MODE_IMM1_and_IMM1
66  ; MODE_DIR1_and_IMM1 ; MODE_IX0_and_IMM1 ; MODE_IX0p_and_IMM1
67  ; MODE_IX1_and_IMM1 ; MODE_IX1p_and_IMM1 ; MODE_SP1_and_IMM1
68  ; MODE_TNY x0 ; MODE_TNY x1 ; MODE_TNY x2 ; MODE_TNY x3
69  ; MODE_TNY x4 ; MODE_TNY x5 ; MODE_TNY x6 ; MODE_TNY x7
70  ; MODE_TNY x8 ; MODE_TNY x9 ; MODE_TNY xA ; MODE_TNY xB
71  ; MODE_TNY xC ; MODE_TNY xD ; MODE_TNY xE ; MODE_TNY xF
72  ; MODE_SRT t00 ; MODE_SRT t01 ; MODE_SRT t02 ; MODE_SRT t03
73  ; MODE_SRT t04 ; MODE_SRT t05 ; MODE_SRT t06 ; MODE_SRT t07
74  ; MODE_SRT t08 ; MODE_SRT t09 ; MODE_SRT t0A ; MODE_SRT t0B
75  ; MODE_SRT t0C ; MODE_SRT t0D ; MODE_SRT t0E ; MODE_SRT t0F
76  ; MODE_SRT t10 ; MODE_SRT t11 ; MODE_SRT t12 ; MODE_SRT t13
77  ; MODE_SRT t14 ; MODE_SRT t15 ; MODE_SRT t16 ; MODE_SRT t17
78  ; MODE_SRT t18 ; MODE_SRT t19 ; MODE_SRT t1A ; MODE_SRT t1B
79  ; MODE_SRT t1C ; MODE_SRT t1D ; MODE_SRT t1E ; MODE_SRT t1F ].
80
81 lemma ok_mode_table_HC05 : forall_instr_mode (λi.
82  (test_not_impl_mode i HC05_not_impl_mode     ⊙ leb 1 (get_mode_count HC05 i 0 opcode_table_HC05)) ⊗
83  (⊖ (test_not_impl_mode i HC05_not_impl_mode) ⊙ eqb (get_mode_count HC05 i 0 opcode_table_HC05) 0))
84  = true.
85  reflexivity.
86 qed.
87
88 lemma ok_OpIm_table_HC05 :
89  forall_instr_mode (λi:instr_mode.
90  forall_opcode     (λop:opcode.
91   leb (get_OpIm_count HC05 (anyOP HC05 op) i 0 opcode_table_HC05) 1)) = true.
92  reflexivity.
93 qed.