Guest User

Untitled

a guest
Nov 12th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Require Import Bool String List Arith.
  2. Require Import Omega.
  3. Require Import Kami.All.
  4.  
  5. Require Import FunctionalExtensionality.
  6.  
  7. Set Implicit Arguments.
  8.  
  9. Module module'Testing.
  10. Variable instancePrefix: string.
  11. Variable NumInsts : nat.
  12. Variable InstrSz : nat.
  13. Variable PgmSz : nat.
  14. Variable pgm: ConstT (Array NumInsts (Bit InstrSz)).
  15. Definition pc : string := instancePrefix--"pc".
  16. Definition procSpecModule: Mod :=
  17. (MODULE {
  18. Register pc : Bit PgmSz <- (* intwidth *) (natToWord PgmSz 0)
  19. with Method instancePrefix--"getInst" () : Bit InstrSz :=
  20. (
  21. Read pc_v : Bit PgmSz <- pc ;
  22. LET inst : Bit InstrSz (* non-call varbinding *) <- ( (* isConstT *) #pgm @[ #pc_v ] ) ;
  23. Ret #inst
  24. )}).
  25. End module'Testing.
Add Comment
Please, Sign In to add comment