]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/freescale/load_write.ma
freescale porting, work in progress
[helm.git] / helm / software / matita / contribs / ng_assembly / freescale / load_write.ma
index 3e5ba4ed6544f8069907ac308d0964405e4807ca..28704ff34828f4db950c29e38d8ca28fcf930dff 100755 (executable)
@@ -15,8 +15,8 @@
 (* ********************************************************************** *)
 (*                          Progetto FreeScale                            *)
 (*                                                                        *)
-(*   Sviluppato da: Cosimo Oliboni, oliboni@cs.unibo.it                   *)
-(*     Cosimo Oliboni, oliboni@cs.unibo.it                                *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Ultima modifica: 05/08/2009                                          *)
 (*                                                                        *)
 (* ********************************************************************** *)
 
@@ -90,7 +90,7 @@ match s with
 (* 
    accesso al paging: [00pp pppp ppxx xxxx] con p=PS x=addr
 *)
-        match in_range addr 〈〈x0,x0〉:〈xC,x0〉〉 〈〈x0,x0〉:〈xF,xF〉〉 with
+        match inrange_w16 addr 〈〈x0,x0〉:〈xC,x0〉〉 〈〈x0,x0〉:〈xF,xF〉〉 with
          [ true ⇒ fMEM mem chk (or_w16 (fst … (shr_w16 (fst … (shr_w16 〈psm:〈x0,x0〉〉))))
                                              (and_w16 addr 〈〈x0,x0〉:〈x3,xF〉〉))
 (*
@@ -188,7 +188,7 @@ match s with
 (* 
    accesso al paging: [00pp pppp ppxx xxxx] con p=PS x=addr
 *)
-        match in_range addr 〈〈x0,x0〉:〈xC,x0〉〉 〈〈x0,x0〉:〈xF,xF〉〉 with
+        match inrange_w16 addr 〈〈x0,x0〉:〈xC,x0〉〉 〈〈x0,x0〉:〈xF,xF〉〉 with
          [ true ⇒ opt_map … (fMEM mem chk (or_w16 (fst … (shr_w16 (fst … (shr_w16 〈psm:〈x0,x0〉〉))))
                                                    (and_w16 addr 〈〈x0,x0〉:〈x3,xF〉〉)))
                    (λmem'.Some ? (mk_any_status RS08 t (mk_alu_RS08 acclow pc pcm spc xm psm zfl cfl) mem' chk clk))
@@ -548,8 +548,8 @@ ndefinition aux_inc_indX_16 ≝
 ndefinition multi_mode_load ≝
 λbyteflag:bool.λm:mcu_type.λt:memory_impl.
  match byteflag
- return λbyteflag:bool.any_status m t → word16 → instr_mode → 
-  option (Prod3T (any_status m t) match byteflag with [ true ⇒ byte8 | false ⇒ word16 ] word16)
 return λbyteflag:bool.any_status m t → word16 → instr_mode → 
+                        option (Prod3T (any_status m t) match byteflag with [ true ⇒ byte8 | false ⇒ word16 ] word16)
  with
   (* lettura di un byte *)
   [ true ⇒ λs:any_status m t.λcur_pc:word16.λi:instr_mode.match i with
@@ -628,7 +628,7 @@ ndefinition multi_mode_load ≝
    | MODE_TNY e           ⇒ opt_map … (memory_filter_read m t s 〈〈x0,x0〉:〈x0,e〉〉)
                              (λb.Some ? (triple … s b cur_pc))
 (* preleva 1 byte da 0000 0000 000x xxxxb *)
-   | MODE_SRT e           ⇒ opt_map … (memory_filter_read m t s 〈〈x0,x0〉:(byte8_of_bitrigesim e)〉)
+   | MODE_SRT e           ⇒ opt_map … (memory_filter_read m t s 〈〈x0,x0〉:(b8_of_bit e)〉)
                              (λb.Some ? (triple … s b cur_pc))
    ]
 (* lettura di una word *)
@@ -865,7 +865,7 @@ ndefinition multi_mode_write ≝
   | MODE_TNY e ⇒ opt_map … (memory_filter_write m t s 〈〈x0,x0〉:〈x0,e〉〉 writeb)
                    (λtmps.Some ? (pair … tmps cur_pc))
 (* scrive 1 byte su 0000 0000 000x xxxxb *)
-  | MODE_SRT e ⇒ opt_map … (memory_filter_write m t s 〈〈x0,x0〉:(byte8_of_bitrigesim e)〉 writeb)
+  | MODE_SRT e ⇒ opt_map … (memory_filter_write m t s 〈〈x0,x0〉:(b8_of_bit e)〉 writeb)
                       (λtmps.Some ? (pair … tmps cur_pc)) ]
  (* scrittura di una word *)
  | false ⇒ λs:any_status m t.λcur_pc:word16.λi:instr_mode.λwritew:word16.match i with